Selaa lähdekoodia

手动上传体征数据没有提醒和健管师与全科同一个人提醒两次问题

zd_123 7 vuotta sitten
vanhempi
commit
ed5321f9ae

+ 20 - 17
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -307,25 +307,28 @@ public class PatientHealthIndexService extends BaseService {
        // 查询病人家庭签约的健康管理师
        SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patientCode);
        String healthDoctorFamily = "";
        String doctotFamily = "";
        String doctorFamily = "";
        /*String doctorName = "";
        String doctorOpenID = "";*/
        if (signFamily != null) {
            healthDoctorFamily = signFamily.getDoctorHealth();
            doctotFamily = signFamily.getDoctor();
            if (StringUtils.isNotEmpty(healthDoctorFamily)) {
            doctorFamily = signFamily.getDoctor();
            if (StringUtils.isNotEmpty(healthDoctorFamily) && StringUtils.isNotEmpty(doctorFamily)){
                // 添加到消息接收人列表
                if (doctorFamily.equals(healthDoctorFamily)){
                    System.out.println("-------------健管师和家医同一个人-------------");
                    receivers.add(healthDoctorFamily);
                }else {
                    System.out.println("-------------健管师和家医不是同一个人-------------");
                    receivers.add(healthDoctorFamily);
                    receivers.add(doctorFamily);
                }
            }else if (StringUtils.isNotEmpty(healthDoctorFamily) && StringUtils.isEmpty(doctorFamily)){
                System.out.println("-------------家医为空-------------");
                receivers.add(healthDoctorFamily);
               /* Doctor doctor = doctorDao.findByCode(healthDoctorFamily);
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();*/
            }
            if (StringUtils.isNotEmpty(doctotFamily)){
                // 添加到消息接收人列表
                receivers.add(signFamily.getDoctor());
                /*Doctor doctor = doctorDao.findByCode(signFamily.getDoctor());
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();*/
            }else if (StringUtils.isNotEmpty(doctorFamily) && StringUtils.isEmpty(healthDoctorFamily)){
                System.out.println("-------------健管师为空-------------");
                receivers.add(doctorFamily);
            }
        }
@ -338,9 +341,9 @@ public class PatientHealthIndexService extends BaseService {
                // 添加到消息接收人列表
                receivers.add(healthDoctorTeam);
            }
            if (StringUtils.isNotEmpty(signFamilySS.getDoctor()) && !StringUtils.equals(doctotFamily, signFamilySS.getDoctor())) {
            if (StringUtils.isNotEmpty(signFamilySS.getDoctor()) && !StringUtils.equals(doctorFamily, signFamilySS.getDoctor())) {
                // 添加到消息接收人列表
                receivers.add(doctotFamily);
                receivers.add(doctorFamily);
            }
        }
        List<Message> messages = new ArrayList<Message>();
@ -573,9 +576,9 @@ public class PatientHealthIndexService extends BaseService {
            } else { //餐前
                if (!checkHealthIndex(NumberUtils.toDouble(value1), maxValueBefore, minValueBefore)) {
                    oldMsgContent += patient.getName() + "血糖异常(" + value1 + "mmol/L)";
                    if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueAfter ,minValueAfter)==1){
                    if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueBefore ,minValueBefore)==1){
                        msgContent = "<a>"+patient.getName()+"</a><span style=\"color: #FF4C4C;\">血糖偏高</span>";
                    }else if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueAfter ,minValueAfter)==2){
                    }else if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueBefore ,minValueBefore)==2){
                        msgContent = "<a>"+patient.getName()+"</a><span style=\"color: #FF4C4C;\">血糖偏低</span>";
                    }
                    updateStatus(data);