Просмотр исходного кода

解决多种收费方式退现金问题

hurugang 2 лет назад
Родитель
Сommit
c7605da5c4

+ 1 - 1
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzZyReq.java

@@ -71,7 +71,7 @@ public class MzZyReq {
      */
     private String admissStatus;
     /**
-     * 申请状态  0 未确认
+     * 申请状态  0 未确认 1.已确认 2已驳回
      */
     private String reqStatus;
     /**

+ 7 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -3599,6 +3599,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
     private List<MzReceiptSerial> formatRefundReceiptSerial(List<MzReceiptSerial> mzReceiptSerials, String opId, Integer refundType) {
         Set<String> tempSet = new HashSet<>();
         List<MzReceiptSerial> newReceiptSerials = new ArrayList<>();
+        MzReceiptSerial cashMzReceiptSerial=null;
         for (MzReceiptSerial mz : mzReceiptSerials) {
             //退过费的发票表记录
             if (mz.getSerialNo() < 0 && mz.getReceiptNo() < 0) {
@@ -3641,6 +3642,12 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             //非 ((医保记账||个人账户) || (原路退回且 (是银行卡或者聚合支付)))
             if (!(Arrays.asList(Constants.BYJZ, Constants.YBJZ, Constants.SSHIYBGZ, Constants.SHENYGZ).contains(mz.getChequeType()) || (YesNoEnum.YES.code.equals(refundType) && Arrays.asList(Constants.JHZF, Constants.YLK).contains(mz.getChequeType())))) {
                 mz.setChequeType(Constants.CASH);
+                if(cashMzReceiptSerial==null){
+                    cashMzReceiptSerial=mz;
+                }else {
+                    MzReceiptSerial.setChargeFiled(cashMzReceiptSerial, mz);
+                    continue;
+                }
             }
             mz.setDcountNo(YesNoEnum.NO.code);
             mz.setDcountDate(null);