LAPTOP-KB9HII50\70708 9 kuukautta sitten
vanhempi
commit
d7d3e168ec

+ 1 - 1
starter/elasticsearch-starter/src/main/java/com/yihu/jw/elasticsearch/ElasticSearch7Pool.java

@ -95,7 +95,7 @@ public class ElasticSearch7Pool {
    public ResultSet restHighLevelClientStream(String sql) throws Exception {
//        Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.55:9200","elastic","elastic");
//        Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.168:9200/","elastic","elastic");
        System.out.println("连接地址==>hosts:" + hosts + " es账号密码==>userName:" + userName + "   -------------  password:" + password);
//        System.out.println("连接地址==>hosts:" + hosts + " es账号密码==>userName:" + userName + "   -------------  password:" + password);
        Connection connection = DriverManager.getConnection("jdbc:es://" + hosts, userName, password);
        Statement statement = connection.createStatement();
        ResultSet resultSet = statement.executeQuery(sql);

+ 2 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -347,6 +347,8 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
			return success("操作成功",result);
	}
	@PostMapping(value = BaseHospitalRequestMapping.DodtorIM.refundRegisterNo)
	@ApiOperation(value = "退号", notes = "退号")
	public Envelop refundRegisterNo(@ApiParam(name = "outpatientCode", value = "就诊记录code", defaultValue = "1")

+ 29 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/DsyyPrescriptionCotroller.java

@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import java.net.URLDecoder;
@ -35,6 +36,34 @@ public class DsyyPrescriptionCotroller extends EnvelopRestEndpoint {
    private ElasticsearchUtil elasticsearchUtil;
    @Autowired
    private ElasticSearch7Util elasticSearch7Util;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @PostMapping(value = "open/exportExcel/dmSql")
    @ApiOperation(value = "执行sql语句")
    public ObjEnvelop dmSql(@ApiParam(name = "content", value = "sql", required = true)
                            @RequestParam(value = "content", required = true) String content,
                            @ApiParam(name = "type", value = "类型1 查询 2修改删除新增", required = true)
                            @RequestParam(value = "type", required = true) String type) {
        try {
            content = URLDecoder.decode(content, "UTF-8");
            if ("2".equals(type)) {
                int result = 0;
                try {
                    result = jdbcTemplate.update(content);
                } catch (Exception e) {
                    e.printStackTrace();
                    result = -1;
                }
                return ObjEnvelop.getSuccess("ok", result);
            } else {
                return ObjEnvelop.getSuccess("ok", jdbcTemplate.queryForList(content));
            }
        } catch (Exception e) {
            e.printStackTrace();
            return ObjEnvelop.getError("请求失败");
        }
    }
    @PostMapping(value = "open/exportExcel/executeSQLStream")
    @ApiOperation(value = "sql查询es", notes = "sql查询es")

+ 17 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/statistics/EsStatisticsEndpoint.java

@ -1214,7 +1214,7 @@ class EsStatisticsEndpoint extends EnvelopRestEndpoint {
    /**
     * 查询收入,开方,问诊量
     * 参数:
     * strJson={"startDate":"2023-07-18","endDate":"2023-07-19","area":"350200","level":2,"flag":1}
     * strJson={"startDate":"2023-07-18","endDate":"2023-07-19","area":"350200","level":2,"flag":1,"type":"1"}
     */
    @GetMapping(value = BaseHospitalRequestMapping.Statistics.getTotal3Data)
    @ApiOperation(value = "查询收入,开方,问诊量")
@ -1900,6 +1900,22 @@ class EsStatisticsEndpoint extends EnvelopRestEndpoint {
        }
    }
    /**
     * 收入情况
     * strJson={"startDate":"2024-01-01","endDate":"2024-05-27","area":"350200","level":2}
     */
    @GetMapping(value = "/incomeSituation")
    @ApiOperation(value = "收入情况")
    public ObjEnvelop incomeSituation(@RequestParam(required = true) String strJson) {
        try {
            ScreenQvo qvo = JSON.parseObject(strJson, ScreenQvo.class);
            JSONObject json = statisticsEsService.incomeSituation(qvo);
            return ObjEnvelop.getSuccess("查询成功",json);
        } catch (Exception e) {
            e.printStackTrace();
            return ObjEnvelop.getError("查询失败");
        }
    }

+ 36 - 357
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/door/controller/DoorOrderController.java

@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.door.WlyyDoorConclusionDO;
import com.yihu.jw.entity.door.WlyyDoorServiceOrderDO;
import com.yihu.jw.hospital.module.door.dao.WlyyDoorDoctorDao;
import com.yihu.jw.hospital.module.door.dao.WlyyDoorServiceOrderDao;
import com.yihu.jw.hospital.module.door.service.DoorOrderService;
import com.yihu.jw.hospital.module.door.service.WlyyDoorPrescriptionService;
import com.yihu.jw.hospital.module.door.service.WlyyDoorServiceOrderService;
@ -50,11 +48,6 @@ public class DoorOrderController extends EnvelopRestEndpoint {
    @Autowired
    private DoorOrderService doorOrderService;
    @Autowired
    private WlyyDoorDoctorDao doorDoctorDao;
    @Autowired
    private WlyyDoorServiceOrderDao doorServiceOrderDao;
    @Autowired
    private WlyyDoorServiceOrderService wlyyDoorServiceOrderService;
    @Autowired
@ -113,6 +106,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            Map<String, Object> result = wlyyDoorServiceOrderService.getDoctorInfo(qvo);
            return success("查询成功!", result);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -145,6 +139,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            object.put("pageSize", size);
            return success("查询成功", object);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -173,6 +168,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            object.put("pageSize", size);
            return success("查询成功", object);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -191,6 +187,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("提交成功!", result);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -211,6 +208,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("保存成功", result.get(ResponseContant.resultMsg));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
@ -226,6 +224,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            String status = doorOrderService.findDispatchStatusByDoctor(doctor);
            return success("成功", status);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -240,6 +239,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            doorOrderService.updateDispatchStatusByDoctor(doctor, value);
            return success("成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
@ -255,6 +255,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            Map<String, String> map = doorOrderService.getNumGroupByStatusTeam(doctor, type);
            return success("获取成功", map);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -385,6 +386,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("派单成功", result.get(ResponseContant.resultMsg));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
@ -402,6 +404,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            Map<String, String> map = doorOrderService.getNumGroupByStatus(doctor, type, name);
            return success("获取成功", map);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -433,6 +436,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            WlyyDoorServiceOrderDO doorServiceOrderDO = doorOrderService.getDoorServiceOrderById(orderId, level);
            return success("获取成功", doorServiceOrderDO);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -458,6 +462,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
        } catch (RuntimeException se) {
            return failed(se.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -481,6 +486,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("派单成功", result.get(ResponseContant.resultMsg));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -511,18 +517,19 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            WlyyDoorServiceOrderDO wlyyDoorServiceOrderDO = doorOrderService.updateArrivingTime(orderId, arrivingTime);
            return success("修改成功", wlyyDoorServiceOrderDO);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
    @RequestMapping(value = "/urlAnalysis", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
    @ApiOperation("门牌解析上门地址")
    @ResponseBody
    public Envelop urlAnalysis(@ApiParam(name = "url", value = "地址解析", defaultValue = "")
                               @RequestParam(value = "url", required = true) String url) throws Exception {
        try {
            return success("操作成功!", doorOrderService.urlAnalysis(url));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -545,6 +552,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
                return failed("扫码签到失败");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -572,6 +580,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            WlyyDoorConclusionDO doorConclusion = doorOrderService.getDoorConclusion(orderId, true);
            return success("获取成功", doorConclusion);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -591,6 +600,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            WlyyDoorConclusionDO doorConclusion = doorOrderService.updateDoorConclusion(model, examPapeStatus);
            return success("保存成功", doorConclusion);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -649,19 +659,6 @@ public class DoorOrderController extends EnvelopRestEndpoint {
        }
    }
//    @PostMapping("confirmReceipt")
//    @ApiOperation(value = "医生确认线下收款")
//    public Envelop confirmReceipt(
//            @ApiParam(value = "工单id", name = "orderId") @RequestParam(value = "orderId", required = true) String orderId,
//            @ApiParam(name = "level", value = "医院等级,1.三级医院,2.二级医院,3.一级及以下") @RequestParam(value = "level", required = true) Integer level
//    ) {
//        try {
//            return success("获取成功", doorOrderService.confirmReceipt(orderId, level));
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
    @GetMapping("/adminTeamLeader")
    @ApiOperation(value = "判断医生是不是团队长")
    public Envelop adminTeamLeader(@ApiParam(value = "医生id", name = "doctorId") @RequestParam(value = "doctorId", required = true) String doctorId) {
@ -690,6 +687,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("查询成功", doorOrderService.getTeamLeaderAllOrder(doctorId, ss, page, pageSize));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -745,52 +743,6 @@ public class DoorOrderController extends EnvelopRestEndpoint {
    }
//    /**
//     * 获取服务项目
//     */
//    @GetMapping("selectByHospital")
//    @ApiOperation(value = "获取服务项目")
//    public Envelop selectByHospital(
//            @ApiParam(value = "机构code", name = "hospital") @RequestParam(value = "hospital", required = false) String hospital,
//            @ApiParam(value = "服务项目名称", name = "serverItemName") @RequestParam(value = "serverItemName", required = false) String serverItemName) {
//        try {
//            return success("获取成功", "dara", serviceItemService.selectByHospital(hospital, serverItemName));
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//
//    /**
//     * 获取服务项目-上门服务
//     */
//    @GetMapping("selectServiceByHospital")
//    @ApiOperation(value = "获取服务项目-上门服务")
//    public Envelop selectServiceByHospital(
//            @ApiParam(value = "机构code", name = "hospital") @RequestParam(value = "hospital", required = false) String hospital,
//            @ApiParam(value = "服务项目名称", name = "serverItemName") @RequestParam(value = "serverItemName", required = false) String serverItemName,
//            @ApiParam(value = "类型", name = "type") @RequestParam(value = "type", required = false) String type,
//            @ApiParam(value = "居民", name = "patient") @RequestParam(value = "patient", required = false) String patient,
//            @ApiParam(value = "loginUserId", name = "loginUserId") @RequestParam(value = "loginUserId", required = false) String loginUserId
//    ) {
//        try {
//            return success("获取成功", serverPackageService.selectServiceByHospital(hospital, serverItemName, type, patient, loginUserId));
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//
//
//    @RequestMapping(value = "selectServiceTypes", method = RequestMethod.POST)
//    @ResponseBody
//    @ApiOperation(value = "获取服务项目类型-上门服务")
//    public Envelop selectServiceTypes() {
//        try {
//            return success("查询成功", serverPackageService.selectTypes());
//        } catch (Exception ex) {
//            return failed(ex.getMessage());
//        }
//    }
    @PostMapping("updateDoctorInfo")
    @ApiOperation(value = "修改保存服务医生")
    public Envelop updateDoctorInfo(
@ -801,6 +753,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            wlyyDoorServiceOrderService.updateDoctorInfo(jsonData);
            return success("修改成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -815,116 +768,11 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            wlyyDoorServiceOrderService.updateDoctorInfoNoPatient(jsonData);
            return success("修改成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
//    @PostMapping("updatePackageItemInfo")
//    @ApiOperation(value = "修改保存服务项")
//
//    public Envelop updatePackageItemInfo(
//            @ApiParam(value = "jsonData", name = "jsonData")
//            @RequestParam(value = "jsonData", required = false) String jsonData) {
//        try {
//            doorOrderService.updatePackageItemInfo(jsonData);
//            return success("修改成功");
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//    @ApiOperation("社区医院下医生列表查询接口 没分页")
//    @RequestMapping(value = "getDoctorListByHospitalNoPage", method = RequestMethod.POST)
//    @ResponseBody
//    public Envelop getDoctorListByHospitalNoPage(
//            @RequestParam(required = true) String orderId,
//            @RequestParam(required = false) String hospital,
//            @RequestParam(required = false) String name,
//            @RequestParam(required = false) Integer type
//    ) {
//        try {
//            List<JSONObject> array = new ArrayList<>();
//            WlyyDoorServiceOrderDO one = doorServiceOrderDao.findById(orderId).orElse(null);
//            // 被服务的居民的次数(非代理居民)
//            Integer times = wlyyDoorServiceOrderService.countPatientDoorTimes(one.getPatient());
//            List<String> doctors = doorDoctorDao.findDoctors(orderId);
//            List<Map<String, Object>> list = familyContractService.getDoctorsByhospitalNoPage(hospital, name, type, times);
//            if (list != null) {
//                for (Map<String, Object> doctor : list) {
//                    if (doctor == null) {
//                        continue;
//                    }
//                    JSONObject json = new JSONObject();
//                    json.put("id", doctor.get("id"));
//                    // 医生标识
//                    json.put("code", doctor.get("code"));
//                    // 医生姓名
//                    json.put("name", doctor.get("name"));
//                    // 所在医院名称
//                    json.put("hospital", doctor.get("hospital"));
//                    // 所在医院名称
//                    json.put("hospital_name", doctor.get("hospital_name"));
//                    // 科室名称
//                    json.put("dept_name", (doctor.get("dept_name") == null ||
//                            org.apache.commons.lang3.StringUtils.isEmpty(doctor.get("dept_name").toString())) ? " " : doctor.get("dept_name"));
//
//                    json.put("level", doctor.get("level"));
//                    json.put("job", doctor.get("job"));
//                    // 职称名称
//                    json.put("job_name", (doctor.get("job_name") == null ||
//                            org.apache.commons.lang3.StringUtils.isEmpty(doctor.get("job_name").toString())) ? " " : doctor.get("job_name"));
//                    // 头像
//                    json.put("photo", doctor.get("photo"));
//                    // 简介
//                    json.put("introduce", doctor.get("introduce"));
//                    // 专长
//                    json.put("expertise", doctor.get("expertise"));
//                    json.put("flag", doctors.contains(String.valueOf(doctor.get("code"))) ? true : false);
//                    json.put("fixed", one != null && String.valueOf(doctor.get("code")).equals(one.getDoctor()) ? true : false);
//                    //出诊费用
//                    json.put("fee", doctor.get("fee"));
//                    array.add(json);
//                }
//            }
//            // 排序
//            Collections.sort(array, new Comparator<JSONObject>() {
//                @Override
//                public int compare(JSONObject o1, JSONObject o2) {
//                    Integer flag1 = (Boolean) o1.get("flag") ? 2 : 1;
//                    Integer flag2 = (Boolean) o2.get("flag") ? 2 : 1;
//                    if (flag1 - flag2 > 0) {
//                        return -1;
//                    } else if (flag1 - flag2 < 0) {
//                        return 1;
//                    } else {
//                        return 0;
//                    }
//                }
//            });
//            Collections.sort(array, new Comparator<JSONObject>() {
//                @Override
//                public int compare(JSONObject o1, JSONObject o2) {
//                    Integer fixed = (Boolean) o1.get("fixed") ? 2 : 1;
//                    Integer fixed2 = (Boolean) o2.get("fixed") ? 2 : 1;
//                    int sort = fixed - fixed2;
//                    if (sort > 0) {
//                        return -1;
//                    } else if (sort < 0) {
//                        return 1;
//                    } else {
//                        return 0;
//                    }
//                }
//            });
//            return success("获取医院医生列表成功!", array);
//        } catch (RuntimeException se) {
//            return failed(se.getMessage());
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
    @GetMapping(value = "queryDoctorListNotStopped")
    @ApiOperation(value = "服务人员列表(可接单状态的医生列表)")
@ -946,6 +794,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            object.put("pageSize", size);
            return success("查询成功", object);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
@ -967,15 +816,14 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("取消成功", result.get(ResponseContant.resultMsg));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
    @PostMapping(value = "transOrderToOtherOrg")
    @ApiOperation(value = "调度员将工单转接给其他机构")
    public Envelop transOrderToOtherOrg(
            @ApiParam(name = "orderId", value = "工单id") @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(name = "hospital", value = "机构code") @RequestParam(value = "hospital", required = true) String hospital) {
@ -986,9 +834,9 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("转接成功", result.get(ResponseContant.resultMsg));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -1007,15 +855,14 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("转接成功", result.get(ResponseContant.resultMsg));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
    @PostMapping(value = "updateServiceStatus")
    @ApiOperation(value = "更新预约服务项目类型")
    public Envelop updateServiceStatus(
            @ApiParam(name = "id", value = "工单id") @RequestParam(value = "id", required = true) String id) {
        try {
@ -1025,14 +872,13 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("修改成功", result);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
    @GetMapping(value = "orderIsCancel")
    @ApiOperation(value = "查看消息时判断工单是否取消")
    public Envelop orderIsCancel(
            @ApiParam(name = "messageId", value = "消息id", required = true) @RequestParam String messageId) {
        try {
@ -1042,39 +888,25 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("查询成功", result.get(ResponseContant.resultMsg));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
//    @GetMapping(value = "getWorkingTimeByDoctor")
//    @ResponseBody
//    @ApiOperation("获取居民家签机构的上班时间")
//    public Envelop getWorkingTimeByPatient(@RequestParam String patient) {
//        try {
//            return success("查询成功", hospitalService.getWorkingTimeByPatient(patient));
//        } catch (RuntimeException se) {
//            return failed(se.getMessage());
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
    @PostMapping(value = "cancelConclusion")
    @ResponseBody
    @ApiOperation("取消登记服务小结")
    public Envelop cancelConclusion(@ApiParam(name = "orderId", value = "工单id", required = true) @RequestParam String orderId) {
        try {
            wlyyDoorServiceOrderService.cancelConclusion(orderId);
            return success("取消成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
    @PostMapping(value = "createPrescription")
    @ResponseBody
    @ApiOperation("上门服务前手工开方接口")
    public Envelop createPrescription(@ApiParam(name = "orderId", value = "工单id", required = true) @RequestParam String orderId,
                                      @ApiParam(name = "prescriptionCode", value = "处方单号,多个用逗号隔开", required = true) @RequestParam String prescriptionCode,
@ -1086,13 +918,13 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("开方完成");
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
    @PostMapping(value = "updateDoctorStatus")
    @ResponseBody
    @ApiOperation("更新医生地理位置状态")
    public Envelop updateDoctorStatus(@ApiParam(name = "positionStatus", value = "医生地理位置状态", required = true) @RequestParam Integer positionStatus,
                                      @ApiParam(name = "position", value = "地理位置,用逗号隔开", required = false) @RequestParam String position) {
@ -1100,108 +932,13 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            wlyyDoorServiceOrderService.updateDoctorStatus(getUID(), positionStatus, position);
            return success("更新完成");
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
//    @GetMapping(value = "getPrescription")
//    @ResponseBody
//    @ApiOperation("获取长处方信息")
//    public Envelop getPrescription(@ApiParam(name = "patient", value = "居民code") @RequestParam(required = true) String patient,
//                                   @ApiParam(name = "visitDept", value = "挂号科室编码") @RequestParam(required = false) String visitDept,
//                                   @ApiParam(name = "visitTimeFrom", value = "开始时间") @RequestParam(required = false) String visitTimeFrom,
//                                   @ApiParam(name = "visitTimeEnd", value = "结束时间") @RequestParam(required = false) String visitTimeEnd) {
//        try {
//            JSONArray json = doorPrescriptionService.getPrescription(getUID(), patient, visitDept, visitTimeFrom, visitTimeEnd);
//            return success("获取成功", json);
//        } catch (RuntimeException se) {
//            return failed(se.getMessage());
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//    @PostMapping(value = "createDoorPrescription")
//    @ResponseBody
//    @ApiOperation("开方接口")
//    public Envelop createDoorPrescription(@ApiParam(name = "orderId", value = "订单id", required = true) @RequestParam String orderId,
//                                          @ApiParam(name = "jsonData", value = "有关处方相关数据", required = true) @RequestParam String jsonData) {
//        try {
//            JSONObject jsonObject = doorPrescriptionService.createDoorPrescription(orderId, jsonData, getUID());
//            if (jsonObject.getInteger("status") == 200) {
//                return success("开方成功", jsonObject.get("data"));
//            } else {
//                return failed(jsonObject.getString("msg"));
//            }
//        } catch (RuntimeException se) {
//            return failed(se.getMessage());
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//    @GetMapping(value = "getPrescriptionByCode")
//    @ResponseBody
//    @ApiOperation("获取长处方详情")
//    public Envelop getPrescriptionByCode(@ApiParam(name = "recipeNo", value = "医嘱号", required = true)
//                                         @RequestParam String recipeNo,
//                                         @ApiParam(name = "patientCode", value = "居民code", required = true)
//                                         @RequestParam String patientCode) {
//        try {
//            JSONObject json = doorPrescriptionService.getPrescriptionByCode(recipeNo, patientCode);
//            return success("获取成功", json);
//        } catch (RuntimeException se) {
//            return success(se.getMessage());
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//    @PostMapping(value = "cancelPrescriptionByCode")
//    @ResponseBody
//    @ApiOperation("取消开方")
//    public Envelop cancelPrescriptionByCode(@ApiParam(name = "prescriptionCode", value = "处方表code", required = true)
//                                            @RequestParam String prescriptionCode) {
//        try {
//            JSONObject result = jwDoorPrescriptionService.fadeRecipeUnion(prescriptionCode, getUID());
//            if (result.getInteger("status") == 200) {
//                return success("取消成功", result.getString("msg"));
//            } else {
//                return failed(result.getString("msg"));
//            }
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//    @PostMapping(value = "skipPrescription")
//    @ResponseBody
//    @ApiOperation("跳过开方")
//    public Envelop skipPrescription(@ApiParam(name = "orderId", value = "订单id", required = true) @RequestParam String orderId) {
//        try {
//            doorPrescriptionService.skipPrescriptionByOrderId(orderId);
//            return success("成功跳过");
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//    @RequestMapping(value = "/findDictByName", method = RequestMethod.GET)
//    @ApiOperation(value = "药品列表")
//    public Envelop findDictByName(@ApiParam(name = "name", value = "药品名称(中文或拼音首字母查询)", defaultValue = "胰岛素")
//                                  @RequestParam(value = "name", required = false) String name,
//                                  @ApiParam(name = "subjectClass", value = "药品科目, 0101西成药,0103中草药", required = true)
//                                  @RequestParam(value = "subjectClass") String subjectClass) {
//        try {
//            return success("操作成功!", zyDictService.findDictByDoctorAndName(getUID(), name, null, subjectClass));
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
    @PostMapping(value = "proxyUpdate")
    @ApiOperation(value = "上门服务-工单编辑")
    public Envelop proxyUpdate(@ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
        try {
@ -1211,6 +948,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            }
            return success("修改成功!");
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -1228,60 +966,11 @@ public class DoorOrderController extends EnvelopRestEndpoint {
            List<Map<String, Object>> list = wlyyDoorServiceOrderService.getDoorPatientList(teamCode, getUID(), patientName, page, pageSize);
            return success("获取成功", list);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
//    @PostMapping(value = "saveAuthorizeImage")
//    @ResponseBody
//    @ApiOperation("保存电子健康卡图片")
//    public Envelop saveAuthorizeImage(@ApiParam(name = "orderId", value = "订单id", required = true) @RequestParam String orderId,
//                                      @ApiParam(name = "authorizeImage", value = "电子健康卡授权图片", required = true) @RequestParam String authorizeImage) {
//        try {
//            doorPrescriptionService.saveAuthorizeImage(orderId, authorizeImage);
//            return success("保存成功");
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//    //ca认证
//    @ApiOperation("请求实名软证书并进行数字签名")
//    @ResponseBody
//    @RequestMapping(value = "/requestRealNameSoftCertAndSign", method = RequestMethod.POST)
//    public Envelop requestRealNameSoftCertAndSign(
//            @ApiParam(required = true, name = "strRealNameSoftCertCalledPasswd", value = "证书被调用保护口令")
//            @RequestParam(value = "strRealNameSoftCertCalledPasswd", required = true) String strRealNameSoftCertCalledPasswd,
//            @ApiParam(name = "strOriginalData", value = "原文")
//            @RequestParam(value = "strOriginalData", required = false) String strOriginalData,
//            @ApiParam(required = true, name = "prescriptionCode", value = "处方code")
//            @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) {
//
//        try {
//            org.json.JSONObject jsonObject = jwDoorPrescriptionService.requestRealNameSoftCertAndSign(getUID(), strRealNameSoftCertCalledPasswd, strOriginalData, prescriptionCode);
//            return success("获取信息成功!", jsonObject);
//        } catch (RuntimeException se) {
//            return failed(se.getMessage());
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
//    @RequestMapping(value = "uploadCaDigital", method = RequestMethod.POST)
//    @ApiOperation("上传基位ca认证信息")
//    public Envelop uploadCaDigital(
//            @ApiParam(name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode
//    ) {
//        try {
//            JSONObject json = jwDoorPrescriptionService.uploadCaDigital(prescriptionCode);
//            if (json.getInteger("status") == -1) {
//                return failed(json.getString("msg"));
//            }
//            return success("上传ca认证信息成功");
//        } catch (Exception e) {
//            return failed(e.getMessage());
//        }
//    }
    @RequestMapping(value = "/getIcd10Info", method = RequestMethod.GET)
    @ApiOperation(value = "获取诊断结果")
@ -1293,6 +982,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
        try {
            return success("操作成功!", doorPrescriptionService.getIcd10Info(nameKey, page, pageSize));
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -1309,26 +999,14 @@ public class DoorOrderController extends EnvelopRestEndpoint {
                isManage = getCurrentRoleIsManange(doctorId);
            }
            if ("1".equals(isManage) && StringUtils.isBlank(hospital)) {
                //如果是管理员并且未筛选机构,就默认展示其管理下所有机构
                //这边先注释-用到的时候在改20231011
//                String level = getCurrentRoleLevel();
//                String currentRoleCode = getCurrentRoleCode();
//                if (level.equals("2")) {
//                    //市管理员
//                    hospital = currentRoleCode.substring(0, currentRoleCode.length() - 2) + "%";
//                } else if (level.equals("3")) {
//                    //区管理员
//                    hospital = currentRoleCode + "%";
//                } else if (level.equals("4")) {
//                    //机构管理员
//                    hospital = currentRoleCode;
//                }
            } else if (StringUtils.isNotBlank(hospital) && hospital.length() < 10) {
                hospital += "%";
            }
            Map<String, String> map = doorOrderService.getAdministratorStatusBarNum(hospital);
            return success("获取成功", map);
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }
@ -1411,6 +1089,7 @@ public class DoorOrderController extends EnvelopRestEndpoint {
                return failed("请检查工单");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return failed(e.getMessage());
        }
    }