소스 검색

Merge branch 'dev' of lyr/patient-co-management into dev

lyr 8 년 전
부모
커밋
09e921154f

+ 43 - 15
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -819,6 +819,8 @@ public class DoctorInfoService extends BaseService {
            }
        }
        Doctor newD = doctorDao.findByCode(newDoctorCode);
        String oldDoctorHealthName = signFamily.getDoctorHealthName();
        //修改签约中的健康管理师
        signFamily.setDoctorHealth(newD.getCode());
        signFamily.setDoctorHealthName(newD.getName());
@ -838,17 +840,30 @@ public class DoctorInfoService extends BaseService {
        Patient p = patientDao.findByCode(patient);
        JSONObject data = new JSONObject();
        if (StringUtils.isNotEmpty(oldDoctorCode)) {
            data.put("first", "因签约团队内分工调整,您的责任医生有变动," + signFamily.getDoctorHealthName() +
            data.put("toUser", patient);
            data.put("doctor", newD.getCode());
            data.put("doctorName", newD.getName());
            data.put("first", p.getName() + ",您好!因签约团队内分工调整,您的责任医生有变动," + oldDoctorHealthName +
                    "医生无法继续为您服务,具体变动如下:");
            data.put("keyword1", "家庭签约");
            data.put("keyword1", "家庭医生");
            data.put("keyword2", newD.getName());
            data.put("remark", signFamily.getDoctorName() + "医生与" + newD.getName() +
                    "医生一道,为您提供优质健康服务");
            if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
                data.put("remark", newD.getName() + "医生将专门为您提供优质健康服务");
            } else {
                data.put("remark", newD.getName() + "医生与" + signFamily.getDoctorName() + "医生一道,为您提供优质健康服务");
            }
        } else {
            data.put("first", "您的签约团队新增一位责任医生,其将与" + signFamily.getDoctorName() +
                    "医生一道,为您提供优质健康管理服务,医生信息如下:");
            data.put("keyword1", "家庭签约");
            data.put("toUser", patient);
            data.put("doctor", newD.getCode());
            data.put("doctorName", newD.getName());
            data.put("first", p.getName() + ",您好!您的签约团队已为您新增一位责任医生,医生信息如下:");
            data.put("keyword1", "家庭医生");
            data.put("keyword2", newD.getName());
            if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
                data.put("remark", newD.getName() + "医生将专门为您提供优质的健康服务");
            } else {
                data.put("remark", newD.getName() + "医生与" + signFamily.getDoctorName() + "医生一道,为您提供优质健康服务");
            }
        }
        PushMsgTask.getInstance().putWxMsg(accessTokenUtils.getAccessToken(), 10, p.getOpenid(), p.getName(), data);
    }
@ -918,10 +933,17 @@ public class DoctorInfoService extends BaseService {
        Patient p = patientDao.findByCode(patient);
        JSONObject data = new JSONObject();
        data.put("first", "您的签约团队新增一位责任医生,其将与" + signFamily.getDoctorName() +
                "医生一道,为您提供优质健康管理服务,医生信息如下:");
        data.put("keyword1", "家庭签约");
        data.put("toUser", patient);
        data.put("doctor", newD.getCode());
        data.put("doctorName", newD.getName());
        data.put("first", p.getName() + ",您好!您的签约团队已为您新增一位责任医生,医生信息如下:");
        data.put("keyword1", "家庭医生");
        data.put("keyword2", newD.getName());
        if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
            data.put("remark", newD.getName() + "医生将专门为您提供优质的健康服务");
        } else {
            data.put("remark", newD.getName() + "医生与" + signFamily.getDoctorName() + "医生一道,为您提供优质健康服务");
        }
        PushMsgTask.getInstance().putWxMsg(accessTokenUtils.getAccessToken(), 10, p.getOpenid(), p.getName(), data);
        return 1;
@ -1066,6 +1088,7 @@ public class DoctorInfoService extends BaseService {
        }
        Doctor newD = doctorDao.findByCode(newDoctorCode);
        String oldDoctorName = signFamily.getDoctorName();
        //修改签约中的全科医生
        signFamily.setDoctor(newD.getCode());
        signFamily.setDoctorName(newD.getName());
@ -1084,13 +1107,18 @@ public class DoctorInfoService extends BaseService {
        Patient p = patientDao.findByCode(patient);
        JSONObject data = new JSONObject();
        data.put("first", "因签约团队内分工调整,您的责任医生有变动," + signFamily.getDoctorName() +
        data.put("toUser", patient);
        data.put("doctor", newD.getCode());
        data.put("doctorName", newD.getName());
        data.put("first", p.getName() + ",您好!因签约团队内分工调整,您的责任医生有变动," + oldDoctorName +
                "医生无法继续为您服务,具体变动如下:");
        data.put("keyword1", "家庭签约");
        data.put("keyword1", "家庭医生");
        data.put("keyword2", newD.getName());
        data.put("remark", newD.getName() + "医生" +
                (StringUtils.isNotEmpty(signFamily.getDoctorHealthName()) ? ("与" + signFamily.getDoctorHealthName() + "医生一道") : "") +
                ",为您提供优质健康服务");
        if (StringUtils.isEmpty(signFamily.getDoctorHealth()) || signFamily.getDoctor().equals(signFamily.getDoctorHealth())) {
            data.put("remark", newD.getName() + "医生将专门为您提供优质健康服务");
        } else {
            data.put("remark", newD.getName() + "医生与" + signFamily.getDoctorHealthName() + "医生一道,为您提供优质健康服务");
        }
        PushMsgTask.getInstance().putWxMsg(accessTokenUtils.getAccessToken(), 10, p.getOpenid(), p.getName(), data);
    }
}

+ 13 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -1569,6 +1569,7 @@ public class SignPatientLabelInfoService extends BaseService {
                        " join " : " left join ") +
                "    wlyy_sign_patient_label_info t2 " +
                " ON t1.patient = t2.patient " +
                (teamCode > 0 ? " join (select * from wlyy_sign_patient_label where label_type != '4' or team_code = " + teamCode + " or (label_type = '4' and (label_code in (1,2)))) lb on t2.label = lb.label_code and t2.label_type = lb.label_type " : "") +
                " WHERE " +
                "    t1.status > 0 " +
                "    AND (" + (StringUtils.isNotEmpty(labelCode) || StringUtils.isNotEmpty(labelType) ? "" : " t2.patient is null OR ") + " t2.status = 1) " +
@ -1638,7 +1639,12 @@ public class SignPatientLabelInfoService extends BaseService {
                    }
                }
                List<SignPatientLabelInfo> labels = labelInfoDao.findByPatientAndStatus(sign.get("patient").toString(), 1);
                List<SignPatientLabelInfo> labels = null;
                if(teamCode > 0){
                    labels = labelInfoDao.findByPatientAndStatusByTeam(sign.get("patient").toString(), 1, teamCode);
                } else {
                    labels = labelInfoDao.findByPatientAndStatus(sign.get("patient").toString(), 1);
                }
                JSONObject json = new JSONObject();
@ -1763,7 +1769,12 @@ public class SignPatientLabelInfoService extends BaseService {
                    continue;
                }
                List<SignPatientLabelInfo> labels = labelInfoDao.findByPatientAndStatus(sign.get("patient").toString(), 1);
                List<SignPatientLabelInfo> labels = null;
                if (teamCode > 0) {
                    labels = labelInfoDao.findByPatientAndStatusByTeam(sign.get("patient").toString(), 1, teamCode);
                } else {
                    labels = labelInfoDao.findByPatientAndStatus(sign.get("patient").toString(), 1);
                }
                JSONObject json = new JSONObject();