|
|
|
@ -2,6 +2,7 @@ package com.ynxbd.push.service; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.ynxbd.push.config.IniConfig; |
|
|
|
|
import com.ynxbd.push.entity.enums.HisApiEnum; |
|
|
|
|
import com.ynxbd.push.entity.enums.MsgParamEnum; |
|
|
|
|
import com.ynxbd.push.entity.response.ResponseResult; |
|
|
|
@ -63,8 +64,9 @@ public class HisUniversalService { |
|
|
|
|
* |
|
|
|
|
* @param paramsMap 入参map |
|
|
|
|
* @param templateId 模板ID |
|
|
|
|
* @param url [传递null时,从请求中取值;传递空字符串""时,表示没有链接] |
|
|
|
|
*/ |
|
|
|
|
public Map<String, Object> createTemplate(Map<String, String> paramsMap, String templateId, String title) throws Exception { |
|
|
|
|
public Map<String, Object> createTemplate(Map<String, String> paramsMap, String templateId, String title, String url) throws Exception { |
|
|
|
|
String organizeName = paramsMap.get("organizeName"); |
|
|
|
|
if (ObjectUtils.isEmpty(organizeName)) { |
|
|
|
|
throw new Exception("组织机构代码为空"); |
|
|
|
@ -75,8 +77,10 @@ public class HisUniversalService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String, Object> tempData = new HashMap<>(); |
|
|
|
|
if (url == null) { // 传递值为空,取请求中的url链接
|
|
|
|
|
url = paramsMap.get("url"); |
|
|
|
|
} |
|
|
|
|
// 页面路径[入参url]
|
|
|
|
|
String url = paramsMap.get("url"); |
|
|
|
|
tempData.put(MsgParamEnum.URL.CODE, ObjectUtils.isEmpty(url) ? "" : url); |
|
|
|
|
// tip
|
|
|
|
|
tempData.put(MsgParamEnum.TIP.CODE, MessageTypeEnum.COMMON.CODE); |
|
|
|
@ -114,7 +118,8 @@ public class HisUniversalService { |
|
|
|
|
*/ |
|
|
|
|
public MessageSendResult payment_end_04__001(Map<String, String> paramsMap, String templateId, String title) { |
|
|
|
|
try { |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title); |
|
|
|
|
String url = IniConfig.getWxWebPath(true) + "pay-info.html#/recipe-payed"; |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title, url); |
|
|
|
|
// 就诊人
|
|
|
|
|
String patientName = MsgParamEnum.THING.put(paramsMap, tempData, "patientName", 1); |
|
|
|
|
// 缴费时间
|
|
|
|
@ -142,7 +147,9 @@ public class HisUniversalService { |
|
|
|
|
*/ |
|
|
|
|
private MessageSendResult payment_remind_04__001(Map<String, String> paramsMap, String templateId, String title) { |
|
|
|
|
try { |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title); |
|
|
|
|
String url = IniConfig.getWxWebPath(true) + "pay-info.html#/recipe-unpay"; |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title, url); |
|
|
|
|
|
|
|
|
|
// 患者姓名
|
|
|
|
|
String patientName = MsgParamEnum.THING.put(paramsMap, tempData, "patientName", 14); |
|
|
|
|
// 开单时间
|
|
|
|
@ -170,7 +177,8 @@ public class HisUniversalService { |
|
|
|
|
*/ |
|
|
|
|
private MessageSendResult reg_success_04__001(Map<String, String> paramsMap, String templateId, String title) { |
|
|
|
|
try { |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title); |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title, ""); |
|
|
|
|
|
|
|
|
|
// 就诊人
|
|
|
|
|
String patientName = MsgParamEnum.THING.put(paramsMap, tempData, "patientName", 28); |
|
|
|
|
// 就诊科室
|
|
|
|
@ -197,7 +205,7 @@ public class HisUniversalService { |
|
|
|
|
*/ |
|
|
|
|
private MessageSendResult report_notice_05__001(Map<String, String> paramsMap, String templateId, String title) { |
|
|
|
|
try { |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title); |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title, ""); |
|
|
|
|
// 就诊卡号
|
|
|
|
|
MsgParamEnum.CHARACTER_STRING.put(paramsMap, tempData, "cardNo", 12); |
|
|
|
|
// 就诊人
|
|
|
|
@ -226,7 +234,7 @@ public class HisUniversalService { |
|
|
|
|
*/ |
|
|
|
|
private MessageSendResult work_order_remind_02__001(Map<String, String> paramsMap, String templateId, String title) { |
|
|
|
|
try { |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title); |
|
|
|
|
Map<String, Object> tempData = createTemplate(paramsMap, templateId, title, ""); |
|
|
|
|
// 提交时间
|
|
|
|
|
MsgParamEnum.TIME.put(paramsMap, tempData, "time", 13); |
|
|
|
|
// 工单名称
|
|
|
|
|