|
@ -529,17 +529,11 @@ public class DoorOrderService {
|
|
|
// 获取微信模板
|
|
|
ConsultDo consult = consultDao.queryByRelationCode(orderId);
|
|
|
try {
|
|
|
|
|
|
String patientName=patient.getName()==null?"":patient.getName();
|
|
|
String doctorName=doorServiceOrder.getDoctorName()!=null? doorServiceOrder.getDoctorName() : "";
|
|
|
JSONObject json = new JSONObject();
|
|
|
if(consult != null) {
|
|
|
String consultStr = consult.getId();
|
|
|
json.put("consult", consult.getId());
|
|
|
}
|
|
|
String first = patientName+",您好!您的上门预约服务已由【"+doctorName+"】医生接单了";
|
|
|
logger.info("上门服务已接单推送前");
|
|
|
//url + json.getString("url") + "?openid=" + openid + "&consult=" + json.getString("consult")
|
|
|
messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","smyyyjjd",patient.getOpenid(),first,null,null,DateUtil.dateToStrShort(new Date()),"上门服务已接单");
|
|
|
logger.info("上门服务已接单推送前");
|
|
|
messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","smyyyjjd",patient.getOpenid(),null,doorServiceOrder.getPatient(),doorServiceOrder.getDoctor(),30,json);
|
|
|
}catch (Exception e){
|
|
|
logger.error(e.getMessage());
|
|
|
}
|
|
@ -971,34 +965,10 @@ public class DoorOrderService {
|
|
|
// 获取微信模板 smfwdwk-上门服务待付款
|
|
|
ConsultDo consult = consultDao.queryByRelationCode(orderId);
|
|
|
try {//·
|
|
|
String first = "key1预约上门服务医生已完成服务。为提高服务质量,诚邀您对本次服务医生进行评分";
|
|
|
first = first.replace("key1", DateUtil.dateToStr(new Date(), "yyyy-MM-dd HH:mm"));
|
|
|
first = first .replace("key2", null != one.getDoctorName() ? one.getDoctorName() : "");
|
|
|
WlyyDoorCommentDO wlyyDoorCommentDO = doorCommentDao.selectCommentDoctor(patient.getId(),orderId);
|
|
|
JSONObject json = new JSONObject();
|
|
|
String finish="";
|
|
|
if(wlyyDoorCommentDO!=null){
|
|
|
finish = "0";
|
|
|
|
|
|
}else {
|
|
|
finish = "1";
|
|
|
|
|
|
}
|
|
|
//url:url + json.getString("url")+"?openid=" + openid + "&id=" + json.getString("id")+ "&finish=" + finish)
|
|
|
messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),first,null,null,DateUtil.dateToStrShort(new Date()),"服务医生评分");
|
|
|
/* WechatTemplateConfig templateConfig = templateConfigDao.findByScene("template_process_feedback","fwyspf");
|
|
|
String first = templateConfig.getFirst();
|
|
|
first = first.replace("key1", DateUtil.dateToStr(new Date(), "yyyy-MM-dd HH:mm"));
|
|
|
first = first .replace("key2", null != one.getDoctorName() ? one.getDoctorName() : "");
|
|
|
org.json.JSONObject json = new org.json.JSONObject();
|
|
|
json.put("first", first);
|
|
|
json.put("keyword1", DateUtil.dateToStrShort(new Date()));
|
|
|
json.put("keyword2", "服务医生评分");
|
|
|
json.put("url", templateConfig.getUrl());
|
|
|
json.put("remark", templateConfig.getRemark());
|
|
|
json.put("id",orderId);
|
|
|
//json.put("consult",consult.getCode());
|
|
|
WlyyDoorCommentDO wlyyDoorCommentDO = this.DoorCommentDao.selectCommentDoctor(patient.getCode(),orderId);
|
|
|
String finish="";
|
|
|
if(wlyyDoorCommentDO!=null){
|
|
|
finish = "0";
|
|
|
json.put("finish",finish);
|
|
@ -1006,7 +976,8 @@ public class DoorOrderService {
|
|
|
finish = "1";
|
|
|
json.put("finish",finish);
|
|
|
}
|
|
|
pushMsgTask.putWxMsg(tokenUtils.getAccessToken(), 31, patient.getOpenid(), patient.getName(), json);*/
|
|
|
messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),null,patient.getId(),one.getDoctor(),31,json);
|
|
|
|
|
|
}catch (Exception e){
|
|
|
logger.error(e.getMessage());
|
|
|
}
|
|
@ -1053,40 +1024,10 @@ public class DoorOrderService {
|
|
|
// 获取微信模板 fwyspf-服务医生评分
|
|
|
ConsultDo consult = consultDao.queryByRelationCode(orderId);
|
|
|
try {
|
|
|
String first = "key1预约上门服务医生已完成服务。为提高服务质量,诚邀您对本次服务医生进行评分";
|
|
|
first = first.replace("key1", DateUtil.dateToStr(new Date(), "yyyy-MM-dd HH:mm"));
|
|
|
first = first .replace("key2", null != one.getDoctorName() ? one.getDoctorName() : "");
|
|
|
WlyyDoorCommentDO wlyyDoorCommentDO = doorCommentDao.selectCommentDoctor(patient.getId(),orderId);
|
|
|
JSONObject json = new JSONObject();
|
|
|
String finish="";
|
|
|
if(wlyyDoorCommentDO!=null){
|
|
|
finish = "0";
|
|
|
|
|
|
}else {
|
|
|
finish = "1";
|
|
|
|
|
|
}
|
|
|
//url:url + json.getString("url")+"?openid=" + openid + "&id=" + json.getString("id")+ "&finish=" + finish)
|
|
|
messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),first,null,null,DateUtil.dateToStrShort(new Date()),"服务医生评分");
|
|
|
}catch (Exception e){
|
|
|
logger.error(e.getMessage());
|
|
|
}
|
|
|
|
|
|
/* try {
|
|
|
WechatTemplateConfig templateConfig = templateConfigDao.findByScene("template_process_feedback","fwyspf");
|
|
|
String first = templateConfig.getFirst();
|
|
|
first = first.replace("key1", DateUtil.dateToStr(new Date(), "yyyy-MM-dd HH:mm"));
|
|
|
first = first .replace("key2", null != one.getDoctorName() ? one.getDoctorName() : "");
|
|
|
String keyword1 = templateConfig.getKeyword1();
|
|
|
org.json.JSONObject json = new org.json.JSONObject();
|
|
|
json.put("first", first);
|
|
|
json.put("keyword1", DateUtil.dateToStrShort(new Date()));
|
|
|
json.put("keyword2", "服务医生评分");
|
|
|
json.put("url", templateConfig.getUrl());
|
|
|
json.put("remark", templateConfig.getRemark());
|
|
|
json.put("id",orderId);
|
|
|
//json.put("consult",consult.getCode());
|
|
|
WlyyDoorCommentDO wlyyDoorCommentDO = this.DoorCommentDao.selectCommentDoctor(patient.getCode(),orderId);
|
|
|
String finish="";
|
|
|
if(wlyyDoorCommentDO!=null){
|
|
|
finish = "0";
|
|
|
json.put("finish",finish);
|
|
@ -1094,10 +1035,10 @@ public class DoorOrderService {
|
|
|
finish = "1";
|
|
|
json.put("finish",finish);
|
|
|
}
|
|
|
pushMsgTask.putWxMsg(tokenUtils.getAccessToken(), 31, patient.getOpenid(), patient.getName(), json);
|
|
|
messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),null,patient.getId(),one.getDoctor(),31,json);
|
|
|
}catch (Exception e){
|
|
|
logger.error(e.getMessage());
|
|
|
}*/
|
|
|
}
|
|
|
return this.getDoorServiceOrderById(orderId, level);
|
|
|
}
|
|
|
|
|
@ -1416,26 +1357,11 @@ public class DoorOrderService {
|
|
|
ConsultDo consult = consultDao.queryByRelationCode(orderId);
|
|
|
Integer status = 0;
|
|
|
try{
|
|
|
String first = "您的预约服务的服务项目已变更,请及时确认";
|
|
|
first = first.replace("key1",(patient.getName()==null?"":patient.getName()));
|
|
|
first = first .replace("key2", null != order.getDoctorName() ? order.getDoctorName() : "");
|
|
|
String consultStr = consult.getId();
|
|
|
// url1 + json.getString("url")+"?openid=" + openid + "&consult=" + json.getString("consult") + "&status=" + json.getInt("status")
|
|
|
// messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwyspf",patient.getOpenid(),first,null,null,DateUtil.dateToStrShort(new Date()),"服务项目变更确认");
|
|
|
|
|
|
/* WechatTemplateConfig templateConfig = templateConfigDao.findByScene("template_process_feedback","fwxmbgtz");
|
|
|
String first = templateConfig.getFirst();
|
|
|
first = first.replace("key1",(patient.getName()==null?"":patient.getName()));
|
|
|
first = first .replace("key2", null != order.getDoctorName() ? order.getDoctorName() : "");
|
|
|
String keyword1 = templateConfig.getKeyword1();
|
|
|
org.json.JSONObject json = new org.json.JSONObject();
|
|
|
json.put("first", first);
|
|
|
json.put("keyword1", DateUtil.dateToStrShort(new Date()));
|
|
|
json.put("keyword2", "服务项目变更确认");
|
|
|
json.put("url", templateConfig.getUrl());
|
|
|
json.put("remark", templateConfig.getRemark());
|
|
|
json.put("consult",consult.getCode());
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("consult",consult.getId());
|
|
|
json.put("status",status);
|
|
|
//messageUtil.putTemplateWxMessage(wxId,"template_process_feedback","fwxmbgtz",patient.getOpenid(),null,null,null,32,json);
|
|
|
|
|
|
|
|
|
// pushMsgTask.putWxMsg(tokenUtils.getAccessToken(), 32, patient.getOpenid(), patient.getName(), json);*/
|
|
|
}catch (Exception e) {
|