Sfoglia il codice sorgente

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

huangwenjie 7 anni fa
parent
commit
89b8146fb1

+ 8 - 14
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/AsyncService.java

@ -242,25 +242,16 @@ public class AsyncService extends BaseService{
        logger.info("签约对象--全科医生code===="+signFamily.getDoctor());
        String healthDoctorFamily = "";
        String doctorFamily = "";
        String doctorName = "";
        String doctorOpenID = "";
        if (signFamily != null) {
            healthDoctorFamily = signFamily.getDoctorHealth();
            doctorFamily = signFamily.getDoctor();
            logger.info("全科医生code======"+doctorFamily);
            if (StringUtils.isNotEmpty(healthDoctorFamily)) {
                // 添加到消息接收人列表
                receivers.add(healthDoctorFamily);
                Doctor doctor = doctorDao.findByCode(healthDoctorFamily);
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();
            }
            if (StringUtils.isNotEmpty(doctorFamily)){
                // 添加到消息接收人列表
                receivers.add(doctorFamily);
                Doctor doctor = doctorDao.findByCode(signFamily.getDoctor());
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();
            }
        }
        // 查询病人三师签约中的健康管理师
@ -327,15 +318,17 @@ public class AsyncService extends BaseService{
            }
            if(messageService.getMessageNoticeSettingByMessageType(receiver,"1", MessageNoticeSetting.MessageTypeEnum.healthSignSwitch.getValue())){
                //            新增发送医生助手模板消息 v1.4.0 by wujunjie
                if (StringUtils.isNotEmpty(doctorOpenID)) {
                Doctor doctor = doctorDao.findByCode(receiver);
                if (doctor!=null && StringUtils.isNotEmpty(doctor.getOpenid())) {
                    List<Message> messagesList = messageDao.findUnreadHealthIndex(patientCode, receiver);
                    if (messagesList != null && messagesList.size()>0){
                        logger.info("发送医生助手------start");
                        String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                        List<NameValuePair> params = new ArrayList<>();
                        params.add(new BasicNameValuePair("type", "3"));
                        params.add(new BasicNameValuePair("openId", doctorOpenID));
                        params.add(new BasicNameValuePair("openId", doctor.getOpenid()));
                        params.add(new BasicNameValuePair("url", targetUrl));
                        params.add(new BasicNameValuePair("first", doctorName + "医生,您的签约居民" + patientName +
                        params.add(new BasicNameValuePair("first", doctor.getName() + "医生,您的签约居民" + patientName +
                                "有" + messagesList.size() + "条未读的体征异常消息"));
                        params.add(new BasicNameValuePair("remark", "请进入手机APP查看"));
                        SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
@ -343,7 +336,8 @@ public class AsyncService extends BaseService{
                        String keywords = date + "," + patientName;
                        params.add(new BasicNameValuePair("keywords", keywords));
                        httpClientUtil.post(url, params, "UTF-8");
                        String result = httpClientUtil.post(url, params, "UTF-8");
                        logger.info("医生助手推送结果========"+result);
                    }
                }
            }
@ -379,7 +373,7 @@ public class AsyncService extends BaseService{
    }
    /**
     * 预警
     * 预警.
     * @param patientCode
     * @param patient
     */

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

@ -308,24 +308,24 @@ public class PatientHealthIndexService extends BaseService {
        SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patientCode);
        String healthDoctorFamily = "";
        String doctotFamily = "";
        String doctorName = "";
        String doctorOpenID = "";
        /*String doctorName = "";
        String doctorOpenID = "";*/
        if (signFamily != null) {
            healthDoctorFamily = signFamily.getDoctorHealth();
            doctotFamily = signFamily.getDoctor();
            if (StringUtils.isNotEmpty(healthDoctorFamily)) {
                // 添加到消息接收人列表
                receivers.add(healthDoctorFamily);
                Doctor doctor = doctorDao.findByCode(healthDoctorFamily);
               /* Doctor doctor = doctorDao.findByCode(healthDoctorFamily);
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();
                doctorOpenID = doctor.getOpenid();*/
            }
            if (StringUtils.isNotEmpty(doctotFamily)){
                // 添加到消息接收人列表
                receivers.add(signFamily.getDoctor());
                Doctor doctor = doctorDao.findByCode(signFamily.getDoctor());
                /*Doctor doctor = doctorDao.findByCode(signFamily.getDoctor());
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();
                doctorOpenID = doctor.getOpenid();*/
            }
        }
@ -390,15 +390,17 @@ public class PatientHealthIndexService extends BaseService {
            }
            if(messageService.getMessageNoticeSettingByMessageType(receiver,"1", MessageNoticeSetting.MessageTypeEnum.healthSignSwitch.getValue())){
                //            新增发送医生助手模板消息 v1.4.0 by wujunjie
                if (StringUtils.isNotEmpty(doctorOpenID)) {
                Doctor doctor = doctorDao.findByCode(receiver);
                if (doctor!=null && StringUtils.isNotEmpty(doctor.getOpenid())) {
                    List<Message> messagesList = messageDao.findUnreadHealthIndex(patientCode, receiver);
                    if (messagesList != null && messagesList.size()>0){
                        String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                        System.out.println("医生助手url======"+url);
                        List<NameValuePair> params = new ArrayList<>();
                        params.add(new BasicNameValuePair("type", "3"));
                        params.add(new BasicNameValuePair("openId", doctorOpenID));
                        params.add(new BasicNameValuePair("openId", doctor.getOpenid()));
                        params.add(new BasicNameValuePair("url", targetUrl));
                        params.add(new BasicNameValuePair("first", doctorName + "医生,您的签约居民" + patientName +
                        params.add(new BasicNameValuePair("first", doctor.getName() + "医生,您的签约居民" + patientName +
                                "有" + messagesList.size() + "条未读的体征异常消息"));
                        params.add(new BasicNameValuePair("remark", "请进入手机APP查看"));
                        SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");