|
@ -9,7 +9,6 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
|
import com.yihu.jw.entity.base.im.ConsultDo;
|
|
|
import com.yihu.jw.entity.base.im.ConsultTeamDo;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.entity.base.wx.WxTemplateConfigDO;
|
|
|
import com.yihu.jw.entity.door.*;
|
|
|
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
|
|
|
import com.yihu.jw.file_upload.FileUploadService;
|
|
@ -1576,20 +1575,20 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO
|
|
|
ConsultDo consult = consultDao.queryByRelationCode(orderId);
|
|
|
// 发送微信模板消息,通知居民工单已取消(smyyyqx-上门预约已取消)
|
|
|
BasePatientDO patient = patientService.findPatientById(orderDO.getPatient());
|
|
|
WxTemplateConfigDO templateConfig = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndScene("xm_test_ihealth_wx", "template_process_feedback", "smyyyqx");
|
|
|
String first = templateConfig.getFirst().replace("key1", null != patient.getName() ? patient.getName() : "");
|
|
|
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());
|
|
|
if (consult != null) {
|
|
|
json.put("consult", consult.getId());
|
|
|
} else {
|
|
|
json.put("id", orderDO.getId());
|
|
|
}
|
|
|
pushMsgTask.putWxMsg(tokenUtils.getAccessToken(), 30, patient.getOpenid(), patient.getName(), json);
|
|
|
// WxTemplateConfigDO templateConfig = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndScene("xm_test_ihealth_wx", "template_process_feedback", "smyyyqx");
|
|
|
// String first = templateConfig.getFirst().replace("key1", null != patient.getName() ? patient.getName() : "");
|
|
|
// 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());
|
|
|
// if (consult != null) {
|
|
|
// json.put("consult", consult.getId());
|
|
|
// } else {
|
|
|
// json.put("id", orderDO.getId());
|
|
|
// }
|
|
|
// pushMsgTask.putWxMsg(tokenUtils.getAccessToken(), 30, patient.getOpenid(), patient.getName(), json);
|
|
|
|
|
|
// 工单状态变更记录
|
|
|
WlyyDoorProcessLogDO processLogDO = new WlyyDoorProcessLogDO();
|