|
@ -803,6 +803,38 @@ public class ConsultController extends WeixinBaseController {
|
|
|
return invalidUserException(new RuntimeException(resObj.getString("message")), -1, "追问失败!" + resObj.getString("message"));
|
|
|
}
|
|
|
failed.add(String.valueOf(resObj.get("data")));
|
|
|
try {
|
|
|
// 新增发送医生助手模板消息 v1.4.0 by wujunjie
|
|
|
Doctor doctor = doctorDao.findByCode(log.getDoctor());
|
|
|
String doctorOpenID = doctor.getOpenid();
|
|
|
if (StringUtils.isNotEmpty(doctorOpenID)) {
|
|
|
String title = "";
|
|
|
Consult consultSingle = consultDao.findByCode(log.getConsult());
|
|
|
if (consultSingle!=null){
|
|
|
Integer singleType = consultSingle .getType();
|
|
|
if (singleType != null && singleType ==8 ){
|
|
|
title = consultSingle.getTitle();
|
|
|
}else if(singleType != null && singleType !=8 ){
|
|
|
title = consultSingle.getSymptoms();
|
|
|
}
|
|
|
String first = "居民" +patient.getName()+"的健康咨询有新的回复。";
|
|
|
String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
params.add(new BasicNameValuePair("type", "8"));
|
|
|
params.add(new BasicNameValuePair("openId", doctorOpenID));
|
|
|
params.add(new BasicNameValuePair("url", targetUrl));
|
|
|
params.add(new BasicNameValuePair("first", first));
|
|
|
params.add(new BasicNameValuePair("remark", "请进入手机APP查看"));
|
|
|
String keywords = title + "," + content +","+ log.getDoctorName();
|
|
|
params.add(new BasicNameValuePair("keywords", keywords));
|
|
|
|
|
|
httpClientUtil.post(url, params, "UTF-8");
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
return write(200, "追问成功!", "data", failed);
|
|
@ -1067,6 +1099,29 @@ public class ConsultController extends WeixinBaseController {
|
|
|
|
|
|
// 推送消息给医生
|
|
|
pushMsgTask.put(doctor, MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.D_CT_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_PRESCRIPTION.续方咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_FAMOUS_CONSULT_TEAM_PRESCRIPTION.您有新的续方咨询.name(), consult.getConsult());
|
|
|
try {
|
|
|
// 新增发送医生助手模板消息 v1.4.0 by wujunjie
|
|
|
Doctor doctor1 = doctorDao.findByCode(doctor);
|
|
|
Patient patient = patientDao.findByCode(getRepUID());
|
|
|
String doctorOpenID = doctor1.getOpenid();
|
|
|
if (StringUtils.isNotEmpty(doctorOpenID)) {
|
|
|
String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
|
|
|
List<NameValuePair> params = new ArrayList<>();
|
|
|
params.add(new BasicNameValuePair("type", "9"));
|
|
|
params.add(new BasicNameValuePair("openId", doctorOpenID));
|
|
|
params.add(new BasicNameValuePair("url", targetUrl));
|
|
|
params.add(new BasicNameValuePair("first", doctor1.getName() + "医生您好。您的签约居民"+patient.getName()+"申请线上续方,请尽快审核。"));
|
|
|
params.add(new BasicNameValuePair("remark", "请进入手机APP查看"));
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
|
|
|
String date = format.format(new Date());
|
|
|
String keywords = "续方审核" + "," + date;
|
|
|
params.add(new BasicNameValuePair("keywords", keywords));
|
|
|
|
|
|
httpClientUtil.post(url, params, "UTF-8");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
BusinessLogs.info(BusinessLogs.BusinessType.consult, getRepUID(), getUID(), new JSONObject(consult));
|
|
|
return write(200, "提交成功", "data", consult);
|
|
|
|