1、新增处方撤销接口

2、查询互联网医院处方,返回的数据部分进行处理。
3、咨询费用和复诊费用查询接口调整。
4、处方流转接口进行加密处理。
master_pay
王绍全 3 weeks ago
parent b93db00df9
commit 334be111f5
  1. 9
      src/main/java/com/ynxbd/common/TestA.java
  2. 45
      src/main/java/com/ynxbd/common/action/RecipeAction.java
  3. 17
      src/main/java/com/ynxbd/common/action/TreatAction.java
  4. 2
      src/main/java/com/ynxbd/common/action/pay/MedicalTestAction.java
  5. 62
      src/main/java/com/ynxbd/common/action/xk/XKAction.java
  6. 1
      src/main/java/com/ynxbd/common/bean/HisRecipe.java
  7. 13
      src/main/java/com/ynxbd/common/bean/his/HisOLRegConsultFee.java
  8. 15
      src/main/java/com/ynxbd/common/bean/his/HisOLRegRevisitFee.java
  9. 4
      src/main/java/com/ynxbd/common/bean/xk/HisRxDrug.java
  10. 2
      src/main/java/com/ynxbd/common/bean/xk/HisWMRxItem.java
  11. 4
      src/main/java/com/ynxbd/common/dao/his/HisRecipeDao.java
  12. 32
      src/main/java/com/ynxbd/common/dao/his/HisTreatDao.java
  13. 17
      src/main/java/com/ynxbd/common/dao/his/HisXKDao.java
  14. 41
      src/main/java/com/ynxbd/common/his/HisEnum.java
  15. 8
      src/main/java/com/ynxbd/wx/wxfactory/WxPayHelper.java

@ -1,6 +1,7 @@
package com.ynxbd.common; package com.ynxbd.common;
import cn.hutool.core.util.IdcardUtil; import cn.hutool.core.util.IdcardUtil;
import com.alibaba.fastjson.JSONObject;
import com.ynxbd.common.helper.common.AesMicroHelper; import com.ynxbd.common.helper.common.AesMicroHelper;
import com.ynxbd.common.helper.common.JsonHelper; import com.ynxbd.common.helper.common.JsonHelper;
import com.ynxbd.common.helper.http.OkHttpHelper; import com.ynxbd.common.helper.http.OkHttpHelper;
@ -130,9 +131,9 @@ public class TestA {
// System.out.println(removeIds); // System.out.println(removeIds);
// } // }
//
// public static void main(String[] args) { public static void main(String[] args) {
// System.out.println(AesWxHelper.decode("562CF576AEC37AA2EC0CCB873ABF67A3060B9C01AD9B8068C43FEAEDDB00E5A6")); System.out.println(AesWxHelper.decode("DC88B70DDA4C2EA965CBF5FCD43297CD6478071E12258B40EE29EFFB3A1043CA"));
// } }
} }

