自助开接口调整

瑞美LIS报告单查询调整根据患者类型进行查询
短信发送,消息推送等根据医院判断是业务逻辑全部抽离管理。
天助平台读取配置异常进行处理。
患者session有效期延长为60分钟
debug
wangsq 2 months ago
parent b00b10556c
commit ceaee24571
  1. 4
      pom.xml
  2. 18
      src/main/java/com/ynxbd/common/action/MeTechnologyReAction.java
  3. 78
      src/main/java/com/ynxbd/common/action/RecipeAction.java
  4. 37
      src/main/java/com/ynxbd/common/action/RegisterAction.java
  5. 52
      src/main/java/com/ynxbd/common/action/SelfHelpAction.java
  6. 4
      src/main/java/com/ynxbd/common/action/pay/MedicalAction.java
  7. 22
      src/main/java/com/ynxbd/common/action/pay/MedicalTestAction.java
  8. 3
      src/main/java/com/ynxbd/common/action/report/LisReportAction.java
  9. 23
      src/main/java/com/ynxbd/common/bean/HisRecipe.java
  10. 3
      src/main/java/com/ynxbd/common/bean/MedTool.java
  11. 4
      src/main/java/com/ynxbd/common/bean/enums/CountyEnum.java
  12. 8
      src/main/java/com/ynxbd/common/bean/enums/HospEnum.java
  13. 19
      src/main/java/com/ynxbd/common/bean/his/HisSelfHelpInfo.java
  14. 35
      src/main/java/com/ynxbd/common/bean/his/HisSelfHelpItem.java
  15. 2
      src/main/java/com/ynxbd/common/bean/pay/Register.java
  16. 28
      src/main/java/com/ynxbd/common/dao/MedToolDao.java
  17. 1
      src/main/java/com/ynxbd/common/dao/PatientDao.java
  18. 1
      src/main/java/com/ynxbd/common/dao/his/HisMedicalDao.java
  19. 29
      src/main/java/com/ynxbd/common/dao/his/HisRecipeDao.java
  20. 83
      src/main/java/com/ynxbd/common/dao/his/HisSelfHelpDao.java
  21. 20
      src/main/java/com/ynxbd/common/dao/lis/XBDLisDao.java
  22. 7
      src/main/java/com/ynxbd/common/helper/ProperHelper.java
  23. 9
      src/main/java/com/ynxbd/common/helper/his/HisEnum.java
  24. 33
      src/main/java/com/ynxbd/common/helper/his/HisHelper.java
  25. 6
      src/main/java/com/ynxbd/common/service/MedToolService.java
  26. 1
      src/main/java/com/ynxbd/common/service/MedicalService.java
  27. 41
      src/main/java/com/ynxbd/common/service/MiddleOfficeService.java
  28. 20
      src/main/java/com/ynxbd/common/service/MsgPushService.java
  29. 2
      src/main/java/com/ynxbd/common/service/PatientService.java
  30. 62
      src/main/java/com/ynxbd/common/service/RecipeService.java
  31. 71
      src/main/java/com/ynxbd/common/service/RegService.java
  32. 63
      src/main/java/com/ynxbd/common/service/SmsService.java
  33. 23
      src/main/java/com/ynxbd/wx/config/MiddleOfficeConfig.java
  34. 59
      src/main/java/com/ynxbd/wx/config/TZReserveConfig.java
  35. 9
      src/main/java/com/ynxbd/wx/servlet/QServlet.java
  36. 4
      src/main/java/com/ynxbd/wx/wxfactory/ReqParamHelper.java
  37. 6
      src/main/java/com/ynxbd/wx/wxfactory/WxAuthHelper.java
  38. 9
      src/main/java/com/ynxbd/wx/wxfactory/WxMedicalHelper.java
  39. 4
      src/main/java/com/ynxbd/wx/wxfactory/base/auth/Client.java
  40. 6
      src/main/java/com/ynxbd/wx/wxfactory/medical/Client.java
  41. 33
      src/main/resources/copy/medical/tem-medical.properties
  42. 29
      src/main/resources/copy/medical/蒙自市妇幼保健院-medical.properties
  43. 5
      src/main/resources/medical-technology-reserve.properties
  44. 2
      src/main/resources/medical.properties
  45. 2
      src/main/resources/middle-office.properties
  46. 5
      src/main/resources/tz-reserve.properties
  47. 2
      src/main/resources/webservice.properties

@ -33,7 +33,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<version>1.18.36</version>
<scope>provided</scope>
</dependency>
@ -194,7 +194,7 @@
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.10.2</version>
<version>3.10.8</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>

