Quellcode durchsuchen

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

lyr vor 8 Jahren
Ursprung
Commit
f662a86d61

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

@ -821,6 +821,8 @@ public class DoctorInfoService extends BaseService {
            }
        }
        Doctor newD = doctorDao.findByCode(newDoctorCode);
        String oldDoctorHealthName = signFamily.getDoctorHealthName();
        //修改签约中的健康管理师
        signFamily.setDoctorHealth(newD.getCode());
        signFamily.setDoctorHealthName(newD.getName());
@ -840,17 +842,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);
    }
@ -909,10 +924,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;
@ -1046,6 +1068,7 @@ public class DoctorInfoService extends BaseService {
        }
        Doctor newD = doctorDao.findByCode(newDoctorCode);
        String oldDoctorName = signFamily.getDoctorName();
        //修改签约中的全科医生
        signFamily.setDoctor(newD.getCode());
        signFamily.setDoctorName(newD.getName());
@ -1064,13 +1087,20 @@ 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);
    }
}

+ 32 - 12
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -1656,6 +1656,7 @@ public class FamilyContractService extends BaseService {
                result.put("msg", "医生不存在");
                return result;
            }
            String oldDoctorHealthName = signFamily.getDoctorHealthName();
            if (StringUtils.isNotEmpty(signFamily.getDoctorHealth())) {
                //判断患者对旧的健管师是否存在健康咨询
                ConsultTeam consultTeam = consultTeamDao.findByParientCodeAndSignTypeAndDoctor(patient, signFamily.getDoctorHealth(), 2);
@ -1674,19 +1675,32 @@ public class FamilyContractService extends BaseService {
                }
                JSONObject data = new JSONObject();
                data.put("first", "因签约团队内分工调整,您的责任医生有变动," + signFamily.getDoctorHealthName() +
                data.put("toUser", patient);
                data.put("doctor", docHealth.getCode());
                data.put("doctorName", docHealth.getName());
                data.put("first", p.getName() + ",您好!因签约团队内分工调整,您的责任医生有变动," + oldDoctorHealthName +
                        "医生无法继续为您服务,具体变动如下:");
                data.put("keyword1", "家庭签约");
                data.put("keyword1", "家庭医生");
                data.put("keyword2", docHealth.getName());
                data.put("remark", signFamily.getDoctorName() + "医生与" + docHealth.getName() +
                        "医生一道,为您提供优质健康服务");
                if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
                    data.put("remark", docHealth.getName() + "医生将专门为您提供优质健康服务");
                } else {
                    data.put("remark", docHealth.getName() + "医生与" + signFamily.getDoctorName() + "医生一道,为您提供优质健康服务");
                }
                wxMessages.add(data);
            } else {
                JSONObject data = new JSONObject();
                data.put("first", "您的签约团队新增一位责任医生,其将与" + signFamily.getDoctorName() +
                        "医生一道,为您提供优质健康管理服务,医生信息如下:");
                data.put("keyword1", "家庭签约");
                data.put("toUser", patient);
                data.put("doctor", docHealth.getCode());
                data.put("doctorName", docHealth.getName());
                data.put("first", p.getName() + ",您好!您的签约团队已为您新增一位责任医生,医生信息如下:");
                data.put("keyword1", "家庭医生");
                data.put("keyword2", docHealth.getName());
                if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
                    data.put("remark", docHealth.getName() + "医生将专门为您提供优质的健康服务");
                } else {
                    data.put("remark", docHealth.getName() + "医生与" + signFamily.getDoctorName() + "医生一道,为您提供优质健康服务");
                }
                wxMessages.add(data);
            }
            // 新增团队信息
@ -1717,6 +1731,7 @@ public class FamilyContractService extends BaseService {
                result.put("msg", "医生不存在");
                return result;
            }
            String oldDoctorName = signFamily.getDoctorName();
            if (StringUtils.isNotEmpty(signFamily.getDoctor())) {
                DoctorTeamMember teamMember = doctorTeamDoctor.findMemberByTeamAndQkCode(signFamily.getTeamCode(), signFamily.getDoctor());
@ -1747,13 +1762,18 @@ public class FamilyContractService extends BaseService {
            signFamily.setCzrq(new Date());
            JSONObject data = new JSONObject();
            data.put("first", "因签约团队内分工调整,您的责任医生有变动," + signFamily.getDoctorName() +
            data.put("toUser", patient);
            data.put("doctor", docQk.getCode());
            data.put("doctorName", docQk.getName());
            data.put("first", p.getName() + ",您好!因签约团队内分工调整,您的责任医生有变动," + oldDoctorName +
                    "医生无法继续为您服务,具体变动如下:");
            data.put("keyword1", "家庭签约");
            data.put("keyword1", "家庭医生");
            data.put("keyword2", docQk.getName());
            data.put("remark", docQk.getName() + "医生" +
                    (StringUtils.isNotEmpty(signFamily.getDoctorHealthName()) ? ("与" + signFamily.getDoctorHealthName() + "医生一道") : "") +
                    ",为您提供优质健康服务");
            if (StringUtils.isEmpty(signFamily.getDoctorHealth()) || signFamily.getDoctor().equals(signFamily.getDoctorHealth())) {
                data.put("remark", docQk.getName() + "医生将专门为您提供优质健康服务");
            } else {
                data.put("remark", docQk.getName() + "医生与" + signFamily.getDoctorHealthName() + "医生一道,为您提供优质健康服务");
            }
            wxMessages.add(data);
        }

+ 6 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java

@ -238,7 +238,11 @@ public class PushMsgTask {
            m.put("remark", remark);
            String temp_id = "";
            if (type == 3) {
                temp.setUrl(url + "yszx/html/consulting-doctor.html?openid=" + openid + "&consult=" + json.getString("consult") + "&toUser=" + json.getString("toUser"));
                if (json.has("isPublic") && json.getInt("isPublic") == 1) {
                    temp.setUrl(url + "jbsq/html/public-consult-detail.html?openid=" + openid + "&code=" + json.getString("consult") + "&toUser=" + json.getString("toUser"));
                } else {
                    temp.setUrl(url + "yszx/html/consulting-doctor.html?openid=" + openid + "&consult=" + json.getString("consult") + "&toUser=" + json.getString("toUser"));
                }
                temp_id = SystemConf.getInstance().getSystemProperties().getProperty("template_consult_notice");
                temp.setTemplate_id(temp_id);
                WechatTemplateData keyword1 = new WechatTemplateData();
@ -407,7 +411,7 @@ public class PushMsgTask {
                keyword5.setValue(json.getString("remark"));
                m.put("remark", keyword5);
            } else if (type == 10){
                temp.setUrl("");
                temp.setUrl(url + "qygl/html/signing-doctors.html?openid=" + openid + "&state=" + openid + "&toUser=" + json.getString("toUser"));
                temp.setTemplate_id(SystemConf.getInstance().getSystemProperties()
                        .getProperty("template_healthy_article"));
                WechatTemplateData keyword1 = new WechatTemplateData();

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultPublicController.java

@ -230,6 +230,7 @@ public class DoctorConsultPublicController extends BaseController {
			if (consultPublicService.addDoctorReply(reply) != null) {
				Patient p = patientService.findByCode(cp.getPatient());
				JSONObject json = new JSONObject();
				json.put("isPublic", 1);
				json.put("first", "您的公共咨询有新的回复");
				json.put("toUser", p.getCode());
				json.put("consultcontent", cp.getContent());