|
@ -241,25 +241,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();
|
|
|
}
|
|
|
}
|
|
|
// 查询病人三师签约中的健康管理师
|
|
@ -326,15 +317,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");
|
|
@ -342,7 +335,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);
|
|
|
}
|
|
|
}
|
|
|
}
|