diff --git a/src/main/java/com/ynxbd/common/TestA.java b/src/main/java/com/ynxbd/common/TestA.java index 498e963..91c7215 100644 --- a/src/main/java/com/ynxbd/common/TestA.java +++ b/src/main/java/com/ynxbd/common/TestA.java @@ -1,6 +1,7 @@ package com.ynxbd.common; import cn.hutool.core.util.IdcardUtil; +import com.alibaba.fastjson.JSONObject; import com.ynxbd.common.helper.common.AesMicroHelper; import com.ynxbd.common.helper.common.JsonHelper; import com.ynxbd.common.helper.http.OkHttpHelper; @@ -130,9 +131,9 @@ public class TestA { // System.out.println(removeIds); // } -// -// public static void main(String[] args) { -// System.out.println(AesWxHelper.decode("562CF576AEC37AA2EC0CCB873ABF67A3060B9C01AD9B8068C43FEAEDDB00E5A6")); -// } + + public static void main(String[] args) { + System.out.println(AesWxHelper.decode("DC88B70DDA4C2EA965CBF5FCD43297CD6478071E12258B40EE29EFFB3A1043CA")); + } } \ No newline at end of file diff --git a/src/main/java/com/ynxbd/common/action/RecipeAction.java b/src/main/java/com/ynxbd/common/action/RecipeAction.java index 784a03b..a4f7f97 100644 --- a/src/main/java/com/ynxbd/common/action/RecipeAction.java +++ b/src/main/java/com/ynxbd/common/action/RecipeAction.java @@ -19,6 +19,7 @@ import com.ynxbd.common.result.Result; import com.ynxbd.common.result.ResultEnum; import com.ynxbd.common.service.RxService; import com.ynxbd.wx.config.WeChatConfig; +import com.ynxbd.wx.wxfactory.AesWxHelper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.apache.struts2.convention.annotation.Action; @@ -95,16 +96,17 @@ public class RecipeAction extends BaseAction { int days = DateHelper.intervalDays(begDate, endDate, true); List hisRecipes = new HisRecipeDao().getRxUnPay(openid, patientId, personNo, days); - List resultList = new ArrayList<>(); - for (HisRecipe hisRecipe : hisRecipes) { - hisRecipe.setPid(patientId); - hisRecipe.setTreatNum(hisRecipe.getMzNum()); - if (hisRecipe.getDate() != null && DateHelper.inDateRange(begDate, endDate, hisRecipe.getDate(), DateHelper.DateEnum.yyyy_MM_dd) - && !"1".equals(hisRecipe.getSTDFlag()) && (!"1".equals(hisRecipe.getInternetHospFlag()) || "1".equals(hisRecipe.getYJSAuditFlag()))) { - resultList.add(hisRecipe); + List dataList = new ArrayList<>(); + for (HisRecipe rxItem : hisRecipes) { + 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) + && !"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 begDate 开始时间 @@ -139,35 +141,38 @@ public class RecipeAction extends BaseAction { */ @Action("getOLRxList") public Result getOLRxList(@AesDecode String patientId, String begDate, String endDate) { - log.info("[处方]未缴费项目查询 patientId={}", patientId); + log.info("[问诊处方]未缴费项目查询 patientId={}", patientId); if (patientId == null) { return Result.error(ResultEnum.PARAM_IS_DEFECT); } int days = DateHelper.intervalDays(begDate, endDate, true); List hisRxList = new HisRecipeDao().getRxUnPay(null, patientId, "", days); - List resultList = new ArrayList<>(); + List dataList = new ArrayList<>(); 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)) { - resultList.add(rxItem); + dataList.add(rxItem); } } - return Result.success(resultList); + return Result.success(dataList); } /** * 将订单上传到医保双通道 * * @param treatNum 门诊号 - * @param personID 身份证 - * @param recipes 处方号合集,中间用英文逗号隔开 + * @param personId 身份证 + * @param rxIds 处方号合集,中间用英文逗号隔开 */ - @Action("uploadMedicalRecipe") - public Result uploadMedicalRecipe(String treatNum, String personID, String recipes) { - log.info("[互联网医院]处方医保双通道流转 treatNum={},personNo-{}, recipes={}", treatNum, personID, recipes); - if (treatNum == null || personID == null || recipes == null) { + @Action("medInsRxCirculation") + public Result medInsRxCirculation(@AesDecode String treatNum, @AesDecode String personId, @AesDecode String rxIds) { + log.info("[互联网医院]处方医保双通道流转 treatNum={}, personNo={}, recipes={}", treatNum, personId, rxIds); + if (treatNum == null || personId == null || rxIds == null) { return Result.error(ResultEnum.PARAM_IS_DEFECT); } - return new HisRecipeDao().uploadRxMI(treatNum, personID, recipes); + return new HisRecipeDao().medInsRxCirculation(treatNum, personId, rxIds); } diff --git a/src/main/java/com/ynxbd/common/action/TreatAction.java b/src/main/java/com/ynxbd/common/action/TreatAction.java index d9a8d11..688edcc 100644 --- a/src/main/java/com/ynxbd/common/action/TreatAction.java +++ b/src/main/java/com/ynxbd/common/action/TreatAction.java @@ -88,7 +88,7 @@ public class TreatAction extends BaseAction { public Result getInquiryFee(String inquiryCode) { log.info("[问诊]查询咨询费用信息 inquiryCode={}", inquiryCode); try { - return Result.success(new HisTreatDao().getInquiryFee(inquiryCode)); + return Result.success(new HisTreatDao().queryOLRegConsultFee(inquiryCode)); } catch (Exception e) { return Result.error(e); } @@ -103,20 +103,23 @@ public class TreatAction extends BaseAction { public Result getReRegister(String clinicCode) { log.info("[问诊]查询复诊挂号费 clinicCode={}", clinicCode); try { - return Result.success(new HisTreatDao().getReRegister(clinicCode)); + return Result.success(new HisTreatDao().queryOLRegRevisitFee(clinicCode)); } catch (Exception 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 { log.info("[就诊记录]查询信息 treatNum={}", treatNum); if (ObjectUtils.isEmpty(treatNum)) { return Result.error(ResultEnum.PARAM_IS_INVALID); } - List daatList = new HisTreatDao().getInfoByTreatNum(treatNum); + List daatList = new HisTreatDao().queryTreatByTreatNum(treatNum); return Result.success(daatList); } catch (ServiceException e) { return Result.error(e); @@ -144,11 +147,11 @@ public class TreatAction extends BaseAction { @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) { - 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) { 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()) { return Result.error(result.getMessage()); } diff --git a/src/main/java/com/ynxbd/common/action/pay/MedicalTestAction.java b/src/main/java/com/ynxbd/common/action/pay/MedicalTestAction.java index f851c25..1a307e6 100644 --- a/src/main/java/com/ynxbd/common/action/pay/MedicalTestAction.java +++ b/src/main/java/com/ynxbd/common/action/pay/MedicalTestAction.java @@ -237,7 +237,7 @@ public class MedicalTestAction extends BaseAction { recipe.setTreatNum(treatNum); if (treatNum != null) { - List dataList = new HisTreatDao().getInfoByTreatNum(treatNum); + List dataList = new HisTreatDao().queryTreatByTreatNum(treatNum); if (!dataList.isEmpty()) { HisTreat hisTreat = dataList.get(0); if (hisTreat != null) { diff --git a/src/main/java/com/ynxbd/common/action/xk/XKAction.java b/src/main/java/com/ynxbd/common/action/xk/XKAction.java index 44af4ee..3065d4d 100644 --- a/src/main/java/com/ynxbd/common/action/xk/XKAction.java +++ b/src/main/java/com/ynxbd/common/action/xk/XKAction.java @@ -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 response = new HashMap<>(); +// response.put("invoiceTransNo", result.getDataMapString("InvoiceTransNo")); +// response.put("hisTransNo", result.getDataMapString("HISTransNo")); +// return Result.success(response); + return Result.success(); + } } diff --git a/src/main/java/com/ynxbd/common/bean/HisRecipe.java b/src/main/java/com/ynxbd/common/bean/HisRecipe.java index e6d7c43..8e5685a 100644 --- a/src/main/java/com/ynxbd/common/bean/HisRecipe.java +++ b/src/main/java/com/ynxbd/common/bean/HisRecipe.java @@ -48,6 +48,7 @@ public class HisRecipe { private String mzNum; // 门诊号 private String treatNum; + private String enTreatNum; // 执行位置 private String address; // 备注 diff --git a/src/main/java/com/ynxbd/common/bean/xk/InquiryFee.java b/src/main/java/com/ynxbd/common/bean/his/HisOLRegConsultFee.java similarity index 53% rename from src/main/java/com/ynxbd/common/bean/xk/InquiryFee.java rename to src/main/java/com/ynxbd/common/bean/his/HisOLRegConsultFee.java index 889264c..49ea8af 100644 --- a/src/main/java/com/ynxbd/common/bean/xk/InquiryFee.java +++ b/src/main/java/com/ynxbd/common/bean/his/HisOLRegConsultFee.java @@ -1,26 +1,21 @@ -package com.ynxbd.common.bean.xk; +package com.ynxbd.common.bean.his; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; -import java.io.Serializable; import java.math.BigDecimal; -/** - * @author 李进才 - * @ClassName 问诊费用 - * @Description TODO - * @date 2023/09/28 09:41:00 - */ + +// 咨询费用 @Setter @Getter @ToString @NoArgsConstructor -public class InquiryFee implements Serializable { +public class HisOLRegConsultFee { private String code; private String name; private BigDecimal price; -} +} \ No newline at end of file diff --git a/src/main/java/com/ynxbd/common/bean/his/HisReRegister.java b/src/main/java/com/ynxbd/common/bean/his/HisOLRegRevisitFee.java similarity index 65% rename from src/main/java/com/ynxbd/common/bean/his/HisReRegister.java rename to src/main/java/com/ynxbd/common/bean/his/HisOLRegRevisitFee.java index 5beae4d..fa8e724 100644 --- a/src/main/java/com/ynxbd/common/bean/his/HisReRegister.java +++ b/src/main/java/com/ynxbd/common/bean/his/HisOLRegRevisitFee.java @@ -7,22 +7,23 @@ import lombok.ToString; import java.math.BigDecimal; -/** - * @author 李进才 - * @ClassName HisReRegister - * @Description TODO - * @date 2024/03/28 14:48:00 - */ +// 复诊费用 @Getter @Setter @ToString @NoArgsConstructor -public class HisReRegister { +public class HisOLRegRevisitFee { + // 号别代码 private String clinicCode; + // 号别名称 private String clinicName; + // 1:普通号; 2:急诊号; 3:主任医师; 4:副主任医师 private Integer attrib; + // 挂号金额 private BigDecimal money; + // 挂号费 private BigDecimal regFee; + // 诊查费 private BigDecimal clinicFee; } diff --git a/src/main/java/com/ynxbd/common/bean/xk/HisRxDrug.java b/src/main/java/com/ynxbd/common/bean/xk/HisRxDrug.java index b62eff8..4f1a422 100644 --- a/src/main/java/com/ynxbd/common/bean/xk/HisRxDrug.java +++ b/src/main/java/com/ynxbd/common/bean/xk/HisRxDrug.java @@ -21,13 +21,13 @@ public class HisRxDrug { private String unitName; // UnitName 最小单位名称(片、粒) private String unitNameMin; - // Persent 批零比 + // Persent 批零比[xx颗粒就是一盒多少袋,xx药片就是一瓶多少片] private Double persent; // YPJL 药品剂量 private Double ypjl; // YPJL_Unit 药品剂量单位 private String ypjlUnit; - // Price 零售单价 + // Price 零售单价[最小单位:xx颗粒就是一袋多少钱,xx药片就是一片多少钱] private Double price; // Count 库存数量 private Integer count; diff --git a/src/main/java/com/ynxbd/common/bean/xk/HisWMRxItem.java b/src/main/java/com/ynxbd/common/bean/xk/HisWMRxItem.java index 44d3f23..5547858 100644 --- a/src/main/java/com/ynxbd/common/bean/xk/HisWMRxItem.java +++ b/src/main/java/com/ynxbd/common/bean/xk/HisWMRxItem.java @@ -46,7 +46,7 @@ public class HisWMRxItem implements Serializable { // 药房名称 @JSONField(ordinal = 10, name = "YFNAME") private String yfName; - // 总数量 + // 总数量[最小单位:xx颗粒就是总共多少袋,xx药片就是总共多少片] @JSONField(ordinal = 11, name = "TOTCOUNT") private String totCount; // 备注 diff --git a/src/main/java/com/ynxbd/common/dao/his/HisRecipeDao.java b/src/main/java/com/ynxbd/common/dao/his/HisRecipeDao.java index 15ab206..a138694 100644 --- a/src/main/java/com/ynxbd/common/dao/his/HisRecipeDao.java +++ b/src/main/java/com/ynxbd/common/dao/his/HisRecipeDao.java @@ -97,14 +97,14 @@ public class HisRecipeDao { return resultList; } - public Result uploadRxMI(String treatNum, String personID, String recipes) { + public Result medInsRxCirculation(String treatNum, String personID, String rxIds) { List resultList = new ArrayList<>(); JsonResult jsonResult = HisFactory.HisMed(MerchantEnum.WX_MEDICAL).getJsonResult(HisEnum.XK_MEDICAL_RECIPE, params -> { params.put("PersonID", personID); params.put("MZNum", treatNum); params.put("CallNo", HisConfig.WECHAT_CALL_NO); - params.put("CFNums", recipes); + params.put("CFNums", rxIds); }); if (!jsonResult.success()) { // 失败 diff --git a/src/main/java/com/ynxbd/common/dao/his/HisTreatDao.java b/src/main/java/com/ynxbd/common/dao/his/HisTreatDao.java index 626c8de..4832dd3 100644 --- a/src/main/java/com/ynxbd/common/dao/his/HisTreatDao.java +++ b/src/main/java/com/ynxbd/common/dao/his/HisTreatDao.java @@ -1,8 +1,8 @@ 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.xk.InquiryFee; import com.ynxbd.common.helper.common.Base64Helper; import com.ynxbd.common.helper.common.JsonHelper; import com.ynxbd.common.his.HisEnum; @@ -66,39 +66,39 @@ public class HisTreatDao { /** - * [问诊]查询咨询费用信息 + * [问诊]查询问诊挂号-咨询费用 * * @param inquiryCode 收费项目代码 */ - public List getInquiryFee(String inquiryCode) throws ServiceException { - JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_INQUIRY_FEE, params -> { + public List queryOLRegConsultFee(String inquiryCode) throws ServiceException { + JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_OL_REG_CONSULT_FEE, params -> { params.put("Code", inquiryCode); }); if (jsonResult.success()) { - return jsonResult.getDataMapList(InquiryFee.class, "Items", "Item"); + return jsonResult.getDataMapList(HisOLRegConsultFee.class, "Items", "Item"); } throw new ServiceException(jsonResult.getMessage()); } /** - * [问诊]查询复诊挂号费 + * [问诊]查询问诊挂号-复诊费用 * * @param clinicCode 号别 */ - public List getReRegister(String clinicCode) throws ServiceException { - JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_RE_REGISTER, params -> { - params.put("ClinicCode", clinicCode); + public List queryOLRegRevisitFee(String clinicCode) throws ServiceException { + JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_OL_REG_REVISIT_FEE, params -> { + params.put("ClinicCode", clinicCode); // 不传该节点或值为空查询所有 }); - if (jsonResult.success()) { - return jsonResult.getDataMapList(HisReRegister.class, "RegisterFeeInfos", "RegisterFeeInfo"); + if (!jsonResult.success()) { + throw new ServiceException(jsonResult.getMessage()); } - throw new ServiceException(jsonResult.getMessage()); + return jsonResult.getDataMapList(HisOLRegRevisitFee.class, "RegisterFeeInfos", "RegisterFeeInfo"); } - public List getInfoByTreatNum(String treatNum) throws ServiceException { + public List queryTreatByTreatNum(String treatNum) throws ServiceException { List dataList = new ArrayList<>(); JsonResult jsonResult = HisFactory.His().getJsonResult(HisEnum.XK_QUERY_TREAT, params -> { @@ -155,8 +155,8 @@ public class HisTreatDao { * @param openId 微信OpenId * @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) { - return HisFactory.His().getJsonResult(HisEnum.XK_CREATE_INQUIRY, params -> { + 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_OL_REG_PAY, params -> { params.put("PatientId", patientId); params.put("PatientName", patientName); params.put("PayMoney", payMoney); diff --git a/src/main/java/com/ynxbd/common/dao/his/HisXKDao.java b/src/main/java/com/ynxbd/common/dao/his/HisXKDao.java index 26c66cc..34d1bae 100644 --- a/src/main/java/com/ynxbd/common/dao/his/HisXKDao.java +++ b/src/main/java/com/ynxbd/common/dao/his/HisXKDao.java @@ -133,13 +133,26 @@ public class HisXKDao { params.put("YSCode", doctCode); // 开单医生编码 // 中药=========================================================== params.put("TT_Name", tcmTtName); // 汤头名称 - params.put("UsedName", tcmUseName); // 用法 + params.put("UsedName", tcmUseName); // 用法 params.put("CFCount", tcmCFCount); // 处方付数 params.put("CFUseCount", tcmCFUseCount); // 处方单付使用次数 params.put("UseCountForDay", tcmUseCountForDay); // 每日使用次数 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; } } diff --git a/src/main/java/com/ynxbd/common/his/HisEnum.java b/src/main/java/com/ynxbd/common/his/HisEnum.java index 86b54fd..906ef7e 100644 --- a/src/main/java/com/ynxbd/common/his/HisEnum.java +++ b/src/main/java/com/ynxbd/common/his/HisEnum.java @@ -50,8 +50,8 @@ public enum HisEnum { AP_Refund_Register("[今日挂号]取消预约", "4007", "AP_Refund_Register", true), //排班记录 - AP_Doctor_Schedule("[排班]医生排班表","8003","UniversalInterface",true), - Query_Area("[地区]查询行政区划","8005","UniversalInterface",false), + AP_Doctor_Schedule("[排班]医生排班表", "8003", "UniversalInterface", true), + Query_Area("[地区]查询行政区划", "8005", "UniversalInterface", false), // 支付[自定义]------------------ Create_Self_Help("[处方]生成自助申请单", "10001", "UniversalInterface", true), @@ -64,7 +64,7 @@ public enum HisEnum { AP_PrePay_Invoice_New("[处方]预结算", "4004", "AP_PrePay_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_Transaction("查询交易流水", "5008", "AP_Query_Transaction", true), @@ -99,35 +99,36 @@ public enum HisEnum { 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), // 在线签到 - AP_Query_SignIn("[在线签到]查询预约待签到记录","7007","AP_Query_SignIn",true), - AP_SignIN("[在线签到]执行预约签到","7008","AP_SignIn",true), - AP_Query_Line_SignIn("[在线签到]查询已挂号未签到记录","7009","AP_Query_LineSignIn",false), - AP_Line_SignIN("[在线签到]执行挂号患者签到","7010","AP_LineSignIn",true), + AP_Query_SignIn("[在线签到]查询预约待签到记录", "7007", "AP_Query_SignIn", true), + AP_SignIN("[在线签到]执行预约签到", "7008", "AP_SignIn", true), + AP_Query_Line_SignIn("[在线签到]查询已挂号未签到记录", "7009", "AP_Query_LineSignIn", false), + AP_Line_SignIN("[在线签到]执行挂号患者签到", "7010", "AP_LineSignIn", true), // 自助开单 - SH_SELF_HELP_QUERY("[查询自助开单信息]","10003","UniversalInterface",true), - SH_SELF_HELP_CREATE("[创建自助开单申请单]","10004","UniversalInterface",true), + SH_SELF_HELP_QUERY("[查询自助开单信息]", "10003", "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), - ADD_AUTH_AGENT("委托人信息[新增]","11004","UniversalInterface",true), - UPDATE_AUTH_AGENT("委托人信息[修改]","11005","UniversalInterface",true), - DELETE_AUTH_AGENT("委托人信息[删除]","11006","UniversalInterface",true), + QUERY_AUTH_AGENT("委托人信息[查询]", "11003", "UniversalInterface", true), + ADD_AUTH_AGENT("委托人信息[新增]", "11004", "UniversalInterface", true), + UPDATE_AUTH_AGENT("委托人信息[修改]", "11005", "UniversalInterface", true), + DELETE_AUTH_AGENT("委托人信息[删除]", "11006", "UniversalInterface", true), - HIS_XK_RX_DICT("开方字典查询","13010","UniversalInterface",false), - HIS_XK_RX_CREATE("线上开方","13011","UniversalInterface",true), + HIS_XK_RX_DICT("开方字典查询", "13010", "UniversalInterface", false), + HIS_XK_RX_CREATE("线上开方", "13011", "UniversalInterface", true), + HIS_XK_RX_DEL("删除处方", "13016", "UniversalInterface", true), ; public final String NAME; diff --git a/src/main/java/com/ynxbd/wx/wxfactory/WxPayHelper.java b/src/main/java/com/ynxbd/wx/wxfactory/WxPayHelper.java index c792099..d38fdf4 100644 --- a/src/main/java/com/ynxbd/wx/wxfactory/WxPayHelper.java +++ b/src/main/java/com/ynxbd/wx/wxfactory/WxPayHelper.java @@ -241,11 +241,10 @@ public class WxPayHelper { public static Order refund(MerchantEnum merchantEnum, String outTradeNo, String outRefundNo, BigDecimal refundMoney, BigDecimal totalFee, String desc) { Order order = new Order(); try { - int feeCents; - int totalFeeCents; + log.info("【微信】退款开始 outTradeNo={}, refundMoney={}, totalFee={}", outTradeNo, refundMoney, totalFee); - feeCents = refundMoney.movePointRight(2).intValue(); // 单位分 - totalFeeCents = totalFee.movePointRight(2).intValue(); + int feeCents = refundMoney.movePointRight(2).intValue(); // 单位分 + int totalFeeCents = totalFee.movePointRight(2).intValue(); if (feeCents == 0 || totalFeeCents == 0) { order.setErrorMsg(ResultEnum.REFUND_MONEY_IS_ZERO.message); @@ -256,7 +255,6 @@ public class WxPayHelper { merchantEnum = MerchantEnum.WX; } - log.info("【微信】退款开始 outTradeNo={}, refundMoney={}, totalFee={}", outTradeNo, feeCents, totalFeeCents); SecapiPayRefund refund = new SecapiPayRefund(); refund.setAppid(merchantEnum.APP_ID);