@ -3,11 +3,10 @@ package com.ynxbd.common.action;
import com.ynxbd.common.action.base.BaseAction;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.config.MeTechnologyReConfig;
import com.ynxbd.wx.config.TZReserveConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author 李进才
@ -16,11 +15,10 @@ import org.slf4j.LoggerFactory;
* @date 2024/06/18 14:53:00
*/
@Slf4j
@Namespace("/meTechnologyRe")
public class MeTechnologyReAction extends BaseAction {
private static final Logger log = LoggerFactory.getLogger(MeTechnologyReAction.class);
/**
* 获取可预约的订单
*
@ -36,7 +34,7 @@ public class MeTechnologyReAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
patientId = getDecodeString(patientId);
return MeTechnologyReConfig.getCanBookOrders(patientId, startDate, endDate);
return TZReserveConfig.getCanBookOrders(patientId, startDate, endDate);
}
/**
@ -56,7 +54,7 @@ public class MeTechnologyReAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
patientId = getDecodeString(patientId);
return MeTechnologyReConfig.getNumberSourceStatistics(patientId, startDate, endDate, docDetailedNo, intervalTimeType);
return TZReserveConfig.getNumberSourceStatistics(patientId, startDate, endDate, docDetailedNo, intervalTimeType);
}
/**
@ -74,7 +72,7 @@ public class MeTechnologyReAction extends BaseAction {
if (examRoomOrQueue == null || startDate == null || endDate == null || appFromID == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
return MeTechnologyReConfig.getNumberSourceDetails(examRoomOrQueue, startDate, endDate, appFromID);
return TZReserveConfig.getNumberSourceDetails(examRoomOrQueue, startDate, endDate, appFromID);
}
/**
@ -93,7 +91,7 @@ public class MeTechnologyReAction extends BaseAction {
if (appFormID == null || examRoomOrQueue == null || beginDateTime == null || endDateTime == null || lockStatus == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
Boolean result = MeTechnologyReConfig.lockedBookNo(appFormID, examRoomOrQueue, beginDateTime, endDateTime, lockStatus);
Boolean result = TZReserveConfig.lockedBookNo(appFormID, examRoomOrQueue, beginDateTime, endDateTime, lockStatus);
return result ? Result.success() : Result.error();
}
@ -115,7 +113,7 @@ public class MeTechnologyReAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
patientId = getDecodeString(patientId);
return MeTechnologyReConfig.getBookedDateTime(appFormID, examRoomOrQueue, beginDateTime, endDateTime, patientId, patientName);
return TZReserveConfig.getBookedDateTime(appFormID, examRoomOrQueue, beginDateTime, endDateTime, patientId, patientName);
}
}

@ -18,6 +18,7 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.RecipeService;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.convention.annotation.Action;
@ -70,40 +71,11 @@ public class RecipeAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
}
List<HisRecipe> hisRecipeList = new HisRecipeDao().getPaidRecipeList(patientId, begDate, endDate, personNo);
List<HisRecipe> dataList = new ArrayList<>();
HisRecipe treatItem;
List<HisRecipe> groupList;
for (HisRecipe item : hisRecipeList) {
String treatNum = item.getMzNum();
if (ObjectUtils.isEmpty(treatNum)) {
continue;
}
String execDate = item.getExecDate();
item.setTreatNum(treatNum);
HisRecipe findTreat = dataList.stream().filter(o -> o.getTreatNum().equals(treatNum)).findFirst().orElse(null);
if (findTreat == null) {
treatItem = new HisRecipe();
treatItem.setTreatNum(treatNum);
treatItem.setDate(execDate);
groupList = new ArrayList<>();
groupList.add(item);
treatItem.setGroupList(groupList);
dataList.add(treatItem);
} else {
if (findTreat.getGroupList() == null) {
findTreat.setGroupList(new ArrayList<>());
}
Boolean isGreaterThan = DateHelper.leftGreaterThanRight(execDate, findTreat.getDate(), null);
if (isGreaterThan != null && isGreaterThan) {
findTreat.setDate(execDate);
}
findTreat.getGroupList().add(item);
}
List<HisRecipe> hisRxList = new HisRecipeDao().getPaidRecipeList(patientId, begDate, endDate, personNo);
for (HisRecipe item : hisRxList) {
item.filterSetEnBillNo();
}
return Result.success(dataList);
return Result.success(new RecipeService().filterPaidList(hisRxList));
}
/**
@ -124,7 +96,7 @@ public class RecipeAction extends BaseAction {
}
int days = DateHelper.intervalDays(begDate, endDate, true);
List<HisRecipe> hisRecipes = new HisRecipeDao().getUnPayRecipe(patientId, personNo, days);
List<HisRecipe> hisRecipes = new HisRecipeDao().getRxUnPay(patientId, personNo, days);
List<HisRecipe> resultList = new ArrayList<>();
for (HisRecipe hisRecipe : hisRecipes) {
@ -148,7 +120,7 @@ public class RecipeAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
int days = DateHelper.intervalDays(begDate, endDate, true);
List<HisRecipe> hisRecipes = new HisRecipeDao().getUnPayRecipe(patientId, personNo, days);
List<HisRecipe> hisRecipes = new HisRecipeDao().getRxUnPay(patientId, personNo, days);
List<HisRecipe> resultList = new ArrayList<>();
for (HisRecipe hisRecipe : hisRecipes) {
@ -159,6 +131,7 @@ public class RecipeAction extends BaseAction {
return Result.success(resultList);
}
/**
* 获取所以未缴费订单 包括互联网医院未审核医保双通道订单
*
@ -166,15 +139,15 @@ public class RecipeAction extends BaseAction {
* @param begDate 开始时间
* @param endDate 结束时间
*/
@Action("getMedicalRecipe")
public Result getMedicalRecipe(String patientId, String begDate, String endDate) {
@Action("getOLRxList")
public Result getOLRxList(String patientId, String begDate, String endDate) {
log.info("[处方]未缴费项目查询 patientId={}", patientId);
patientId = getDecodeString(patientId);
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
int days = DateHelper.intervalDays(begDate, endDate, true);
List<HisRecipe> hisRecipes = new HisRecipeDao().getUnPayRecipe(patientId, "", days);
List<HisRecipe> hisRecipes = new HisRecipeDao().getRxUnPay(patientId, "", days);
List<HisRecipe> resultList = new ArrayList<>();
for (HisRecipe hisRecipe : hisRecipes) {
if (hisRecipe.getDate() != null && DateHelper.inDateRange(begDate, endDate, hisRecipe.getDate(), DateHelper.DateEnum.yyyy_MM_dd)) {
@ -200,6 +173,22 @@ public class RecipeAction extends BaseAction {
return new HisRecipeDao().uploadMedicalRecipe(treatNum, personID, recipes);
}
/**
* [处方]查询发票
*
* @param invoiceNo 发票号
*/
@Action("getRxInvoiceInfo")
public Result getRxInvoiceInfo(String invoiceNo) {
invoiceNo = getDecodeString(invoiceNo);
log.info("[处方]查询发票 invoiceNo={} ", invoiceNo);
if (invoiceNo == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
return new HisRecipeDao().queryElectronInvoice(invoiceNo);
}
// /**
// * 获取未缴费项目
// */
@ -340,6 +329,19 @@ public class RecipeAction extends BaseAction {
}
// @Action("getTestRxList")
// public Result getTestRxList(String patientId, String personNo, String begDate, String endDate) {
// log.info("[处方]测试 patientId={}, personNo={}, begDate={}, endDate={}", patientId, personNo, begDate, endDate);
//
// JsonResult jsonResult = JsonResult.xmlToBean("<Response><TransactionCode>4001</TransactionCode><ResponseCode>0</ResponseCode><ResponseMessage>成功</ResponseMessage><Recipe><PatientName>罗金英</PatientName><ID>1052064601</ID><Name>血液检查申请单 </Name><DeptCode>3001</DeptCode><DeptName>医学检验科</DeptName><DoctDeptCode>0444</DoctDeptCode><DoctDeptName>甲状腺乳腺外科</DoctDeptName><DoctCode>1165</DoctCode><DoctName>秦双伟</DoctName><Date>2025-06-12 08:10:25</Date><ExecDate></ExecDate><MZNum>90283610</MZNum><Amount>19</Amount><Address></Address><Note></Note><FJJFFlag>0</FJJFFlag><YBJSFlag></YBJSFlag><YBAttrib>5</YBAttrib><YBBZCode>M00500</YBBZCode><YBBZName>恶性肿瘤(特病)</YBBZName><InternetHospFlag></InternetHospFlag><STD_Flag>0</STD_Flag><STD_UploadDate></STD_UploadDate><YJSAuditFlag></YJSAuditFlag><MedicalType>11</MedicalType><DiseaseCode></DiseaseCode><Item><ItemID>250101015</ItemID><ItemName>血细胞分析</ItemName><ItemType>化验费</ItemType><Specs></Specs><Unit>项</Unit><Price>1</Price><Quantity>19</Quantity><Price_QY>1</Price_QY><Quantity_QY>19</Quantity_QY><Count_QY>19</Count_QY><FJJFApplyNum>52064602</FJJFApplyNum></Item></Recipe><Recipe><PatientName>罗金英</PatientName><ID>1052064602</ID><Name>医学检验科检查(治疗)单 </Name><DeptCode>3001</DeptCode><DeptName>医学检验科</DeptName><DoctDeptCode>0444</DoctDeptCode><DoctDeptName>甲状腺乳腺外科</DoctDeptName><DoctCode>1165</DoctCode><DoctName>秦双伟</DoctName><Date>2025-06-12 08:10:25</Date><ExecDate></ExecDate><MZNum>90283610</MZNum><Amount>4.5</Amount><Address></Address><Note>左乳癌术后3月余。</Note><FJJFFlag>1</FJJFFlag><YBJSFlag></YBJSFlag><YBAttrib></YBAttrib><YBBZCode></YBBZCode><YBBZName></YBBZName><InternetHospFlag></InternetHospFlag><STD_Flag>0</STD_Flag><STD_UploadDate></STD_UploadDate><YJSAuditFlag></YJSAuditFlag><MedicalType>11</MedicalType><DiseaseCode></DiseaseCode><Item><ItemID>Z1432</ItemID><ItemName>一次性使用采血器 紫</ItemName><ItemType>检查类材料费</ItemType><Specs></Specs><Unit>支</Unit><Price>0.5</Price><Quantity>1</Quantity><Price_QY>0.5</Price_QY><Quantity_QY>1</Quantity_QY><Count_QY>1</Count_QY><FJJFApplyNum></FJJFApplyNum></Item><Item><ItemID>120400002C</ItemID><ItemName>静脉采血器采血</ItemName><ItemType>治疗费</ItemType><Specs></Specs><Unit>次</Unit><Price>4</Price><Quantity>1</Quantity><Price_QY>4</Price_QY><Quantity_QY>1</Quantity_QY><Count_QY>1</Count_QY><FJJFApplyNum></FJJFApplyNum></Item></Recipe></Response>", JsonResultEnum.SYS_HIS);
// if (jsonResult == null) {
// return Result.error();
// }
// List<HisRecipe> hisRecipeList = jsonResult.getDataMapList(HisRecipe.class, "Recipe");
// return Result.success(hisRecipeList);
// }
// /**
// * 核酸检测支付
// */

@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ynxbd.ali.helper.AliUploadHelper;
import com.ynxbd.common.action.base.BaseAction;
import com.ynxbd.common.bean.Dept;
import com.ynxbd.common.bean.Doctor;
import com.ynxbd.common.bean.Patient;
import com.ynxbd.common.bean.RegSign;
import com.ynxbd.common.bean.*;
import com.ynxbd.common.bean.enums.MerchantEnum;
import com.ynxbd.common.bean.pay.Register;
import com.ynxbd.common.dao.RegisterDao;
@ -449,11 +446,20 @@ public class RegisterAction extends BaseAction {
* @return 预约签到结果
*/
@Action("regSignIn")
public Result regSignIn(String treatNum) {
log.info("[执行挂号签到(只进行分诊叫号)] treatNum={}", treatNum);
public Result regSignIn(String treatNum, Integer signInType, String processMark) {
log.info("[执行挂号签到(只进行分诊叫号)] treatNum={}, signInType={}, processMark={}", treatNum, signInType, processMark);
if (treatNum == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
if (!ObjectUtils.isEmpty(processMark)) { // 修改进程进度
boolean isOK = new MedToolService().saveMedToolMarkByTreatNum(treatNum, 1, processMark);
log.info("[挂号签到]修改进程标记{} treatNum={}", treatNum, (isOK ? "成功" : "失败"));
}
if (signInType != null && (signInType == 0 || signInType == 1)) { // 无需签到 | 自助机签到
return Result.success();
}
JsonResult jsonResult = new HisRegisterDao().handleLineSignIn(treatNum);
if (!jsonResult.success()) {
return Result.error(jsonResult.getMessage());
@ -498,6 +504,7 @@ public class RegisterAction extends BaseAction {
return Result.success(regList);
}
List<String> treatNumList = new ArrayList<>();
String curDate = DateHelper.getCurDate();
for (Patient pItem : patients) {
String patientId = pItem.getPatientId();
@ -516,6 +523,10 @@ public class RegisterAction extends BaseAction {
}
}
String treatNum = regItem.getTreatNum();
if (!ObjectUtils.isEmpty(treatNum)) {
treatNumList.add(treatNum);
}
regItem.setCurDate(curDate);
regItem.setPatientId(patientId);
regItem.setEnPatientId(ReqParamHelper.encode(patientId));
@ -529,6 +540,20 @@ public class RegisterAction extends BaseAction {
}
}
}
List<MedTool> medToolRecords = new MedToolService().queryMedToolListByTreatList(treatNumList, 1);
if (medToolRecords.isEmpty()) {
return Result.success(regList);
}
for (Register regItem : regList) {
String treatNum = regItem.getTreatNum();
if (ObjectUtils.isEmpty(treatNum)) {
continue;
}
MedTool findItem = medToolRecords.stream().filter(o -> o.getTreatNum().equals(treatNum)).findFirst().orElse(null);
if (findItem != null) {
regItem.setMedToolMark(findItem.getProcessMark());
}
}
return Result.success(regList);
} catch (Exception e) {
return Result.error(e);

@ -0,0 +1,52 @@
package com.ynxbd.common.action;
import com.ynxbd.common.action.base.BaseAction;
import com.ynxbd.common.bean.his.HisSelfHelpInfo;
import com.ynxbd.common.dao.his.HisSelfHelpDao;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import java.util.Arrays;
import java.util.List;
@Slf4j
@Namespace("/selfHelp")
public class SelfHelpAction extends BaseAction {
/**
* HIS查询自助开单
*/
@Action("getHisSelfHelpList")
public Result getHisSelfHelpList() {
try {
log.info("[HIS查询自助开单]");
List<HisSelfHelpInfo> dataList = new HisSelfHelpDao().getHisSelfHelpList();
return Result.success(dataList);
} catch (Exception e) {
return Result.error(e.getMessage());
}
}
/**
* HIS创建自助开单
*/
@Action("createHisSelfHelp")
public Result createHisSelfHelp(String patientId, String items) {
try {
log.info("[HIS创建自助开单]");
patientId = getDecodeString(patientId);
if (ObjectUtils.isEmpty(patientId) || ObjectUtils.isEmpty(items)) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
List<String> itemList = Arrays.asList(items.split(","));
Boolean isOk = new HisSelfHelpDao().createHisSelfHelp(patientId, itemList);
return Result.success(isOk);
} catch (Exception e) {
return Result.error(e);
}
}
}

@ -270,7 +270,7 @@ public class MedicalAction extends BaseAction {
/**
* HIS医保退费
* HIS查询医保对账记录
*/
@Action("getHisAccountsInfo")
public Result getHisAccountsInfo(String mdUserId) {
@ -295,7 +295,7 @@ public class MedicalAction extends BaseAction {
}
/**
* HIS医保退费
* HIS查询医保退费
*/
@Action("queryRefund")
public Result queryRefund(String accessToken, String outTradeNo, String mdTransId) {

@ -6,6 +6,7 @@ import com.ynxbd.common.dao.his.HisMedicalTestDao;
import com.ynxbd.common.helper.common.DateHelper;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.RecipeService;
import com.ynxbd.wx.wxfactory.WxMedicalHelper;
import com.ynxbd.wx.wxfactory.bean.MedicalOrder;
import com.ynxbd.wx.wxfactory.medical.MdConfig;
@ -28,9 +29,10 @@ public class MedicalTestAction extends BaseAction {
/**
* 获取未缴费项目
*/
@Action("getDevRecipeUnPayList")
public Result getDevRecipeUnPayList(String patientId, String begDate, String endDate) {
@Action("getDevRxUnPayList")
public Result getDevRxUnPayList(String patientId, String begDate, String endDate) {
log.info("[处方Dev]未缴费项目查询 patientId={}, begDate={}, endDate={}", patientId, begDate, endDate);
patientId = getDecodeString(patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
@ -42,22 +44,23 @@ public class MedicalTestAction extends BaseAction {
int days = DateHelper.intervalDays(begDate, endDate, true);
List<HisRecipe> hisRecipes = HisMedicalTestDao.devUnPayList(patientId, days);
List<HisRecipe> resultList = new ArrayList<>();
List<HisRecipe> dataList = new ArrayList<>();
for (HisRecipe hisRecipe : hisRecipes) {
if (hisRecipe.getDate() != null && DateHelper.inDateRange(begDate, endDate, hisRecipe.getDate(), DateHelper.DateEnum.yyyy_MM_dd)) {
resultList.add(hisRecipe);
dataList.add(hisRecipe);
}
}
return Result.success(resultList);
return Result.success(dataList);
}
/**
* 获取未缴费项目
*/
@Action("getDevRecipePaidList")
public Result getDevRecipePaidList(String patientId, String begDate, String endDate) {
@Action("getDevRxPaidList")
public Result getDevRxPaidList(String patientId, String begDate, String endDate) {
log.info("[处方Dev]已缴费项目查询 patientId={}, begDate={}, endDate={}", patientId, begDate, endDate);
patientId = getDecodeString(patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
@ -65,9 +68,8 @@ public class MedicalTestAction extends BaseAction {
if (!MdConfig.IS_DEV) {
return Result.error("环境错误");
}
List<HisRecipe> resultList = HisMedicalTestDao.devPaidRecipeList(patientId, begDate, endDate);
return Result.success(resultList);
List<HisRecipe> hisRecipeList = HisMedicalTestDao.devPaidRecipeList(patientId, begDate, endDate);
return Result.success(new RecipeService().filterPaidList(hisRecipeList));
}
//

@ -44,6 +44,7 @@ public class LisReportAction extends BaseAction {
/**
* 查询报告列表
* patientType0:住院 1:门诊
*
* @return 报告列表
*/
@ -64,7 +65,7 @@ public class LisReportAction extends BaseAction {
lstReport = new XBDLisDao().getReport(treatNum, patientType);
break;
case "2": // 瑞美
lstReport = new XBDLisDao().getReport4RM(treatNum);
lstReport = new XBDLisDao().getReport4RM(treatNum, patientType);
String reportId;
for (XBDLisReport reportItem : lstReport) {

@ -1,9 +1,11 @@
package com.ynxbd.common.bean;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.apache.commons.lang3.ObjectUtils;
import java.math.BigDecimal;
import java.util.List;
@ -65,19 +67,38 @@ public class HisRecipe {
private String internetHospFlag;
// 是否为双通道处方 [1:双通道处方]
private String sTDFlag;
private String sTDUploadDate;
// 处方是否已经审核
private String yJSAuditFlag;
private String ybAttrib; // 医保属性[4:为慢性病,5:为特殊病]
private Integer ybJsFlag; // 是否允许医保支付
private Integer ybJsFlag; // 是否允许医保支付 [1不允许医保缴费,否则允许医保缴费]
private String ybBZCode; // 病种编码
private String ybBZName; // 病种名称
// 发票号(已缴费中查询出来=>发票状态)
private String invoiceNo;
// 发票类型
private String invoiceType;
// 支付类型
private String payType;
// 收费单据号
private String billNo;
// 加密的发票号
private String enBillNo;
private List<HisRecipeItem> item;
// 处方集合
private List<HisRecipe> groupList;
public void filterSetEnBillNo() {
if (ObjectUtils.isEmpty(this.billNo)) {
return;
}
this.enBillNo = ReqParamHelper.encode(this.billNo);
}
}

@ -8,6 +8,7 @@ import org.apache.commons.lang3.ObjectUtils;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
// 就医助手
@ -24,7 +25,7 @@ public class MedTool implements Serializable {
// 进度标识
private String processMark;
// 修改时间
private LocalDateTime updateTime;
private Date updateTime;
// 拼接进度状态

@ -3,8 +3,8 @@ package com.ynxbd.common.bean.enums;
import org.apache.commons.lang3.ObjectUtils;
public enum CountyEnum {
弥勒市("弥勒市", "532504", "532526"),
禄丰市("禄丰市", "532381", "532331"),
弥勒市("弥勒市", "532526", "532526"),
禄丰市("禄丰市", "532331", "532331"),
;
public final String NAME;
public final String CODE; // 市级编码

@ -23,7 +23,11 @@ public enum HospEnum {
this.MESSAGE = MESSAGE;
}
public static boolean isHosp(HospEnum hospEnum) {
return hospEnum.APP_ID.equals(WeChatConfig.APP_ID);
public boolean isHosp() {
return this.APP_ID.equals(WeChatConfig.APP_ID);
}
// public static boolean isHosp(HospEnum hospEnum) {
// return hospEnum.APP_ID.equals(WeChatConfig.APP_ID);
// }
}

@ -0,0 +1,19 @@
package com.ynxbd.common.bean.his;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.apache.poi.hpsf.Decimal;
import java.util.List;
@Getter
@Setter
@ToString
@NoArgsConstructor
public class HisSelfHelpInfo {
private String applyCode;
private String applyName;
private List<HisSelfHelpItem> items;
}

@ -0,0 +1,35 @@
package com.ynxbd.common.bean.his;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
@NoArgsConstructor
public class HisSelfHelpItem {
private String itemNo;
private String applicationTypeName;
private String ksCode;
private String ksName;
private String deptCode;
private String deptName;
private String groupFlag;
private String itemCode;
private String itemName;
//
private String price;
private String money;
private Integer count;
public void replaceKeyName() {
this.deptCode = this.ksCode;
this.ksCode = null;
this.deptName = this.ksName;
this.ksName = null;
}
}

@ -75,6 +75,8 @@ public class Register extends Order {
private String orderFromOwner;
// 判断是否为分时段挂号
private Boolean isSplitTime;
// 就医助手标记
private String medToolMark;
public boolean hasIsTake(int val) {
return isTake != null && isTake == val;

@ -2,6 +2,10 @@ package com.ynxbd.common.dao;
import com.ynxbd.common.bean.MedTool;
import com.ynxbd.common.config.db.DataBase;
import org.apache.commons.lang3.ObjectUtils;
import java.util.ArrayList;
import java.util.List;
public class MedToolDao {
@ -26,7 +30,6 @@ public class MedToolDao {
}
public MedTool selectByTreatNumAndType(String treatNum, Integer type) {
String sql = "select * from med_tool where treatNum=? and type=?";
return DataBase.selectOne(sql, MedTool.class, ps -> {
@ -34,4 +37,27 @@ public class MedToolDao {
ps.setInt(2, type);
});
}
public List<MedTool> selectListByTreatNumList(List<String> treatNumList, Integer type) {
if (treatNumList == null || treatNumList.isEmpty()) {
return new ArrayList<>();
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < treatNumList.size(); i++) {
String treatNum = treatNumList.get(i);
sb.append("'").append(treatNum).append("'");
if (i != treatNumList.size() - 1) {
sb.append(",");
}
}
String treatNum = sb.toString();
if (ObjectUtils.isEmpty(treatNum)) {
return new ArrayList<>();
}
String sql = "select * from med_tool where treatNum in(" + treatNum + ") and type=?";
return DataBase.select(sql, MedTool.class, ps -> {
ps.setInt(1, type);
});
}
}

@ -1,6 +1,5 @@
package com.ynxbd.common.dao;
import com.ynxbd.common.bean.CommonOption;
import com.ynxbd.common.bean.Patient;
import com.ynxbd.common.bean.PatientLink;
import com.ynxbd.common.bean.enums.HCardTypeEnum;

@ -58,7 +58,6 @@ public class HisMedicalDao {
params.put("YBAttrib", ybAttrib);
params.put("YBBZCode", ybBZCode);
params.put("YBBZName", ybBZName);
return HisHelper.getMdJsonResult(HisEnum.AP_Pay_Invoice, params);
}
return HisHelper.getMdJsonResult(HisEnum.AP_Pay_Invoice, params);
}

@ -75,7 +75,7 @@ public class HisRecipeDao {
* @param patientId 患者id
* @return 待付费项目
*/
public List<HisRecipe> getUnPayRecipe(String patientId, String personNo, int days) {
public List<HisRecipe> getRxUnPay(String patientId, String personNo, int days) {
List<HisRecipe> resultList = new ArrayList<>();
JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.AP_Query_UnPay_Invoice, params -> {
@ -282,6 +282,33 @@ public class HisRecipeDao {
}
/**
* 查询发票信息
*
* @param invoiceNo 发票号
*/
public Result queryElectronInvoice(String invoiceNo) {
JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.QUERY_ELECTRON_INVOICE, params -> {
params.put("FPNum", invoiceNo);
});
if (!jsonResult.success()) {
String message = jsonResult.getMessage();
if (ObjectUtils.isEmpty(message)) {
return Result.error("[电子票据]查询异常");
}
if (message.contains("未找到业务流水号") && message.contains("电子票据信息")) {
return Result.error("未找到电子票据信息");
}
return Result.error(message);
}
String invoiceJSon = jsonResult.getDataMapString("EInvoiceJSonStr");
if (ObjectUtils.isEmpty(invoiceJSon)) {
return Result.error("EInvoiceJSonStr为空");
}
return Result.success(invoiceJSon);
}
// public static void main(String[] args) {
// List<String> recipeIds = new ArrayList<>();
// recipeIds.add("1002242374");

@ -0,0 +1,83 @@
package com.ynxbd.common.dao.his;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ynxbd.common.bean.his.HisSelfHelpInfo;
import com.ynxbd.common.bean.his.HisSelfHelpItem;
import com.ynxbd.common.bean.in_hosp.InHosp;
import com.ynxbd.common.helper.his.HisEnum;
import com.ynxbd.common.helper.his.HisHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Slf4j
public class HisSelfHelpDao {
public List<HisSelfHelpInfo> getHisSelfHelpList() throws ServiceException {
JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.SH_SELF_HELP_QUERY, params -> {
});
if (!jsonResult.success()) {
String message = jsonResult.getMessage();
if (message != null && message.contains("没有查询到")) {
return new ArrayList<>();
}
throw new ServiceException(jsonResult.getMessage());
}
JSONArray jsonArray = jsonResult.getJsonArray("ApplicationInfos", "ApplicationInfo");
String items;
JSONObject node;
HisSelfHelpInfo info;
List<HisSelfHelpInfo> dataList = new ArrayList<>();
for (int i = 0; i < jsonArray.size(); i++) {
node = jsonArray.getJSONObject(i);
info = new HisSelfHelpInfo();
info.setApplyCode(node.getString("ApplyCode"));
info.setApplyName(node.getString("ApplyName"));
items = node.getString("Item");
if (ObjectUtils.isEmpty(items)) {
continue;
}
List<HisSelfHelpItem> itemList = JSONArray.parseArray(items, HisSelfHelpItem.class);
for (HisSelfHelpItem item : itemList) {
item.replaceKeyName();
}
info.setItems(itemList);
dataList.add(info);
}
return dataList;
}
public Boolean createHisSelfHelp(String patientId, List<String> items) throws ServiceException {
if (ObjectUtils.isEmpty(patientId)) {
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
if (items.isEmpty()) {
throw new ServiceException("传递的申请单为空,禁止开单");
}
JsonResult jsonResult = HisHelper.getJsonResult(HisEnum.SH_SELF_HELP_CREATE, params -> {
params.put("PatientId", patientId);
params.put("ApplicationInfos", HisHelper.strListToXml("ItemNo", items));
});
if (!jsonResult.success()) {
throw new ServiceException(jsonResult.getMessage());
}
Map<String, Object> dataMap = jsonResult.getDataMap();
log.info("[创建自助申请单]: {}", dataMap);
return true;
}
}

@ -13,6 +13,7 @@ package com.ynxbd.common.dao.lis;
import com.ynxbd.common.bean.lis.*;
import com.ynxbd.common.config.db.LisDB;
import org.apache.commons.lang3.ObjectUtils;
import java.util.ArrayList;
import java.util.List;
@ -422,8 +423,18 @@ public class XBDLisDao {
});
}
// 瑞美
public List<XBDLisReport> getReport4RM(String treatId) {
// 瑞美 patientType:0:住院 1:门诊
public List<XBDLisReport> getReport4RM(String treatId, String patientType) {
String reportPatTypeCode = "('1','2','3')";
if (ObjectUtils.isEmpty(patientType) || "0".equals(patientType)) { // 住院
reportPatTypeCode = "('3')";
} else if ("1".equals(patientType)) { // 门诊
reportPatTypeCode = "('1','2')";
} else if ("4".equals(patientType)) { // 体检
reportPatTypeCode = "('4')";
}
String sql = "SELECT" +
" a.reportid AS ID" +
" ,RTRIM(b.rptunitname) AS ReportName" +
@ -454,7 +465,8 @@ public class XBDLisDao {
" dc_doctor d ON a.req_docno = d.doctorno left JOIN" +
" lab_reportunit e ON a.rptunitid = e.rptunitid" +
" WHERE " +
" a.rechk_dt is not null AND a.rechk_user IS NOT NULL AND a.pat_no = ?";
" a.rechk_dt is not null AND a.rechk_user IS NOT NULL AND pat_typecode IN " + reportPatTypeCode + " AND a.pat_no = ?";
// pat_typeCode[1、2门诊;3住院;4:体检]
return LisDB.select(sql, XBDLisReport.class, ps -> {
ps.setString(1, treatId);
});
@ -523,7 +535,7 @@ public class XBDLisDao {
+
" dbo.lab_rptitem c ON a.rpt_itemid = c.rpt_itemid" +
" WHERE " +
" reportid = ? ORDER BY b.seq";
" reportid = ? and isnull(b.unprintflag, 0) <> '1' and (result_num IS NOT NULL OR ISNULL(result_unit,'') <> '' OR ISNULL(result_ref,'') <> '' OR ISNULL(result6,'') = '') ORDER BY b.seq";
return LisDB.select(sql, XBDLisResult.class, ps -> {
ps.setInt(1, reportId);
});

@ -6,9 +6,13 @@ package com.ynxbd.common.helper;
* Date:2022/06/13 14:56:13
*/
import lombok.extern.slf4j.Slf4j;
import java.io.InputStream;
import java.util.Properties;
@Slf4j
public class ProperHelper {
private Properties properties;
@ -26,7 +30,8 @@ public class ProperHelper {
try (InputStream in = ProperHelper.class.getClassLoader().getResourceAsStream(fileName)) {
properties.load(in);
} catch (Exception e) {
e.printStackTrace();
log.error("properties file [{}] read load error", fileName);
properties = null;
}
return this;
}

@ -24,8 +24,8 @@ public enum HisEnum {
// 报告------------------
AP_Query_PEISReport("[报告]体检报告", "9001", "AP_Query_PEISReport", true),
AP_Query_CheckApplication("[报告]检查申请单", "5001", "AP_Query_CheckApplication", true),
AP_Query_InspectionApplication("[报告]检验(化验)申请单", "5002", "AP_Query_InspectionApplication", true),
AP_Query_CheckApplication("[报告]检查申请单", "5001", "AP_Query_CheckApplication", false),
AP_Query_InspectionApplication("[报告]检验(化验)申请单", "5002", "AP_Query_InspectionApplication", false),
// 挂号记录---------------
AP_Query_Regist("[现场挂号]查询现场挂号记录", "2004", "AP_Query_Regist", true),
@ -108,6 +108,11 @@ public enum HisEnum {
AP_Query_Line_SignIn("[在线签到]查询已挂号未签到记录","7009","AP_Query_LineSignIn",true),
AP_Line_SignIN("[在线签到]执行挂号患者签到","7010","AP_LineSignIn",true),
// 自助开单
SH_SELF_HELP_QUERY("[查询自助开单信息]","10003","UniversalInterface",true),
SH_SELF_HELP_CREATE("[创建自助开单申请单]","10004","UniversalInterface",true),
QUERY_ELECTRON_INVOICE("[查询电子发票信息]","8004","UniversalInterface",false),
;
public final String NAME;

@ -1,7 +1,6 @@
package com.ynxbd.common.helper.his;
import com.ynxbd.common.action.pay.PEnum;
import com.ynxbd.common.bean.enums.HospEnum;
import com.ynxbd.common.bean.enums.MerchantEnum;
import com.ynxbd.common.bean.pay.Order;
import com.ynxbd.common.helper.ProperHelper;
@ -10,7 +9,7 @@ import com.ynxbd.common.helper.common.ErrorHelper;
import com.ynxbd.common.helper.common.SoapHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.JsonResultEnum;
import com.ynxbd.wx.config.MiddleOfficeConfig;
import com.ynxbd.common.service.MiddleOfficeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.dom4j.DocumentException;
@ -21,7 +20,6 @@ import org.dom4j.Node;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Slf4j
public class HisHelper {
@ -129,7 +127,6 @@ public class HisHelper {
// }
/**
* webService请求工具类枚举版
*
@ -143,6 +140,7 @@ public class HisHelper {
/**
* webService请求工具类枚举版
*
* @param hisEnum 枚举
* @param params 发送的参数
* @param merchantEnum 支付宝标志
@ -191,6 +189,7 @@ public class HisHelper {
/**
* webService请求工具类枚举版
*
* @param hisEnum 枚举
* @param soapUrl 路径
* @param params 参数
@ -255,14 +254,7 @@ public class HisHelper {
}
}
if(HospEnum.isHosp(HospEnum.红河州人民医院)){
if(MiddleOfficeConfig.MIDDLE_OFFICE_URL!=null){ //平台数据上传
MiddleOfficeConfig.run(soapUrl,"<Request>" + SoapHelper.requestParams("HIS", params) + "</Request>",HIS_SOAP_MD_URL,transactionCode,result);
if("7004".equals(transactionCode)&&JsonResult.xmlToBean(result, JsonResultEnum.SYS_HIS)!=null){
MiddleOfficeConfig.uploadTreatNum("JH0104", Objects.requireNonNull(JsonResult.xmlToBean(result, JsonResultEnum.SYS_HIS)).getDataMapString("MZNum"));
}
}
}
new MiddleOfficeService().req_his_JH0104(soapUrl, HIS_SOAP_MD_URL, params, transactionCode, result);
} catch (DocumentException e) {
ErrorHelper.println(e);
@ -271,7 +263,6 @@ public class HisHelper {
}
// /**
// * xml响应数据组装成为JSON数据
// *
@ -324,6 +315,7 @@ public class HisHelper {
/**
* [支付宝] xml响应数据组装成为JSON数据
*
* @param hisEnum
* @param params
* @param merchantEnum
@ -444,4 +436,19 @@ public class HisHelper {
return JsonResult.createTimeoutResult("【HIS】请求超时", JsonResultEnum.SYS_HIS);
}
/**
* 字符串集转xml
*
* @param xmlTag xml标签
* @param strList 字符串集
* @return xml
*/
public static String strListToXml(String xmlTag, List<String> strList) {
StringBuilder sb = new StringBuilder();
for (String val : strList) {
sb.append("<").append(xmlTag).append(">").append(val).append("</").append(xmlTag).append(">");
}
return sb.toString();
}
}

@ -3,6 +3,8 @@ package com.ynxbd.common.service;
import com.ynxbd.common.bean.MedTool;
import com.ynxbd.common.dao.MedToolDao;
import java.util.List;
public class MedToolService {
public boolean saveMedToolMarkByTreatNum(String treatNum, Integer type, String processMark) {
@ -18,4 +20,8 @@ public class MedToolService {
return medToolDao.updateProcessMark(treatNum, type, processMark, mark);
}
}
public List<MedTool> queryMedToolListByTreatList(List<String> treatNumList, Integer type) {
return new MedToolDao().selectListByTreatNumList(treatNumList, type);
}
}

@ -73,7 +73,6 @@ public class MedicalService {
return mdPlaceOrder(payAuthNo, result);
}
/**
* [医保]下单
*

@ -0,0 +1,41 @@
package com.ynxbd.common.service;
import com.ynxbd.common.bean.enums.HospEnum;
import com.ynxbd.common.helper.common.SoapHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.JsonResultEnum;
import com.ynxbd.wx.config.MiddleOfficeConfig;
import lombok.extern.slf4j.Slf4j;
import java.util.Map;
import java.util.Objects;
@Slf4j
public class MiddleOfficeService {
public void req_his_JH0104(String soapUrl, String hisSoapMdUrl, Map<String, Object> params, String transactionCode, String result) {
try {
if (HospEnum.红河州人民医院.isHosp()) {
if (MiddleOfficeConfig.MIDDLE_OFFICE_URL != null) { //平台数据上传
MiddleOfficeConfig.run(soapUrl, "<Request>" + SoapHelper.requestParams("HIS", params) + "</Request>", hisSoapMdUrl, transactionCode, result);
if ("7004".equals(transactionCode) && JsonResult.xmlToBean(result, JsonResultEnum.SYS_HIS) != null) {
MiddleOfficeConfig.uploadTreatNum("JH0104", Objects.requireNonNull(JsonResult.xmlToBean(result, JsonResultEnum.SYS_HIS)).getDataMapString("MZNum"));
}
}
}
} catch (Exception e) {
log.error(e.getMessage());
}
}
public void reg_JH0105(String treatNum) {
if (HospEnum.红河州人民医院.isHosp()) {
if (MiddleOfficeConfig.MIDDLE_OFFICE_URL != null) {
MiddleOfficeConfig.uploadTreatNum("JH0105", treatNum);
}
}
}
}

@ -0,0 +1,20 @@
package com.ynxbd.common.service;
import com.ynxbd.common.bean.enums.HospEnum;
import com.ynxbd.common.bean.enums.MerchantEnum;
import com.ynxbd.common.bean.pay.Register;
import com.ynxbd.wx.config.MessagePushConfig;
// 消息推送
public class MsgPushService {
public void regMsgPush(MerchantEnum merchantEnum, Register reg) {
if (reg == null) {
return;
}
if (HospEnum.红河州人民医院.isHosp() && "0503".equals(reg.getDeptCode())) {
MessagePushConfig.regObsDocument(merchantEnum, reg);
}
}
}

@ -2,7 +2,6 @@ package com.ynxbd.common.service;
import com.ynxbd.common.bean.Patient;
import com.ynxbd.common.bean.User;
import com.ynxbd.common.bean.enums.CountyEnum;
import com.ynxbd.common.bean.enums.HCardTypeEnum;
import com.ynxbd.common.dao.PatientDao;
import com.ynxbd.common.dao.his.HisPatientDao;
@ -130,7 +129,6 @@ public class PatientService {
return Result.error(ResultEnum.PATIENT_BIND_EXCEEDS_5); // 绑定人数超过5人
}
county = CountyEnum.getNewCounty(county);
Patient hisPatient;
try {
hisPatient = new HisPatientDao().bind(isCounty, name, sex, idCardNo, cardTypeEnum, tel, address, birthday, nation, county, uuid, fName, fTel, fIDCardNo, mName, mTel, mIDCardNo);

@ -2,6 +2,7 @@ package com.ynxbd.common.service;
import com.alibaba.fastjson.JSONObject;
import com.ynxbd.common.action.pay.PEnum;
import com.ynxbd.common.bean.HisRecipe;
import com.ynxbd.common.bean.SelfHelpCount;
import com.ynxbd.common.bean.ConfigSelfHelp;
import com.ynxbd.common.bean.StandardPrice;
@ -20,7 +21,7 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException;
import com.ynxbd.common.service.cache.PayCache;
import com.ynxbd.wx.config.MeTechnologyReConfig;
import com.ynxbd.wx.config.TZReserveConfig;
import com.ynxbd.wx.utils.DateGenerate;
import com.ynxbd.wx.wxfactory.WxMedicalHelper;
import com.ynxbd.wx.wxfactory.WxPayHelper;
@ -136,9 +137,9 @@ public class RecipeService {
}
// 医保支付
JSONObject mdRespJson = PayService.goMedical(merchantEnum, PEnum.RECIPE);
if (mdRespJson != null) {
return Result.success(mdRespJson);
JSONObject respMedJson = PayService.goMedical(merchantEnum, PEnum.RECIPE);
if (respMedJson != null) {
return Result.success(respMedJson);
}
return Result.success();
}
@ -300,6 +301,18 @@ public class RecipeService {
}
}
// 订单金额验证
BigDecimal rxTotalFee = new BigDecimal(0);
for (Recipe recipe : recipeList) {
rxTotalFee = rxTotalFee.add(recipe.getPayMoney());
}
log.info("{} [处方]金额计算{} outTradeNo={}, bankTransNo={}, rxTotalFee={}, totalFee={}", merchantEnum.NAME, (rxTotalFee.compareTo(new BigDecimal(totalFee)) == 0 ? "" : "异常"), outTradeNo, bankTransNo, rxTotalFee, totalFee);
if (rxTotalFee.compareTo(new BigDecimal(totalFee)) > 0) { // 支付的金额不足
log.info("{} [处方]缴费金额异常 outTradeNo={}, bankTransNo={}, rxTotalFee={}, totalFee={}", merchantEnum.NAME, outTradeNo, bankTransNo, rxTotalFee, totalFee);
return false;
}
List<Recipe> failedList = new ArrayList<>(); // HIS缴费失败的处方单
long begTime = System.currentTimeMillis(); // 开始时间
@ -364,13 +377,9 @@ public class RecipeService {
String tip = String.format("共计缴费处方单数:%s,失败数:%s,超时数:%s", recipeList.size(), (failedList.size() - outTimeList.size()), outTimeList.size());
log.info("{} [处方]{}", merchantEnum.NAME, tip);
MeTechnologyReConfig.reserveRun(patientId); //天助医技预约
TZReserveConfig.reserveRun(patientId); // 天助医技预约
HCodeService.payNotifyReportHISData(openid, patientId);
return true;
}
@ -994,4 +1003,39 @@ public class RecipeService {
return new RecipeDao().updateMicroOrderState(outTradeNo, bankTransNo, openid);
}
public List<HisRecipe> filterPaidList(List<HisRecipe> hisRecipeList) {
List<HisRecipe> dataList = new ArrayList<>();
HisRecipe treatItem;
List<HisRecipe> groupList;
for (HisRecipe item : hisRecipeList) {
String treatNum = item.getMzNum();
if (ObjectUtils.isEmpty(treatNum)) {
continue;
}
String execDate = item.getExecDate();
item.setTreatNum(treatNum);
HisRecipe findTreat = dataList.stream().filter(o -> o.getTreatNum().equals(treatNum)).findFirst().orElse(null);
if (findTreat == null) {
treatItem = new HisRecipe();
treatItem.setTreatNum(treatNum);
treatItem.setDate(execDate);
groupList = new ArrayList<>();
groupList.add(item);
treatItem.setGroupList(groupList);
dataList.add(treatItem);
} else {
if (findTreat.getGroupList() == null) {
findTreat.setGroupList(new ArrayList<>());
}
Boolean isGreaterThan = DateHelper.leftGreaterThanRight(execDate, findTreat.getDate(), null);
if (isGreaterThan != null && isGreaterThan) {
findTreat.setDate(execDate);
}
findTreat.getGroupList().add(item);
}
}
return dataList;
}
}

@ -207,10 +207,7 @@ public class RegService {
log.info("{} [挂号]更新HIS挂号信息成功 patientId={}", merchantEnum.NAME, patientId);
}
if (HospEnum.isHosp(HospEnum.红河州人民医院) && "0503".equals(reg.getDeptCode())) {
MessagePushConfig.regObsDocument(merchantEnum, reg);
}
new MsgPushService().regMsgPush(merchantEnum, reg);
// 短信通知
smsNotice(reg);
@ -344,37 +341,11 @@ public class RegService {
* @param reg 预约信息
*/
private boolean smsNotice(Register reg) {
String tel = reg.getTel();
String date = reg.getRegDate();
String begTime = reg.getBegTime();
String endTime = reg.getEndTime();
String openid = reg.getOpenid();
if (ObjectUtils.isEmpty(tel) || tel.length() != 11) {
log.info("[挂号]短信通知:tel为空或长度异常");
return false;
}
if (ObjectUtils.isEmpty(openid)) { // 关注过,并且填写过电话号码
log.info("[挂号]短信通知:openid为空");
}
boolean isResult = false;
if (HospEnum.isHosp(HospEnum.德宏州中医医院)) {
SmsRegTem sms = new SmsRegTem();
sms.setHosp_tel("0692-2991794");
sms.setTime(date + " " + begTime + "-" + endTime);
sms.setAddress(reg.getAddress() == null ? "" : reg.getAddress().replace(" ", "").replace("(", "(").replace(")", ")"));
sms.setDeptName(reg.getDeptName());
sms.setDoctorName(reg.getDoctName());
sms.setSeq(reg.getQueueNum());
sms.setHosp_tip("提前15分钟到医院门诊各导医服务台签到后排队候诊");
log.info("[挂号]发送预约短信通知 sms={}, appId={}, tel-{}", JsonHelper.toJsonString(sms), WeChatConfig.APP_ID, tel);
isResult = SmsHelper.send("SMS_475980406", tel, sms);
}
return isResult;
return new SmsService().sms_reg_001(reg);
}
@ -427,21 +398,7 @@ public class RegService {
Result result = regAutoRefund(merchantEnum, JsonResult, reg.getOpenid(), payMoney, outTradeNo, dbTradeNo, "取消预约", pushInfo, reg.getUpdateTime());
// 短信通知
if (HospEnum.isHosp(HospEnum.德宏州中医医院)) {
String tel = reg.getTel();
if (tel != null && tel.length() == 11) {
String template = "SMS_184121392";
SmsRegTem sms = new SmsRegTem();
sms.setTime(reg.getRegDate() + " " + reg.getBegTime() + "-" + reg.getEndTime());
sms.setDeptName(reg.getDeptName());
sms.setDoctorName(reg.getDoctName());
sms.setAddress(reg.getAddress());
sms.setSeq(reg.getQueueNum());
SmsHelper.send(template, tel, sms);
}
}
new SmsService().sms_reg_002(reg);
MessagePushConfig.regCancelPush(merchantEnum, reg);
if (result.isOK()) {
@ -500,11 +457,7 @@ public class RegService {
return Result.error("支付方式未匹配 outTradeNo=" + outTradeNo);
}
if (HospEnum.isHosp(HospEnum.红河州人民医院)) {
if (MiddleOfficeConfig.MIDDLE_OFFICE_URL != null) {
MiddleOfficeConfig.uploadTreatNum("JH0105", reg.getTreatNum());
}
}
new MiddleOfficeService().reg_JH0105(reg.getTreatNum());
log.info("{}[今日挂号][取消预约]开始退款:outTradeNo={}, dbTradeNo={}, payMoney={}", merchantEnum.NAME, outTradeNo, dbTradeNo, payMoney);
@ -512,21 +465,7 @@ public class RegService {
Result result = refundTodayRegister(merchantEnum, JsonResult, reg.getOpenid(), payMoney, outTradeNo, dbTradeNo, "取消预约", pushInfo, reg.getUpdateTime());
// 短信通知
if (HospEnum.isHosp(HospEnum.德宏州中医医院)) {
String tel = reg.getTel();
if (tel != null && tel.length() == 11) {
String template = "SMS_184121392";
SmsRegTem sms = new SmsRegTem();
sms.setTime(reg.getRegDate() + " " + reg.getBegTime() + "-" + reg.getEndTime());
sms.setDeptName(reg.getDeptName());
sms.setDoctorName(reg.getDoctName());
sms.setAddress(reg.getAddress());
sms.setSeq(reg.getQueueNum());
SmsHelper.send(template, tel, sms);
}
}
new SmsService().sms_reg_002(reg); // 短信通知
MessagePushConfig.regCancelPush(merchantEnum, reg);
if (result.isOK()) {

@ -0,0 +1,63 @@
package com.ynxbd.common.service;
import com.ynxbd.common.bean.enums.HospEnum;
import com.ynxbd.common.bean.pay.Register;
import com.ynxbd.common.bean.sms.SmsRegTem;
import com.ynxbd.common.helper.common.JsonHelper;
import com.ynxbd.common.helper.common.SmsHelper;
import com.ynxbd.wx.config.WeChatConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
@Slf4j
public class SmsService {
public boolean sms_reg_001(Register reg) {
String tel = reg.getTel();
String date = reg.getRegDate();
String begTime = reg.getBegTime();
String endTime = reg.getEndTime();
if (ObjectUtils.isEmpty(tel) || tel.length() != 11) {
log.info("[挂号]短信通知:tel为空或长度异常");
return false;
}
boolean isResult = false;
if (HospEnum.德宏州中医医院.isHosp()) {
SmsRegTem sms = new SmsRegTem();
sms.setHosp_tel("0692-2991794");
sms.setTime(date + " " + begTime + "-" + endTime);
sms.setAddress(reg.getAddress() == null ? "" : reg.getAddress().replace(" ", "").replace("(", "(").replace(")", ")"));
sms.setDeptName(reg.getDeptName());
sms.setDoctorName(reg.getDoctName());
sms.setSeq(reg.getQueueNum());
sms.setHosp_tip("提前15分钟到医院门诊各导医服务台签到后排队候诊");
log.info("[挂号]发送预约短信通知 sms={}, appId={}, tel-{}", JsonHelper.toJsonString(sms), WeChatConfig.APP_ID, tel);
isResult = SmsHelper.send("SMS_475980406", tel, sms);
}
return isResult;
}
// 短信通知
public void sms_reg_002(Register reg) {
String tel = reg.getTel();
if (ObjectUtils.isEmpty(tel) || tel.length() != 11) {
log.info("[挂号]短信通知:tel为空或长度异常");
return;
}
if (HospEnum.德宏州中医医院.isHosp()) {
String template = "SMS_184121392";
SmsRegTem sms = new SmsRegTem();
sms.setTime(reg.getRegDate() + " " + reg.getBegTime() + "-" + reg.getEndTime());
sms.setDeptName(reg.getDeptName());
sms.setDoctorName(reg.getDoctName());
sms.setAddress(reg.getAddress());
sms.setSeq(reg.getQueueNum());
SmsHelper.send(template, tel, sms);
}
}
}

@ -2,16 +2,14 @@ package com.ynxbd.wx.config;
import com.alibaba.fastjson.JSONObject;
import com.ynxbd.common.helper.ProperHelper;
import com.ynxbd.common.helper.http.OkHttpHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.JsonResultEnum;
import com.ynxbd.wx.utils.XMLUtil;
import lombok.extern.slf4j.Slf4j;
import okhttp3.*;
import java.io.IOException;
/**
* 佳禾美康数据
*
* @author 李进才
* @ClassName MiddleOfficeConfig
* @Description TODO
@ -22,12 +20,13 @@ public class MiddleOfficeConfig {
private MiddleOfficeConfig() {
}
// 佳禾美康数据上传链接
public static final String MIDDLE_OFFICE_URL;
public static final String MIDDLE_OFFICE_URL_ESB;
public static final String MIDDLE_OFFICE_HOSPITAL;
public static final String MIDDLE_OFFICE_ITEM_NAME;
public static final boolean IS_LOG_RESP;
static {
@ -36,6 +35,7 @@ public class MiddleOfficeConfig {
MIDDLE_OFFICE_HOSPITAL = config.getString("middle_office_hospital");
MIDDLE_OFFICE_URL_ESB = config.getString("middle_office_url_esb");
MIDDLE_OFFICE_ITEM_NAME = config.getString("middle_office_item_name");
IS_LOG_RESP = config.getBoolean("middle_office.is_log_resp", false);
}
public static void run(String soapUrl, String requestData, String mdUrl, String transactionCode, String responseResult) {
@ -93,8 +93,6 @@ public class MiddleOfficeConfig {
if ("".equals(interfaceName) || "".equals(jsonData) || interfaceName == null || jsonData == null) {
return;
}
JSONObject json = new JSONObject();
JSONObject head = new JSONObject();
JSONObject body = new JSONObject();
@ -123,7 +121,7 @@ public class MiddleOfficeConfig {
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
log.error("[平台数据上传]上传失败,interfaceName:{},jsonData:{},error:{}",interfaceName,jsonData,e.toString());
log.error("[平台数据上传]上传失败,interfaceName:{}, {}, error:{}", interfaceName, (IS_LOG_RESP ? jsonData : ""), e.toString());
}
@Override
@ -131,9 +129,8 @@ public class MiddleOfficeConfig {
// log.info("[平台数据上传]成功 状态码:{},interfaceName:{},jsonData:{}",response.code(),interfaceName,jsonData);
}
});
}
catch (Exception e){
log.error("[平台数据上传]执行失败,interfaceName:{},jsonData:{},error:{}",interfaceName,jsonData,e.toString());
} catch (Exception e) {
log.error("[平台数据上传]执行失败,interfaceName:{}, {} ,error:{}", interfaceName, (IS_LOG_RESP ? jsonData : ""), e.toString());
}
}
@ -144,7 +141,6 @@ public class MiddleOfficeConfig {
return;
}
JSONObject json = new JSONObject();
JSONObject head = new JSONObject();
JSONObject body = new JSONObject();
@ -181,8 +177,7 @@ public class MiddleOfficeConfig {
log.info("[平台数据上传]成功 状态码:{},head:{},body:{},url:{}", response.code(), head, body, MIDDLE_OFFICE_URL_ESB);
}
});
}
catch (Exception e){
} catch (Exception e) {
log.error("[平台数据上传]执行失败,interfaceName:{},treatNum:{},error:{}", interfaceName, treatNum, e.toString());
}
}

@ -22,52 +22,47 @@ import java.util.Map;
/**
* 天助平台配置
*
* @author 李进才
* @ClassName MeTechnologyReConfig
* @Description TODO
* @date 2024/06/14 09:27:00
*/
@Slf4j
public class MeTechnologyReConfig {
private MeTechnologyReConfig() {
public class TZReserveConfig {
private TZReserveConfig() {
}
public static final String MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL;
public static final String MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO;
public static final String MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID;
public static final String MEDICAL_TECHNOLOGY_RESERVE_JSON_URL;
public static final MediaType JSON
= MediaType.parse("application/json; charset=utf-8");
public static final String TZ_RESERVE_WEBSERVICE_URL;
public static final String TZ_RESERVE_TERMINAL_NO;
public static final String TZ_RESERVE_TEST_PATIENT_ID;
public static final String TZ_RESERVE_JSON_URL;
public static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
static {
ProperHelper config = new ProperHelper().read("medical-technology-reserve.properties");
if (config == null) {
MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL = null;
MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO = null;
MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID = null;
MEDICAL_TECHNOLOGY_RESERVE_JSON_URL = null;
} else {
MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL = config.getString("medical_technology_reserve_webservice_url");
MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO = config.getString("medical_technology_reserve_terminal_no");
MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID = config.getString("medical_technology_reserve_test_patientId");
MEDICAL_TECHNOLOGY_RESERVE_JSON_URL = config.getString("medical_technology_reserve_json_url");
}
ProperHelper config = new ProperHelper().read("tz-reserve.properties");
TZ_RESERVE_WEBSERVICE_URL = config.getString("tz_reserve.webservice_url");
TZ_RESERVE_TERMINAL_NO = config.getString("tz_reserve.terminal_no");
TZ_RESERVE_TEST_PATIENT_ID = config.getString("tz_reserve.test_patientId");
TZ_RESERVE_JSON_URL = config.getString("tz_reserve.json_url");
}
// 天助医技预约
public static void reserveRun(String patientId) {
try {
if (MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL == null) {
if (TZ_RESERVE_WEBSERVICE_URL == null) {
return;
}
if (MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID != null) {
if (!patientId.equals(MEDICAL_TECHNOLOGY_RESERVE_TEST_PATIENT_ID)) {
if (TZ_RESERVE_TEST_PATIENT_ID != null) {
if (!patientId.equals(TZ_RESERVE_TEST_PATIENT_ID)) {
log.info("[天助预约平台] 不是测试账号,不允许调用接口 patientId-{}", patientId);
return;
}
}
String result = OkHttpHelper.get(MEDICAL_TECHNOLOGY_RESERVE_WEBSERVICE_URL, params -> {
String result = OkHttpHelper.get(TZ_RESERVE_WEBSERVICE_URL, params -> {
params.put("patientID", patientId);
params.put("terminalNo", MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO);
params.put("terminalNo", TZ_RESERVE_TERMINAL_NO);
});
JsonResult jsonResult = JsonResult.xmlToBean(result, JsonResultEnum.SYS_RESERVE);
if (jsonResult == null) {
@ -84,7 +79,7 @@ public class MeTechnologyReConfig {
}
public static String getToken() {
String result = OkHttpHelper.get(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL + "/Tools/Tool/GetToken", params -> {
String result = OkHttpHelper.get(TZ_RESERVE_JSON_URL + "/Tools/Tool/GetToken", params -> {
params.put("clientName", "WXAPP");
params.put("clientCode", "wxapp");
});
@ -108,11 +103,11 @@ public class MeTechnologyReConfig {
params.put("PatientId", patientId);
params.put("StartDate", startDate);
params.put("EndDate", endDate);
params.put("TerminalNo", MEDICAL_TECHNOLOGY_RESERVE_TERMINAL_NO);
params.put("TerminalNo", TZ_RESERVE_TERMINAL_NO);
params.put("IsBooked", "2");
RequestBody requestBody = RequestBody.create(JSON, JsonHelper.toJsonString(params));
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL + "/BookDetails/BookDetails/GetCanBookOrders", requestBody, headers -> {
String result = OkHttpHelper.post(TZ_RESERVE_JSON_URL + "/BookDetails/BookDetails/GetCanBookOrders", requestBody, headers -> {
headers.add("token", getToken());
});
JSONObject jsonObject = JsonHelper.parseObject(result);
@ -147,7 +142,7 @@ public class MeTechnologyReConfig {
String json = JsonHelper.toJsonString(params);
RequestBody requestBody = RequestBody.create(JSON, json);
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL + "/BookDetails/BookDetails/GetNumberSourceStatistics", requestBody, headers -> {
String result = OkHttpHelper.post(TZ_RESERVE_JSON_URL + "/BookDetails/BookDetails/GetNumberSourceStatistics", requestBody, headers -> {
headers.add("token", getToken());
});
JSONObject jsonObject = JsonHelper.parseObject(result);
@ -180,7 +175,7 @@ public class MeTechnologyReConfig {
jsonParams.put("appFromID", appFromID);
RequestBody requestBody = RequestBody.create(JSON, jsonParams.toJSONString());
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL + "/BookDetails/BookDetails/GetNumberSourceDetails", requestBody, headers -> {
String result = OkHttpHelper.post(TZ_RESERVE_JSON_URL + "/BookDetails/BookDetails/GetNumberSourceDetails", requestBody, headers -> {
headers.add("token", getToken());
});
JSONObject jsonObject = JsonHelper.parseObject(result);
@ -213,7 +208,7 @@ public class MeTechnologyReConfig {
params.put("endDateTime", endDateTime);
params.put("lockStatus", lockStatus);
RequestBody requestBody = RequestBody.create(JSON, JsonHelper.toJsonString(params));
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL + "/BookDetails/BookDetails/LockedBookNo", requestBody, headers -> {
String result = OkHttpHelper.post(TZ_RESERVE_JSON_URL + "/BookDetails/BookDetails/LockedBookNo", requestBody, headers -> {
headers.add("token", getToken());
});
JSONObject jsonObject = JsonHelper.parseObject(result);
@ -242,7 +237,7 @@ public class MeTechnologyReConfig {
params.put("ScheduleUser", patientName);
log.info("[天助预约平台] 确定预约json={}", JsonHelper.toProJsonString(params));
RequestBody requestBody = RequestBody.create(JSON, JsonHelper.toProJsonString(params));
String result = OkHttpHelper.post(MEDICAL_TECHNOLOGY_RESERVE_JSON_URL + "/BookDetails/BookDetails/GetBookedDateTime", requestBody, headers -> {
String result = OkHttpHelper.post(TZ_RESERVE_JSON_URL + "/BookDetails/BookDetails/GetBookedDateTime", requestBody, headers -> {
headers.add("token", getToken());
});
JSONObject jsonObject = JsonHelper.parseObject(result);

@ -1,6 +1,7 @@
package com.ynxbd.wx.servlet;
import com.ynxbd.common.bean.enums.MerchantEnum;
import com.ynxbd.common.helper.common.Base64Helper;
import com.ynxbd.common.helper.common.HttpHelper;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.config.WeChatConfig;
@ -51,7 +52,6 @@ public class QServlet extends HttpServlet {
}
String patientId = request.getParameter("p");
log.info("{} [patientId={}]多张处方扫码请求,开始解析...", merchantEnum.NAME, patientId);
if (StringUtils.isEmpty(patientId) && StringUtils.isEmpty(request.getParameter("t"))) {
@ -67,9 +67,14 @@ public class QServlet extends HttpServlet {
log.info("[支付] 多张扫码请求 参数无效");
return;
}
String cardNo = request.getParameter("t");
cardNo = ObjectUtils.isEmpty(cardNo) ? "" : Base64Helper.decode(cardNo);
if (!ObjectUtils.isEmpty(cardNo)) {
cardNo = "&ent=" + ReqParamHelper.encode(cardNo);
}
if (MerchantEnum.WX.equals(merchantEnum)) {
response.sendRedirect(WeChatConfig.getWebUrl() + "pay-qr-recipe.html?p=" + patientId + "&enp=" + ReqParamHelper.encode(patientId)+ "&ent=" + request.getParameter("t"));
response.sendRedirect(WeChatConfig.getWebUrl() + "pay-qr-recipe.html?p=" + patientId + "&enp=" + ReqParamHelper.encode(patientId) + cardNo);
}
}

@ -21,6 +21,8 @@ public class ReqParamHelper {
}
public static void main(String[] args) {
System.out.println(encode("397631"));
// System.out.println(encode("397631"));
System.out.println(encode("25578718"));
System.out.println(decode("EF6115C81C9EA8FF79E21180FEC20294"));
}
}

@ -25,6 +25,8 @@ import java.util.Map;
@Slf4j
public class WxAuthHelper {
private static final int SESSION_MAX_INACTIVE_INTERVAL = 60 * 60; // session最大存活时间 1H
public static String auth(HttpServletRequest request, HttpServletResponse response, boolean isUserInfo) {
String code = request.getParameter("code");
String state = request.getParameter("state");
@ -42,7 +44,9 @@ public class WxAuthHelper {
if (snsToken != null) {
String openid = snsToken.getOpenid();
if (openid != null) {
request.getSession().setAttribute("openid", openid);
HttpSession session = request.getSession();
session.setMaxInactiveInterval(SESSION_MAX_INACTIVE_INTERVAL);
session.setAttribute("openid", openid);
Cache<String, User> cache = WxCacheHelper.getUserCache();
if (WeChatConfig.isDevUser(openid) || !cache.containsKey(openid)) {

@ -230,8 +230,15 @@ public class WxMedicalHelper {
public static JSONObject getMdAuthUrl(String callbackUrl, String callNo) {
callNo = ObjectUtils.isEmpty(callNo) ? "" : ("?callNo=" + callNo);
callbackUrl = ObjectUtils.isEmpty(callbackUrl) ? "" : callbackUrl;
JSONObject jsonObj = new JSONObject();
jsonObj.put("url", WxFactory.Medical.Common().getAuthUrl(WeChatConfig.getWebUrl() + callbackUrl) + callNo);
String authUrl = WxFactory.Medical.Common().getAuthUrl(WeChatConfig.getWebUrl() + callbackUrl);
log.info("[医保] authUrl={}", authUrl);
if (ObjectUtils.isEmpty(authUrl)) {
jsonObj.put("url", "config_error");
} else {
jsonObj.put("url", authUrl + callNo);
}
jsonObj.put("type", MerchantEnum.WX_MEDICAL.CODE);
return jsonObj;
}

@ -78,7 +78,7 @@ public class Client {
return null;
}
if (!response.isSuccess()) {
log.error("[oath2]请求失败 errCode={}, errMsg={}", response.getErrCode(), response.getErrMsg());
log.error("[oath2]获取权限失败 errCode={}, errMsg={}", response.getErrCode(), response.getErrMsg());
return null;
}
return response;
@ -101,7 +101,7 @@ public class Client {
}
if (!response.isSuccess()) {
log.error("[sns-user_info]请求失败 errCode={}, errMsg={}", response.getErrCode(), response.getErrMsg());
log.warn("[sns-user_info]用户未授权 errCode={}, errMsg={}", response.getErrCode(), response.getErrMsg());
}
if (emoji != 0 && response.getNickname() != null) {

@ -15,6 +15,7 @@ import com.ynxbd.wx.wxfactory.utils.WxSignHelper;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.ObjectUtils;
import java.math.BigDecimal;
import java.util.Date;
@ -32,8 +33,9 @@ public class Client {
* @param url url
*/
public String getAuthUrl(String url) {
log.info("[医保]免密授权地址-{}", MdConfig.getConfigUrl(url));
return MdConfig.getConfigUrl(url);
String configUrl = MdConfig.getConfigUrl(url);
log.info("[医保]免密授权地址-{}", configUrl);
return configUrl;
}

@ -0,0 +1,33 @@
# \u533B\u4FDD\u914D\u7F6E
medical.is_dev=true
medical.is_enable=true
medical.is_auto_refund=true
# \u53EA\u6709\u8BA2\u9605\u53F7\u7684\u533B\u9662\u6216\u53EA\u60F3\u7528\u8BA2\u9605\u53F7\u7684\u533B\u9662 \u7533\u8BF7\u4E00\u4E2A\u7A7A\u670D\u52A1\u53F7 \u7A7A\u670D\u52A1\u53F7\u914D\u7F6E\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF08\u670D\u52A1\u53F7\uFF09appId
medical.md_app_id=
medical.md_app_secret=
# \u57CE\u5E02\u7F16\u7801\uFF08\u817E\u8BAF\u63D0\u4F9B\uFF09
medical.city_code=
# \u533B\u9662\u540D\u79F0
medical.hospital_name=
# \u533B\u4FDD\uFF081.excel\u6587\u6863\uFF09----------------------------------------------------------------------------------
# \u5B9A\u70B9\u533B\u836F\u673A\u6784\u7F16\u7801
medical.org_no=H00000000000
# \u5B9A\u70B9\u533B\u836F\u673A\u6784\u5C0F\u7A0B\u5E8F/h5\u5E94\u7528id\uFF08\u6B63\u5F0F\u73AF\u5883\uFF1A\u6E20\u9053\u7F16\u53F7\uFF09
medical.org_app_id=
# \u5B9A\u70B9\u533B\u836F\u673A\u6784\u6E20\u9053\u8BA4\u8BC1\u7F16\u7801
medical.org_chnl_crtf_codg=
# \u514D\u5BC6\u6388\u6743\uFF082.\u8054\u7CFB\u817E\u8BAF-->\u90AE\u4EF6\u63D0\u4F9B\uFF08\u9700\u63D0\u4F9B\u7ED9\u817E\u8BAF\u8D1F\u8D23\u4EBA\uFF1A1.\u533B\u9662\u6B63\u5F0F\u57DF\u540D\u30012.\u516C\u4F17\u53F7appid\u30013.\u514D\u5BC6\u6388\u6743ip\u767D\u540D\u5355\uFF09\uFF09----------
# \u5408\u4F5C\u65B9id
medical.partner_id=
# \u6D4B\u8BD5\u5BC6\u94A5
medical.dev_partner_secret=
# \u6B63\u5F0F\u5BC6\u94A5
medical.partner_secret=
# \u6E20\u9053\u53F7channel
medical.channel=
# \u533B\u4FDD\u652F\u4ED8\u7B7E\u540Dkey\uFF083.\u516C\u4F17\u53F7-->\u533B\u4FDD\u652F\u4ED8\u529F\u80FD\u5F00\u901A\u540E-->\u90AE\u4EF6\u63D0\u4F9B\uFF09----------------------------------------
medical.pay_key=

@ -0,0 +1,29 @@
# \u533B\u4FDD\u914D\u7F6E
medical.is_dev=true
medical.is_enable=true
medical.is_auto_refund=true
# \u57CE\u5E02\u7F16\u7801\uFF08\u817E\u8BAF\u63D0\u4F9B\uFF09
medical.city_code=532500
# \u533B\u9662\u540D\u79F0
medical.hospital_name=\u8499\u81EA\u5E02\u5987\u5E7C\u4FDD\u5065\u9662\uFF08\u8499\u81EA\u5E02\u5987\u5973\u513F\u7AE5\u533B\u9662\uFF09
# \u533B\u4FDD\uFF081.excel\u6587\u6863\uFF09----------------------------------------------------------------------------------
# \u5B9A\u70B9\u533B\u836F\u673A\u6784\u7F16\u7801
medical.org_no=H53250300180
# \u5B9A\u70B9\u533B\u836F\u673A\u6784\u5C0F\u7A0B\u5E8F/h5\u5E94\u7528id\uFF08\u6B63\u5F0F\u73AF\u5883\uFF1A\u6E20\u9053\u7F16\u53F7\uFF09
medical.org_app_id=1GBPJCKU80043F60C80A00001CE39A66
# \u5B9A\u70B9\u533B\u836F\u673A\u6784\u6E20\u9053\u8BA4\u8BC1\u7F16\u7801
medical.org_chnl_crtf_codg=BqK1kMStlhVDgN2uHf4EsLK/F2LjZPYJ81nK2eYQqxtPbiPNIsvGFlw+DnMTrurn
# \u514D\u5BC6\u6388\u6743\uFF082.\u8054\u7CFB\u817E\u8BAF-->\u90AE\u4EF6\u63D0\u4F9B\uFF08\u9700\u63D0\u4F9B\u7ED9\u817E\u8BAF\u8D1F\u8D23\u4EBA\uFF1A1.\u533B\u9662\u6B63\u5F0F\u57DF\u540D\u30012.\u516C\u4F17\u53F7appid\u30013.\u514D\u5BC6\u6388\u6743ip\u767D\u540D\u5355\uFF09\uFF09----------
# \u5408\u4F5C\u65B9id
medical.partner_id=50008770
# \u6D4B\u8BD5\u5BC6\u94A5
medical.dev_partner_secret=28ed20c054de87353defbbe00085f1d6
# \u6B63\u5F0F\u5BC6\u94A5
medical.partner_secret=9007e37ec6da1997586d0b857554e3b4
# \u6E20\u9053\u53F7channel
medical.channel=AAHUp9Lp_yjmcOGQjI5CvA1T
# \u533B\u4FDD\u652F\u4ED8\u7B7E\u540Dkey\uFF083.\u516C\u4F17\u53F7-->\u533B\u4FDD\u652F\u4ED8\u529F\u80FD\u5F00\u901A\u540E-->\u90AE\u4EF6\u63D0\u4F9B\uFF09----------------------------------------
medical.pay_key=6b8e0b6191c3baa073b1ac2ff130b990

@ -1,5 +0,0 @@
medical_technology_reserve_webservice_url =
medical_technology_reserve_terminal_no =
medical_technology_reserve_test_patientId =
medical_technology_reserve_json_url =

@ -29,5 +29,5 @@ medical.partner_secret=f92df3128382757425ba4c5ca166688f
# \u6E20\u9053\u53F7
medical.channel=aaghgf2i4ddgrokh247fgo7n
# \u533B\u4FDD\u652F\u4ED8\u7B7E\u540Dkey\uFF083.\u516C\u4F17\u53F7-->\u57CE\u5E02\u670D\u52A1-->\u533B\u4FDD\u652F\u4ED8\u529F\u80FD\u5F00\u901A\u540E-->\u90AE\u4EF6\u63D0\u4F9B\uFF09----------------------------------------
# \u533B\u4FDD\u652F\u4ED8\u7B7E\u540Dkey\uFF083.\u516C\u4F17\u53F7-->\u533B\u4FDD\u652F\u4ED8\u529F\u80FD\u5F00\u901A\u540E-->\u90AE\u4EF6\u63D0\u4F9B\uFF09----------------------------------------
medical.pay_key=9baafa056ad046ebf4fafc2b80c17df6

@ -2,3 +2,5 @@ middle_office_url=
middle_office_url_esb=
middle_office_hospital=
middle_office_item_name=
# \u662F\u5426\u6253\u5370\u8FD4\u56DE\u6570\u636E
middle_office.is_log_resp=false

@ -0,0 +1,5 @@
# \u5929\u52A9\u9884\u7EA6\u5E73\u53F0
tz_reserve.webservice_url=http://10.255.248.183:9003/WebService1.asmx/SlipPrint
tz_reserve.terminal_no=VX
tz_reserve.json_url=http://10.255.248.183:9001
#tz_reserve.test_patientId=

@ -1 +1 @@
# \u5F00\u542F\u5904\u65B9\u9884\u7ED3\u7B97\uFF08\u7B2C2\u5F00\u5173\uFF09\uFF08\u6CE8\u610F\u8BE5\u914D\u7F6E\u9700\u8054\u7CFBhis\u5F00\u53D1\u8005\u786E\u8BA4\u652F\u6301\u624D\u80FD\u5F00\u542F\uFF0C\u5426\u5219\u5B58\u5728\u98CE\u9669\uFF01\uFF09 his.is_recipe_prepay=false lis.url=192.168.1.185:8090 lis.unifiedEntrance=true # \u672C\u5730 #his.url=127.0.0.1:8888 # \u6D4B\u8BD5\u73AF\u5883 # \u662F\u5426\u5F3A\u5236\u6253\u5370webservice\u7684xml\u8FD4\u56DE\u6570\u636E his.is_log_resp=true # \u662F\u5426\u4F20\u9012openid\u7ED9his\u63A8\u9001\u6D88\u606F his.is_push_msg=false #------------------------------------------------------------- #\u672C\u5730 his.md_url=127.0.0.1:7777 his.dev_url=127.0.0.1:7777 his.url=200.200.200.60:8888 ali_code=675448357 # \u516C\u53F8\u6D4B\u8BD5 #his.url=192.168.12.10:8888 # \u7EA2\u6CB3 #his.url=10.20.10.6:8888 # \u7EA2\u6CB3\u533B\u4FDD #his.url=10.20.10.6:8888 #his.url=192.168.12.10:8888 #his.md_url=192.168.1.128:7885 #his.dev_url=10.20.10.6:9988 # \u6C38\u80DC #his.url=200.200.200.20:8888 # \u5FB7\u5B8F\u4E2D\u533B #his.url=200.200.200.60:8888 # \u534E\u576A #his.url=192.168.1.115:8888 # \u8499\u81EA\u4E2D\u533B #his.url=192.168.0.228:8888 # \u7389\u9F99 #his.url=192.168.0.17:8888 # \u4E91\u9F99 #his.url=200.200.200.69:8888 # #his.url=172.16.10.15:8888 # \u7984\u529D\u949F\u7231 #his.url=200.200.200.5:8888 # \u8499\u81EA\u5E02\u4EBA\u6C11\u533B\u9662 #his.url=200.200.200.174:8080 # \u5143\u8C0B #his.url=200.200.200.29:8888 # \u5143\u8C0B\u533B\u4FDD #his.dev_url=200.200.200.36:9999 # \u8292\u5E02 #his.url=192.168.100.8:8888 # \u7EA2\u6CB3\u5987\u5E7C\u4FDD\u5065\u9662 #his.url=192.168.1.204:8888 # \u8292\u5E02\u5987\u5E7C #his.url=192.168.11.7:8888 # #his.url=10.10.11.23:8888 # \u77F3\u6797 #his.url=192.168.10.10:8888 # \u5BCC\u6C11 #his.url=200.200.201.27:8888 # \u897F\u53CC\u7248\u7EB3 #his.url=10.10.11.23:8888 #wx.password=ynxbd@6910
# \u5F00\u542F\u5904\u65B9\u9884\u7ED3\u7B97\uFF08\u7B2C2\u5F00\u5173\uFF09\uFF08\u6CE8\u610F\u8BE5\u914D\u7F6E\u9700\u8054\u7CFBhis\u5F00\u53D1\u8005\u786E\u8BA4\u652F\u6301\u624D\u80FD\u5F00\u542F\uFF0C\u5426\u5219\u5B58\u5728\u98CE\u9669\uFF01\uFF09 his.is_recipe_prepay=false lis.url=192.168.1.185:8090 lis.unifiedEntrance=true # \u672C\u5730 #his.url=127.0.0.1:8888 # \u6D4B\u8BD5\u73AF\u5883 ali_code=675448357 # \u662F\u5426\u5F3A\u5236\u6253\u5370webservice\u7684xml\u8FD4\u56DE\u6570\u636E his.is_log_resp=true # \u662F\u5426\u4F20\u9012openid\u7ED9his\u63A8\u9001\u6D88\u606F his.is_push_msg=false #------------------------------------------------------------- #\u672C\u5730 his.md_url=127.0.0.1:7777 his.dev_url=127.0.0.1:7777 ## \u5FB7\u5B8F\u4E2D\u533B #his.url=200.200.200.60:8888 # \u7EA2\u6CB3\u5DDE\u533B\u9662 his.url=10.20.10.6:8888 # \u516C\u53F8\u6D4B\u8BD5 #his.url=192.168.12.39:8888 # \u516C\u53F8\u6D4B\u8BD5 #his.url=192.168.12.10:8888 # \u7EA2\u6CB3 #his.url=10.20.10.6:8888 # \u7EA2\u6CB3\u533B\u4FDD #his.url=10.20.10.6:8888 #his.url=192.168.12.10:8888 #his.md_url=192.168.1.128:7885 #his.dev_url=10.20.10.6:9988 # \u6C38\u80DC #his.url=200.200.200.20:8888 # \u5FB7\u5B8F\u4E2D\u533B #his.url=200.200.200.60:8888 # \u534E\u576A #his.url=192.168.1.115:8888 # \u8499\u81EA\u4E2D\u533B #his.url=192.168.0.228:8888 # \u7389\u9F99 #his.url=192.168.0.17:8888 # \u4E91\u9F99 #his.url=200.200.200.69:8888 # #his.url=172.16.10.15:8888 # \u7984\u529D\u949F\u7231 #his.url=200.200.200.5:8888 # \u8499\u81EA\u5E02\u4EBA\u6C11\u533B\u9662 #his.url=200.200.200.174:8080 # \u5143\u8C0B #his.url=200.200.200.29:8888 # \u5143\u8C0B\u533B\u4FDD #his.dev_url=200.200.200.36:9999 # \u8292\u5E02 #his.url=192.168.100.8:8888 # \u7EA2\u6CB3\u5987\u5E7C\u4FDD\u5065\u9662 #his.url=192.168.1.204:8888 # \u8292\u5E02\u5987\u5E7C #his.url=192.168.11.7:8888 # #his.url=10.10.11.23:8888 # \u77F3\u6797 #his.url=192.168.10.10:8888 # \u5BCC\u6C11 #his.url=200.200.201.27:8888 # \u897F\u53CC\u7248\u7EB3 #his.url=10.10.11.23:8888 #wx.password=ynxbd@6910
Loading…
Cancel
Save