@ -19,6 +19,7 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum; import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.RxService; import com.ynxbd.common.service.RxService;
import com.ynxbd.wx.config.WeChatConfig; import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Action;
@ -95,16 +96,17 @@ public class RecipeAction extends BaseAction {
int days = DateHelper.intervalDays(begDate, endDate, true); int days = DateHelper.intervalDays(begDate, endDate, true);
List<HisRecipe> hisRecipes = new HisRecipeDao().getRxUnPay(openid, patientId, personNo, days); List<HisRecipe> hisRecipes = new HisRecipeDao().getRxUnPay(openid, patientId, personNo, days);
List<HisRecipe> resultList = new ArrayList<>(); List<HisRecipe> dataList = new ArrayList<>();
for (HisRecipe hisRecipe : hisRecipes) { for (HisRecipe rxItem : hisRecipes) {
hisRecipe.setPid(patientId); rxItem.setPid(patientId);
hisRecipe.setTreatNum(hisRecipe.getMzNum()); rxItem.setTreatNum(rxItem.getMzNum());
if (hisRecipe.getDate() != null && DateHelper.inDateRange(begDate, endDate, hisRecipe.getDate(), DateHelper.DateEnum.yyyy_MM_dd) rxItem.setEnTreatNum(AesWxHelper.encode(rxItem.getTreatNum()));
&& !"1".equals(hisRecipe.getSTDFlag()) && (!"1".equals(hisRecipe.getInternetHospFlag()) || "1".equals(hisRecipe.getYJSAuditFlag()))) { if (rxItem.getDate() != null && DateHelper.inDateRange(begDate, endDate, rxItem.getDate(), DateHelper.DateEnum.yyyy_MM_dd)
resultList.add(hisRecipe); && !"1".equals(rxItem.getSTDFlag()) && (!"1".equals(rxItem.getInternetHospFlag()) || "1".equals(rxItem.getYJSAuditFlag()))) {
dataList.add(rxItem);
} }
} }
return Result.success(resultList); return Result.success(dataList);
} }
/** /**
@ -131,7 +133,7 @@ public class RecipeAction extends BaseAction {
/** /**
* 获取所以未缴费订单 包括互联网医院未审核,医保双通道订单 * [问诊处方]未缴费项目查询-【包括互联网医院未审核,医保双通道订单】
* *
* @param patientId patientId * @param patientId patientId
* @param begDate 开始时间 * @param begDate 开始时间
@ -139,35 +141,38 @@ public class RecipeAction extends BaseAction {
*/ */
@Action("getOLRxList") @Action("getOLRxList")
public Result getOLRxList(@AesDecode String patientId, String begDate, String endDate) { public Result getOLRxList(@AesDecode String patientId, String begDate, String endDate) {
log.info("[处方]未缴费项目查询 patientId={}", patientId); log.info("[问诊处方]未缴费项目查询 patientId={}", patientId);
if (patientId == null) { if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT); return Result.error(ResultEnum.PARAM_IS_DEFECT);
} }
int days = DateHelper.intervalDays(begDate, endDate, true); int days = DateHelper.intervalDays(begDate, endDate, true);
List<HisRecipe> hisRxList = new HisRecipeDao().getRxUnPay(null, patientId, "", days); List<HisRecipe> hisRxList = new HisRecipeDao().getRxUnPay(null, patientId, "", days);
List<HisRecipe> resultList = new ArrayList<>(); List<HisRecipe> dataList = new ArrayList<>();
for (HisRecipe rxItem : hisRxList) { for (HisRecipe rxItem : hisRxList) {
rxItem.setPid(patientId);
rxItem.setTreatNum(rxItem.getMzNum());
rxItem.setEnTreatNum(AesWxHelper.encode(rxItem.getTreatNum()));
if (rxItem.getDate() != null && DateHelper.inDateRange(begDate, endDate, rxItem.getDate(), DateHelper.DateEnum.yyyy_MM_dd)) { if (rxItem.getDate() != null && DateHelper.inDateRange(begDate, endDate, rxItem.getDate(), DateHelper.DateEnum.yyyy_MM_dd)) {
resultList.add(rxItem); dataList.add(rxItem);
} }
} }
return Result.success(resultList); return Result.success(dataList);
} }
/** /**
* 将订单上传到医保双通道 * 将订单上传到医保双通道
* *
* @param treatNum 门诊号 * @param treatNum 门诊号
* @param personID 身份证 * @param personId 身份证
* @param recipes 处方号合集,中间用英文逗号隔开 * @param rxIds 处方号合集,中间用英文逗号隔开
*/ */
@Action("uploadMedicalRecipe") @Action("medInsRxCirculation")
public Result uploadMedicalRecipe(String treatNum, String personID, String recipes) { public Result medInsRxCirculation(@AesDecode String treatNum, @AesDecode String personId, @AesDecode String rxIds) {
log.info("[互联网医院]处方医保双通道流转 treatNum={},personNo-{}, recipes={}", treatNum, personID, recipes); log.info("[互联网医院]处方医保双通道流转 treatNum={}, personNo={}, recipes={}", treatNum, personId, rxIds);
if (treatNum == null || personID == null || recipes == null) { if (treatNum == null || personId == null || rxIds == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT); return Result.error(ResultEnum.PARAM_IS_DEFECT);
} }
return new HisRecipeDao().uploadRxMI(treatNum, personID, recipes); return new HisRecipeDao().medInsRxCirculation(treatNum, personId, rxIds);
} }

