Browse Source

加强退费校验

xiaochan 1 year ago
parent
commit
5069ca9ecd

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/inpatient/XiangMuLuRuDao.java

@@ -738,7 +738,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
                                      @Param("list") int[] detailSnList);
 
 
-    @Select("select inpatient_no,admiss_times,ledger_sn,detail_sn,charge_fee,charge_amount,ori_detail_sn,trans_flag_yb,exec_unit from zy_detail_charge " +
+    @Select("select inpatient_no,admiss_times,ledger_sn,detail_sn,charge_fee,charge_amount,ori_detail_sn,trans_flag_yb,exec_unit,yb_self_flag from zy_detail_charge " +
             "where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledgerSn} and detail_sn = #{detailSn} " +
             "and infant_flag = #{infantFlag} and charge_fee < 0 and charge_amount < 0 ")
     ZyDetailCharge piPeiXinXiFuShu(@Param("inpatientNo") String inpatientNo,

+ 3 - 0
src/main/java/thyyxxk/webserver/service/inpatient/XiangMuLuRuService.java

@@ -658,6 +658,9 @@ public class XiangMuLuRuService {
             chargeAmountSum = chargeAmountSum.add(detailCharge.getChargeAmount());
         }
         if (zhenShuShuJu.size() == 1) {
+            if (!zy.getYbSelfFlag().equals(zhenShuShuJu.get(0).getYbSelfFlag())) {
+                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "无法匹配这条医嘱,医保费用标志不一致。");
+            }
             if (BigUtils.bigDaYu(chargeFeeSum, zy.getChargeFee().negate()) || BigUtils.dengYu(chargeFeeSum, zy.getChargeFee().negate())) {
                 dao.zhiYouYiGeJiuGenXingFuShuLiuShui(zyDetailCharge.getInpatientNo(), zyDetailCharge.getAdmissTimes(), zyDetailCharge.getLedgerSn(), zyDetailCharge.getDetailSn(), zhenShuShuJu.get(0).getDetailSn());
                 publicServer.genXingYuanLiuShuiBiaoZhi(inpatientNo, zyDetailCharge.getAdmissTimes(), zyDetailCharge.getLedgerSn());

+ 0 - 1
src/main/java/thyyxxk/webserver/utils/TokenUtil.java

@@ -39,7 +39,6 @@ public class TokenUtil {
         return INSTANCE;
     }
 
-
     public String createToken(String code) {
         Map<String, Object> map = new HashMap<>();
         map.put("code", code);