Browse Source

Merge branch 'dev' of wangjun/wlyy2.0 into dev

wangzhinan 4 years ago
parent
commit
57fe16d126

+ 27 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -10170,4 +10170,31 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return outpatient;
    }
    public String savePrescriptionToDoorService(String orderId,String prescriptionId){
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById("doorServiceUrl");
        String url = "";
        if (wlyyHospitalSysDictDO!=null){
            url = wlyyHospitalSysDictDO.getDictValue();
        }
        logger.info("url:"+url);
        String res = "";
        Map map = new HashMap();
        map.put("orderId",orderId);
        map.put("prescriptionCode",prescriptionId);
        logger.info("入参:"+map);
        try {
            res = httpClientUtil.httpPost(url,map);
            logger.info("调用保存上门开方信息接口返回结果=>"+res);
            if (StringUtils.isNoneBlank(res)){
                com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(res);
                if ("200".equalsIgnoreCase(jsonObject.getString("status"))){
                    return jsonObject.getString("msg");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "接口调用失败";
    }
}

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -532,6 +532,7 @@ public class BaseHospitalRequestMapping {
        public static final String findPatNoByPatient = "/findPatNoByPatient";
        public static final String appletSign= "/appletSign";
        public static final String doorServiceTest= "/doorServiceTest";
    }
    public static class YkyyPrescription extends BaseHospitalRequestMapping.Basic {

+ 16 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -512,7 +512,9 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                    @ApiParam(name = "prescriptionId", value = "处方id")
                                        @RequestParam(value = "prescriptionId", required = false)String prescriptionId,
                                    @ApiParam(name = "hisId", value = "审方唯一标识")
                                        @RequestParam(value = "hisId", required = false)String hisId)throws Exception {
                                        @RequestParam(value = "hisId", required = false)String hisId,
                                    @ApiParam(name = "orderId", value = "上门服务订单号")
                                        @RequestParam(value = "orderId", required = false)String orderId)throws Exception {
        Map<String,Object> result = prescriptionService.makeDiagnosis(outPatientId,prescriptionId,advice,type,infoJsons,diagnosisJson,inspectionJson,emrJson,hisId);
        try {
@ -535,6 +537,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(outPatientId);
            String immsg = imService.pushHuiZhenMsg(msgObj,wlyyOutpatientDO.getDoctor(),wlyyOutpatientDO.getDoctorName(),outPatientId,wlyyOutpatientDO.getPatient(),wlyyOutpatientDO.getOutpatientType());
            System.out.println("发送诊断消息成功:"+immsg);
            if (result.get("prescriptionId")!=null&&StringUtils.isNoneBlank(orderId)){
              prescriptionService.savePrescriptionToDoorService(orderId,result.get("prescriptionId").toString());
            }
        }catch (Exception e){
            System.out.println("发送诊断消息失败:"+e.getMessage());
//            e.printStackTrace();
@ -2357,7 +2363,16 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.doorServiceTest)
    @ApiOperation(value = "测试上门复诊数据同步")
    public Envelop doorServiceTest(
            @ApiParam(name = "orderId", value = "orderId")
            @RequestParam(value = "orderId",defaultValue = "",required = false) String orderId,
            @ApiParam(name = "prId", value = "prId")
            @RequestParam(value = "prId",defaultValue = "",required = false) String prId) throws Exception {
        return success(prescriptionService.savePrescriptionToDoorService(orderId,prId));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.selectMzRecord)
    @ApiOperation(value = "查询门诊记录下的患者列表")
    public Envelop selectMzRecord(