@ -88,7 +88,7 @@ public class TreatAction extends BaseAction {
public Result getInquiryFee(String inquiryCode) { public Result getInquiryFee(String inquiryCode) {
log.info("[问诊]查询咨询费用信息 inquiryCode={}", inquiryCode); log.info("[问诊]查询咨询费用信息 inquiryCode={}", inquiryCode);
try { try {
return Result.success(new HisTreatDao().getInquiryFee(inquiryCode)); return Result.success(new HisTreatDao().queryOLRegConsultFee(inquiryCode));
} catch (Exception e) { } catch (Exception e) {
return Result.error(e); return Result.error(e);
} }
@ -103,20 +103,23 @@ public class TreatAction extends BaseAction {
public Result getReRegister(String clinicCode) { public Result getReRegister(String clinicCode) {
log.info("[问诊]查询复诊挂号费 clinicCode={}", clinicCode); log.info("[问诊]查询复诊挂号费 clinicCode={}", clinicCode);
try { try {
return Result.success(new HisTreatDao().getReRegister(clinicCode)); return Result.success(new HisTreatDao().queryOLRegRevisitFee(clinicCode));
} catch (Exception e) { } catch (Exception e) {
return Result.error(e); return Result.error(e);
} }
} }
@Action("getInfoByTreatNum")
public Result getInfoByTreatNum(@AesDecode(AesClass = AesMicroHelper.class) String treatNum) {
@Action("queryTreatByTreatNum")
public Result queryTreatByTreatNum(@AesDecode(AesClass = AesMicroHelper.class) String treatNum) {
try { try {
log.info("[就诊记录]查询信息 treatNum={}", treatNum); log.info("[就诊记录]查询信息 treatNum={}", treatNum);
if (ObjectUtils.isEmpty(treatNum)) { if (ObjectUtils.isEmpty(treatNum)) {
return Result.error(ResultEnum.PARAM_IS_INVALID); return Result.error(ResultEnum.PARAM_IS_INVALID);
} }
List<HisTreat> daatList = new HisTreatDao().getInfoByTreatNum(treatNum); List<HisTreat> daatList = new HisTreatDao().queryTreatByTreatNum(treatNum);
return Result.success(daatList); return Result.success(daatList);
} catch (ServiceException e) { } catch (ServiceException e) {
return Result.error(e); return Result.error(e);
@ -144,11 +147,11 @@ public class TreatAction extends BaseAction {
@Action("createInquiry") @Action("createInquiry")
public Result createInquiry(String patientId, String patientName, String payMoney, String payDate, String payTime, String transNo, String payDeviceId, String bankTransNo, String deptCode, String doctCode, String feeCode, String payWay, String ID, String begTime, String endTime, String IDCardNo, String remark, String doctTitleCode, String hospitalArea, String treatNum, String firstTreatNum, String openId) { public Result createInquiry(String patientId, String patientName, String payMoney, String payDate, String payTime, String transNo, String payDeviceId, String bankTransNo, String deptCode, String doctCode, String feeCode, String payWay, String ID, String begTime, String endTime, String IDCardNo, String remark, String doctTitleCode, String hospitalArea, String treatNum, String firstTreatNum, String openId) {
log.info("[互联网医院]创建问诊记录,patientId-{},patientName-{},payMoney-{},payDate-{},payTime-{},transNo-{},payDeviceId-{},bankTransNo-{},deptCode-{},doctCode-{},feeCode-{},payWay-{},ID-{},begTime-{},endTime-{},IDCardNo-{},remark-{},doctTitleCode-{},hospitalArea-{},treatNum-{},firstTreatNum-{},openId-{}", patientId, patientName, payMoney, payDate, payTime, transNo, payDeviceId, bankTransNo, deptCode, doctCode, feeCode, payWay, ID, begTime, endTime, IDCardNo, remark, doctTitleCode, hospitalArea, treatNum, firstTreatNum, openId); log.info("[互联网医院]问诊挂号缴费 patientId-{},patientName-{},payMoney-{},payDate-{},payTime-{},transNo-{},payDeviceId-{},bankTransNo-{},deptCode-{},doctCode-{},feeCode-{},payWay-{},ID-{},begTime-{},endTime-{},IDCardNo-{},remark-{},doctTitleCode-{},hospitalArea-{},treatNum-{},firstTreatNum-{},openId-{}", patientId, patientName, payMoney, payDate, payTime, transNo, payDeviceId, bankTransNo, deptCode, doctCode, feeCode, payWay, ID, begTime, endTime, IDCardNo, remark, doctTitleCode, hospitalArea, treatNum, firstTreatNum, openId);
if (patientId == null || patientName == null || payMoney == null || payDate == null || payTime == null || transNo == null || deptCode == null || doctCode == null || feeCode == null || payWay == null || ID == null || begTime == null || endTime == null) { if (patientId == null || patientName == null || payMoney == null || payDate == null || payTime == null || transNo == null || deptCode == null || doctCode == null || feeCode == null || payWay == null || ID == null || begTime == null || endTime == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT); return Result.error(ResultEnum.PARAM_IS_DEFECT);
} }
JsonResult result = new HisTreatDao().createInquiry(patientId, patientName, payMoney, payDate, payTime, transNo, payDeviceId, bankTransNo, deptCode, doctCode, feeCode, payWay, ID, begTime, endTime, IDCardNo, remark, doctTitleCode, hospitalArea, treatNum, firstTreatNum, openId); JsonResult result = new HisTreatDao().hisOLRegPay(patientId, patientName, payMoney, payDate, payTime, transNo, payDeviceId, bankTransNo, deptCode, doctCode, feeCode, payWay, ID, begTime, endTime, IDCardNo, remark, doctTitleCode, hospitalArea, treatNum, firstTreatNum, openId);
if (!result.success()) { if (!result.success()) {
return Result.error(result.getMessage()); return Result.error(result.getMessage());
} }

@ -237,7 +237,7 @@ public class MedicalTestAction extends BaseAction {
recipe.setTreatNum(treatNum); recipe.setTreatNum(treatNum);
if (treatNum != null) { if (treatNum != null) {
List<HisTreat> dataList = new HisTreatDao().getInfoByTreatNum(treatNum); List<HisTreat> dataList = new HisTreatDao().queryTreatByTreatNum(treatNum);
if (!dataList.isEmpty()) { if (!dataList.isEmpty()) {
HisTreat hisTreat = dataList.get(0); HisTreat hisTreat = dataList.get(0);
if (hisTreat != null) { if (hisTreat != null) {

@ -132,4 +132,66 @@ public class XKAction extends BaseAction {
} }
} }
/**
* [问诊]删除处方
*/
@Action("delRx")
public Result delRx(@AesDecode String treatNum, @AesDecode String rxCode, @AesDecode String doctCode) {
log.info("[问诊]删除处方 treatNum={}, rxCode={}, doctCode={}", treatNum, rxCode, doctCode);
try {
new HisXKDao().delRx(treatNum, rxCode, doctCode);
return Result.success();
} catch (Exception e) {
return Result.error(e);
}
}
/**
* [问诊]查询问诊挂号-咨询费用[未使用]
*
* @param code 收费项目代码
*/
@Action("queryOLRegConsultFee")
public Result queryOLRegConsultFee(String code) {
log.info("[问诊]查询问诊挂号-咨询费用 code={}", code);
try {
return Result.success(new HisTreatDao().queryOLRegConsultFee(code));
} catch (Exception e) {
return Result.error(e);
}
}
/**
* [问诊]查询问诊挂号-复诊费用
*
* @param code 号别
*/
@Action("queryOLRegRevisitFee")
public Result queryOLRegRevisitFee(String code) {
log.info("[问诊]查询问诊挂号-复诊费用 code={}", code);
try {
return Result.success(new HisTreatDao().queryOLRegRevisitFee(code));
} catch (Exception e) {
return Result.error(e);
}
}
@Action("notifyHisOLReg")
public Result createInquiry(String patientId, String patientName, String payMoney, String payDate, String payTime, String transNo, String payDeviceId, String bankTransNo, String deptCode, String doctCode, String feeCode, String payWay, String ID, String begTime, String endTime, String IDCardNo, String remark, String doctTitleCode, String hospitalArea, String treatNum, String firstTreatNum, String openId) {
// log.info("[互联网医院]问诊挂号缴费 patientId-{},patientName-{},payMoney-{},payDate-{},payTime-{},transNo-{},payDeviceId-{},bankTransNo-{},deptCode-{},doctCode-{},feeCode-{},payWay-{},ID-{},begTime-{},endTime-{},IDCardNo-{},remark-{},doctTitleCode-{},hospitalArea-{},treatNum-{},firstTreatNum-{},openId-{}", patientId, patientName, payMoney, payDate, payTime, transNo, payDeviceId, bankTransNo, deptCode, doctCode, feeCode, payWay, ID, begTime, endTime, IDCardNo, remark, doctTitleCode, hospitalArea, treatNum, firstTreatNum, openId);
// if (patientId == null || patientName == null || payMoney == null || payDate == null || payTime == null || transNo == null || deptCode == null || doctCode == null || feeCode == null || payWay == null || ID == null || begTime == null || endTime == null) {
// return Result.error(ResultEnum.PARAM_IS_DEFECT);
// }
// JsonResult result = new HisTreatDao().hisOLRegPay(patientId, patientName, payMoney, payDate, payTime, transNo, payDeviceId, bankTransNo, deptCode, doctCode, feeCode, payWay, ID, begTime, endTime, IDCardNo, remark, doctTitleCode, hospitalArea, treatNum, firstTreatNum, openId);
// if (!result.success()) {
// return Result.error(result.getMessage());
// }
// Map<String, String> response = new HashMap<>();
// response.put("invoiceTransNo", result.getDataMapString("InvoiceTransNo"));
// response.put("hisTransNo", result.getDataMapString("HISTransNo"));
// return Result.success(response);
return Result.success();
}
} }

@ -48,6 +48,7 @@ public class HisRecipe {
private String mzNum; private String mzNum;
// 门诊号 // 门诊号
private String treatNum; private String treatNum;
private String enTreatNum;
// 执行位置 // 执行位置
private String address; private String address;
// 备注 // 备注

@ -1,25 +1,20 @@
package com.ynxbd.common.bean.xk; package com.ynxbd.common.bean.his;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
/**
* @author 李进才 // 咨询费用
* @ClassName 问诊费用
* @Description TODO
* @date 2023/09/28 09:41:00
*/
@Setter @Setter
@Getter @Getter
@ToString @ToString
@NoArgsConstructor @NoArgsConstructor
public class InquiryFee implements Serializable { public class HisOLRegConsultFee {
private String code; private String code;
private String name; private String name;
private BigDecimal price; private BigDecimal price;

@ -7,22 +7,23 @@ import lombok.ToString;
import java.math.BigDecimal; import java.math.BigDecimal;
/** // 复诊费用
* @author 李进才
* @ClassName HisReRegister
* @Description TODO
* @date 2024/03/28 14:48:00
*/
@Getter @Getter
@Setter @Setter
@ToString @ToString
@NoArgsConstructor @NoArgsConstructor
public class HisReRegister { public class HisOLRegRevisitFee {
// 号别代码
private String clinicCode; private String clinicCode;
// 号别名称
private String clinicName; private String clinicName;
// 1:普通号; 2:急诊号; 3:主任医师; 4:副主任医师
private Integer attrib; private Integer attrib;
// 挂号金额
private BigDecimal money; private BigDecimal money;
// 挂号费
private BigDecimal regFee; private BigDecimal regFee;
// 诊查费
private BigDecimal clinicFee; private BigDecimal clinicFee;
} }

@ -21,13 +21,13 @@ public class HisRxDrug {
private String unitName; private String unitName;
// UnitName 最小单位名称(片、粒) // UnitName 最小单位名称(片、粒)
private String unitNameMin; private String unitNameMin;
// Persent 批零比 // Persent 批零比[xx颗粒就是一盒多少袋,xx药片就是一瓶多少片]
private Double persent; private Double persent;
// YPJL 药品剂量 // YPJL 药品剂量
private Double ypjl; private Double ypjl;
// YPJL_Unit 药品剂量单位 // YPJL_Unit 药品剂量单位
private String ypjlUnit; private String ypjlUnit;
// Price 零售单价 // Price 零售单价[最小单位:xx颗粒就是一袋多少钱,xx药片就是一片多少钱]
private Double price; private Double price;
// Count 库存数量 // Count 库存数量
private Integer count; private Integer count;

@ -46,7 +46,7 @@ public class HisWMRxItem implements Serializable {
// 药房名称 // 药房名称
@JSONField(ordinal = 10, name = "YFNAME") @JSONField(ordinal = 10, name = "YFNAME")
private String yfName; private String yfName;
// 总数量 // 总数量[最小单位:xx颗粒就是总共多少袋,xx药片就是总共多少片]
@JSONField(ordinal = 11, name = "TOTCOUNT") @JSONField(ordinal = 11, name = "TOTCOUNT")
private String totCount; private String totCount;
// 备注 // 备注

@ -97,14 +97,14 @@ public class HisRecipeDao {
return resultList; return resultList;
} }
public Result uploadRxMI(String treatNum, String personID, String recipes) { public Result medInsRxCirculation(String treatNum, String personID, String rxIds) {
List<MedInsRxCirc> resultList = new ArrayList<>(); List<MedInsRxCirc> resultList = new ArrayList<>();
JsonResult jsonResult = HisFactory.HisMed(MerchantEnum.WX_MEDICAL).getJsonResult(HisEnum.XK_MEDICAL_RECIPE, params -> { JsonResult jsonResult = HisFactory.HisMed(MerchantEnum.WX_MEDICAL).getJsonResult(HisEnum.XK_MEDICAL_RECIPE, params -> {
params.put("PersonID", personID); params.put("PersonID", personID);
params.put("MZNum", treatNum); params.put("MZNum", treatNum);
params.put("CallNo", HisConfig.WECHAT_CALL_NO); params.put("CallNo", HisConfig.WECHAT_CALL_NO);
params.put("CFNums", recipes); params.put("CFNums", rxIds);
}); });
if (!jsonResult.success()) { // 失败 if (!jsonResult.success()) { // 失败

@ -1,8 +1,8 @@
package com.ynxbd.common.dao.his; package com.ynxbd.common.dao.his;
import com.ynxbd.common.bean.his.HisReRegister; import com.ynxbd.common.bean.his.HisOLRegConsultFee;
import com.ynxbd.common.bean.his.HisOLRegRevisitFee;
import com.ynxbd.common.bean.his.HisTreat; import com.ynxbd.common.bean.his.HisTreat;
import com.ynxbd.common.bean.xk.InquiryFee;
import com.ynxbd.common.helper.common.Base64Helper; import com.ynxbd.common.helper.common.Base64Helper;
import com.ynxbd.common.helper.common.JsonHelper; import com.ynxbd.common.helper.common.JsonHelper;
import com.ynxbd.common.his.HisEnum; import com.ynxbd.common.his.HisEnum;
@ -66,39 +66,39 @@ public class HisTreatDao {
/** /**
* [问诊]查询咨询费用信息 * [问诊]查询问诊挂号-咨询费用
* *
* @param inquiryCode 收费项目代码 * @param inquiryCode 收费项目代码
*/ */
public List<InquiryFee> getInquiryFee(String inquiryCode) throws ServiceException { public List<HisOLRegConsultFee> queryOLRegConsultFee(String inquiryCode) throws ServiceException {
JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_INQUIRY_FEE, params -> { JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_OL_REG_CONSULT_FEE, params -> {
params.put("Code", inquiryCode); params.put("Code", inquiryCode);
}); });
if (jsonResult.success()) { if (jsonResult.success()) {
return jsonResult.getDataMapList(InquiryFee.class, "Items", "Item"); return jsonResult.getDataMapList(HisOLRegConsultFee.class, "Items", "Item");
} }
throw new ServiceException(jsonResult.getMessage()); throw new ServiceException(jsonResult.getMessage());
} }
/** /**
* [问诊]查询复诊挂号费 * [问诊]查询问诊挂号-复诊费用
* *
* @param clinicCode 号别 * @param clinicCode 号别
*/ */
public List<HisReRegister> getReRegister(String clinicCode) throws ServiceException { public List<HisOLRegRevisitFee> queryOLRegRevisitFee(String clinicCode) throws ServiceException {
JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_RE_REGISTER, params -> { JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_OL_REG_REVISIT_FEE, params -> {
params.put("ClinicCode", clinicCode); params.put("ClinicCode", clinicCode); // 不传该节点或值为空查询所有
}); });
if (jsonResult.success()) { if (!jsonResult.success()) {
return jsonResult.getDataMapList(HisReRegister.class, "RegisterFeeInfos", "RegisterFeeInfo"); throw new ServiceException(jsonResult.getMessage());
} }
throw new ServiceException(jsonResult.getMessage()); return jsonResult.getDataMapList(HisOLRegRevisitFee.class, "RegisterFeeInfos", "RegisterFeeInfo");
} }
public List<HisTreat> getInfoByTreatNum(String treatNum) throws ServiceException { public List<HisTreat> queryTreatByTreatNum(String treatNum) throws ServiceException {
List<HisTreat> dataList = new ArrayList<>(); List<HisTreat> dataList = new ArrayList<>();
JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_TREAT, params -> { JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_TREAT, params -> {
@ -155,8 +155,8 @@ public class HisTreatDao {
* @param openId 微信OpenId * @param openId 微信OpenId
* @return 是否成功 * @return 是否成功
*/ */
public JsonResult createInquiry(String patientId, String patientName, String payMoney, String payDate, String payTime, String transNo, String payDeviceId, String bankTransNo, String deptCode, String doctCode, String feeCode, String payWay, String ID, String begTime, String endTime, String IDCardNo, String remark, String doctTitleCode, String hospitalArea, String treatNum, String firstTreatNum, String openId) { public JsonResult hisOLRegPay(String patientId, String patientName, String payMoney, String payDate, String payTime, String transNo, String payDeviceId, String bankTransNo, String deptCode, String doctCode, String feeCode, String payWay, String ID, String begTime, String endTime, String IDCardNo, String remark, String doctTitleCode, String hospitalArea, String treatNum, String firstTreatNum, String openId) {
return HisFactory.His().getJsonResult(HisEnum.XK_CREATE_INQUIRY, params -> { return HisFactory.His().getJsonResult(HisEnum.XK_OL_REG_PAY, params -> {
params.put("PatientId", patientId); params.put("PatientId", patientId);
params.put("PatientName", patientName); params.put("PatientName", patientName);
params.put("PayMoney", payMoney); params.put("PayMoney", payMoney);

@ -133,13 +133,26 @@ public class HisXKDao {
params.put("YSCode", doctCode); // 开单医生编码 params.put("YSCode", doctCode); // 开单医生编码
// 中药=========================================================== // 中药===========================================================
params.put("TT_Name", tcmTtName); // 汤头名称 params.put("TT_Name", tcmTtName); // 汤头名称
params.put("UsedName", tcmUseName); // 用法 params.put("UsedName", tcmUseName); // 用法
params.put("CFCount", tcmCFCount); // 处方付数 params.put("CFCount", tcmCFCount); // 处方付数
params.put("CFUseCount", tcmCFUseCount); // 处方单付使用次数 params.put("CFUseCount", tcmCFUseCount); // 处方单付使用次数
params.put("UseCountForDay", tcmUseCountForDay); // 每日使用次数 params.put("UseCountForDay", tcmUseCountForDay); // 每日使用次数
params.put("Jarray", JsonHelper.toJsonStringEmpty(rxList)); params.put("Jarray", JsonHelper.toJsonStringEmpty(rxList));
}); });
log.info("[开方]返回 resp={}", JsonHelper.toJsonString(jsonResult.getDataMap())); log.info("[开方]返回: {}", JsonHelper.toJsonString(jsonResult.getDataMap()));
return jsonResult;
}
public JsonResult delRx(String treatNum, String rxCode, String doctCode) throws ServiceException {
JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.HIS_XK_RX_DEL, params -> {
params.put("MZNum", treatNum);
params.put("CFNum", rxCode);
params.put("YSCode", doctCode);
});
if (!jsonResult.success()) {
log.info("[问诊]删除处方-失败: {}", jsonResult.getMessage());
throw new ServiceException(jsonResult.getMessage());
}
return jsonResult; return jsonResult;
} }
} }

@ -50,8 +50,8 @@ public enum HisEnum {
AP_Refund_Register("[今日挂号]取消预约", "4007", "AP_Refund_Register", true), AP_Refund_Register("[今日挂号]取消预约", "4007", "AP_Refund_Register", true),
//排班记录 //排班记录
AP_Doctor_Schedule("[排班]医生排班表","8003","UniversalInterface",true), AP_Doctor_Schedule("[排班]医生排班表", "8003", "UniversalInterface", true),
Query_Area("[地区]查询行政区划","8005","UniversalInterface",false), Query_Area("[地区]查询行政区划", "8005", "UniversalInterface", false),
// 支付[自定义]------------------ // 支付[自定义]------------------
Create_Self_Help("[处方]生成自助申请单", "10001", "UniversalInterface", true), Create_Self_Help("[处方]生成自助申请单", "10001", "UniversalInterface", true),
@ -64,7 +64,7 @@ public enum HisEnum {
AP_PrePay_Invoice_New("[处方]预结算", "4004", "AP_PrePay_Invoice_New", true), AP_PrePay_Invoice_New("[处方]预结算", "4004", "AP_PrePay_Invoice_New", true),
AP_Pay_Invoice_New("[处方]预结算缴费", "4005", "AP_Pay_Invoice_New", true), AP_Pay_Invoice_New("[处方]预结算缴费", "4005", "AP_Pay_Invoice_New", true),
YDZF_QueryDiseaseInfo("[医保]获取慢性病列表","4006","YDZF_QueryDiseaseInfo",true), YDZF_QueryDiseaseInfo("[医保]获取慢性病列表", "4006", "YDZF_QueryDiseaseInfo", true),
AP_Query_Statement("查询对账报表", "5007", "AP_Query_Statement", false), AP_Query_Statement("查询对账报表", "5007", "AP_Query_Statement", false),
AP_Query_Transaction("查询交易流水", "5008", "AP_Query_Transaction", true), AP_Query_Transaction("查询交易流水", "5008", "AP_Query_Transaction", true),
@ -99,35 +99,36 @@ public enum HisEnum {
XK_DOC_CA("[互联网医院]查询医生电子签名", "13004", "UniversalInterface", true), XK_DOC_CA("[互联网医院]查询医生电子签名", "13004", "UniversalInterface", true),
XK_INQUIRY_FEE("[互联网医院]查询问诊费用信息","13005","UniversalInterface", true),
XK_CREATE_INQUIRY("[互联网医院]创建问诊记录","13006","UniversalInterface",true), XK_OL_REG_PAY("[互联网医院]问诊挂号缴费", "13006", "UniversalInterface", true),
XK_MEDICAL_RECIPE("[互联网医院]处方医保双通道流转","13007","UniversalInterface",true), XK_MEDICAL_RECIPE("[互联网医院]处方医保双通道流转", "13007", "UniversalInterface", true),
XK_QUERY_RE_REGISTER("[互联网医院]查询复诊挂号费","13008","UniversalInterface",true), XK_QUERY_OL_REG_CONSULT_FEE("[互联网医院]查询问诊挂号-咨询费用", "13005", "UniversalInterface", true),
XK_QUERY_OL_REG_REVISIT_FEE("[互联网医院]查询问诊挂号-复诊费用", "13008", "UniversalInterface", true),
Query_TreatMedicalRecord("[病历]查询门诊病历", "1014", "UniversalInterface", false), Query_TreatMedicalRecord("[病历]查询门诊病历", "1014", "UniversalInterface", false),
// 在线签到 // 在线签到
AP_Query_SignIn("[在线签到]查询预约待签到记录","7007","AP_Query_SignIn",true), AP_Query_SignIn("[在线签到]查询预约待签到记录", "7007", "AP_Query_SignIn", true),
AP_SignIN("[在线签到]执行预约签到","7008","AP_SignIn",true), AP_SignIN("[在线签到]执行预约签到", "7008", "AP_SignIn", true),
AP_Query_Line_SignIn("[在线签到]查询已挂号未签到记录","7009","AP_Query_LineSignIn",false), AP_Query_Line_SignIn("[在线签到]查询已挂号未签到记录", "7009", "AP_Query_LineSignIn", false),
AP_Line_SignIN("[在线签到]执行挂号患者签到","7010","AP_LineSignIn",true), AP_Line_SignIN("[在线签到]执行挂号患者签到", "7010", "AP_LineSignIn", true),
// 自助开单 // 自助开单
SH_SELF_HELP_QUERY("[查询自助开单信息]","10003","UniversalInterface",true), SH_SELF_HELP_QUERY("[查询自助开单信息]", "10003", "UniversalInterface", true),
SH_SELF_HELP_CREATE("[创建自助开单申请单]","10004","UniversalInterface",true), SH_SELF_HELP_CREATE("[创建自助开单申请单]", "10004", "UniversalInterface", true),
QUERY_ELECTRON_INVOICE("[查询电子发票信息]","8004","UniversalInterface",false), QUERY_ELECTRON_INVOICE("[查询电子发票信息]", "8004", "UniversalInterface", false),
QUERY_AUTH_AGENT("委托人信息[查询]","11003","UniversalInterface", true), QUERY_AUTH_AGENT("委托人信息[查询]", "11003", "UniversalInterface", true),
ADD_AUTH_AGENT("委托人信息[新增]","11004","UniversalInterface",true), ADD_AUTH_AGENT("委托人信息[新增]", "11004", "UniversalInterface", true),
UPDATE_AUTH_AGENT("委托人信息[修改]","11005","UniversalInterface",true), UPDATE_AUTH_AGENT("委托人信息[修改]", "11005", "UniversalInterface", true),
DELETE_AUTH_AGENT("委托人信息[删除]","11006","UniversalInterface",true), DELETE_AUTH_AGENT("委托人信息[删除]", "11006", "UniversalInterface", true),
HIS_XK_RX_DICT("开方字典查询","13010","UniversalInterface",false), HIS_XK_RX_DICT("开方字典查询", "13010", "UniversalInterface", false),
HIS_XK_RX_CREATE("线上开方","13011","UniversalInterface",true), HIS_XK_RX_CREATE("线上开方", "13011", "UniversalInterface", true),
HIS_XK_RX_DEL("删除处方", "13016", "UniversalInterface", true),
; ;
public final String NAME; public final String NAME;

@ -241,11 +241,10 @@ public class WxPayHelper {
public static Order refund(MerchantEnum merchantEnum, String outTradeNo, String outRefundNo, BigDecimal refundMoney, BigDecimal totalFee, String desc) { public static Order refund(MerchantEnum merchantEnum, String outTradeNo, String outRefundNo, BigDecimal refundMoney, BigDecimal totalFee, String desc) {
Order order = new Order(); Order order = new Order();
try { try {
int feeCents; log.info("【微信】退款开始 outTradeNo={}, refundMoney={}, totalFee={}", outTradeNo, refundMoney, totalFee);
int totalFeeCents;
feeCents = refundMoney.movePointRight(2).intValue(); // 单位分 int feeCents = refundMoney.movePointRight(2).intValue(); // 单位分
totalFeeCents = totalFee.movePointRight(2).intValue(); int totalFeeCents = totalFee.movePointRight(2).intValue();
if (feeCents == 0 || totalFeeCents == 0) { if (feeCents == 0 || totalFeeCents == 0) {
order.setErrorMsg(ResultEnum.REFUND_MONEY_IS_ZERO.message); order.setErrorMsg(ResultEnum.REFUND_MONEY_IS_ZERO.message);
@ -256,7 +255,6 @@ public class WxPayHelper {
merchantEnum = MerchantEnum.WX; merchantEnum = MerchantEnum.WX;
} }
log.info("【微信】退款开始 outTradeNo={}, refundMoney={}, totalFee={}", outTradeNo, feeCents, totalFeeCents);
SecapiPayRefund refund = new SecapiPayRefund(); SecapiPayRefund refund = new SecapiPayRefund();
refund.setAppid(merchantEnum.APP_ID); refund.setAppid(merchantEnum.APP_ID);

Loading…
Cancel
Save