Browse Source

修改bug

wangzhinan 5 months ago
parent
commit
116c62e5af

+ 2 - 2
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -3986,7 +3986,7 @@ public class ImService {
			}else {
				sql +=" AND  op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' ";
			}*/
            sql = sql + " AND op.type in ('1','2') AND op.outpatient_type = 3 ";
            sql = sql + " AND op.type in ('1','2') AND op.outpatient_type in(3,4,5) ";
            sql = sql + " ORDER BY op.create_time DESC";
        }
@ -4791,7 +4791,7 @@ public class ImService {
////                    sql += " AND  op.register_date >= '" + DateUtil.dateToStrShort(new Date()) + " 00:00:00' ";//不加今日待办
//                }
//            }
            sql = sql + " AND op.type in ('1','2') AND op.outpatient_type = 3 ";
            sql = sql + " AND op.type in ('1','2') AND op.outpatient_type in(3,4,5) ";
            sql = sql + " ORDER BY op.create_time DESC";
        }

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

@ -792,34 +792,26 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                    @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 {
            com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();
            List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = (List<WlyyPrescriptionDiagnosisDO>) com.alibaba.fastjson.JSONArray.parseArray(diagnosisJson, WlyyPrescriptionDiagnosisDO.class);
            String zd_str = "";
            String jl_str = advice;
            for (WlyyPrescriptionDiagnosisDO diagnosisDO : diagnosisDOs) {
                if ("1".equals(diagnosisDO.getType())) {
                    zd_str += diagnosisDO.getName() + "," + zd_str;
                } else {
                    zd_str += diagnosisDO.getName() + ",";
                }
            }
            zd_str = zd_str.substring(0, zd_str.length() - 1);
            msgObj.put("zd", zd_str);
            msgObj.put("jl", jl_str);
            msgObj.put("outpatientid", outPatientId);
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(outPatientId).orElse(null);
            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());
        com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();
        List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = (List<WlyyPrescriptionDiagnosisDO>) com.alibaba.fastjson.JSONArray.parseArray(diagnosisJson, WlyyPrescriptionDiagnosisDO.class);
        String zd_str = "";
        String jl_str = advice;
        for (WlyyPrescriptionDiagnosisDO diagnosisDO : diagnosisDOs) {
            if ("1".equals(diagnosisDO.getType())) {
                zd_str += diagnosisDO.getName() + "," + zd_str;
            } else {
                zd_str += diagnosisDO.getName() + ",";
            }
        } catch (Exception e) {
            System.out.println("发送诊断消息失败:" + e.getMessage());
//            e.printStackTrace();
        }
        zd_str = zd_str.substring(0, zd_str.length() - 1);
        msgObj.put("zd", zd_str);
        msgObj.put("jl", jl_str);
        msgObj.put("outpatientid", outPatientId);
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(outPatientId).orElse(null);
        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());
        }
        return success(result);
    }