浏览代码

防止重复收费

hurugang 5 年之前
父节点
当前提交
96da2c5b12

+ 7 - 0
src/main/java/cn/hnthyy/thmz/controller/MzyReqrecController.java

@@ -521,6 +521,13 @@ public class MzyReqrecController {
                 resultMap.put("message", "当前挂号信息已经打印过发票,请勿重复操作");
                 return resultMap;
             }
+            if(Constants.BYJZ.equals( mzyReqrec.getPaymode())){
+                //当前病人没有实际缴费,暂时不打印发票
+                resultMap.put("code", -2);
+                resultMap.put("message", "挂号成功,记账不打发票");
+                log.info("当前病人没有实际缴费,暂时不打印发票,patientId={},time={}", patientId, times);
+                return resultMap;
+            }
             ZdUnitCode zdUnitCode=zdUnitCodeService.queryByCode(mzyReqrec.getUnitCode());
             if(zdUnitCode!=null){
                 mzyReqrec.setUnitCode(zdUnitCode.getName());

+ 27 - 27
src/main/java/cn/hnthyy/thmz/mapper/his/ChargeFeeVoMapper.java

@@ -619,57 +619,57 @@ public interface ChargeFeeVoMapper {
     @Select({
             "<script>",
             "SELECT " +
-                    " count ( case when times  <![CDATA[>]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) + count ( case when times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) xjsk, " +
-                    " count ( case when  times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) xjsk, " +
+                    " count ( case when  times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) - count ( case when times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end )xjthhs," +
                     " ABS( sum ( case when times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) xjth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjsshs," +
                     " sum ( case when paymode ='1' or paymode is null then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) xjss, " +
-                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='3' then 1 else null end ) + count ( case when times  <![CDATA[<]]> 0 and paymode ='3'  then 1 else null end ) yhkhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='3'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when  times  <![CDATA[<]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ))yhksk, " +
-                    " count ( case when  times  <![CDATA[<]]> 0 and paymode ='3' then 1 else null end ) yhkthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='3' then 1 else null end ) yhkhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='3'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) yhksk, " +
+                    " count ( case when  times  <![CDATA[<]]> 0 and paymode ='3' then 1 else null end ) - count ( case when times  <![CDATA[<]]> 0 and paymode ='3'  then 1 else null end ) yhkthhs," +
                     " ABS(sum ( case when times  <![CDATA[<]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) yhkth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and paymode ='3'  then 1 else null end ) yhksshs," +
                     " sum ( case when paymode ='3'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) yhkss," +
-                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='6' then 1 else null end ) + count ( case when times  <![CDATA[<]]> 0 and paymode ='6'  then 1 else null end )ybkhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='6'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when  times  <![CDATA[<]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) ybksk, " +
-                    " count ( case when times  <![CDATA[<]]> 0 and paymode ='6' then 1 else null end ) ybkthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='6' then 1 else null end ) ybkhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='6'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ybksk, " +
+                    " count ( case when times  <![CDATA[<]]> 0 and paymode ='6' then 1 else null end ) - count ( case when times  <![CDATA[<]]> 0 and paymode ='6'  then 1 else null end ) ybkthhs," +
                     " ABS(sum ( case when times  <![CDATA[<]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) ybkth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and paymode ='6'  then 1 else null end ) ybksshs," +
                     " sum ( case when paymode ='6'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ybkss," +
-                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='F' then 1 else null end ) + count ( case when  times  <![CDATA[<]]> 0 and paymode ='F'  then 1 else null end )zfbhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='F'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when times  <![CDATA[<]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbsk, " +
-                    " count ( case when times  <![CDATA[<]]> 0 and paymode ='F' then 1 else null end ) zfbthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='F' then 1 else null end ) zfbhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='F'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbsk, " +
+                    " count ( case when times  <![CDATA[<]]> 0 and paymode ='F' then 1 else null end ) - count ( case when  times  <![CDATA[<]]> 0 and paymode ='F'  then 1 else null end ) zfbthhs," +
                     " ABS(sum ( case when times  <![CDATA[<]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and paymode ='F'  then 1 else null end ) zfbsshs," +
                     " sum ( case when paymode ='F'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbss," +
-                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='E' then 1 else null end ) +count ( case when  times  <![CDATA[<]]> 0 and paymode ='E'  then 1 else null end ) wxhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='E'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when  times  <![CDATA[<]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxsk, " +
-                    " count ( case when times  <![CDATA[<]]> 0 and paymode ='E' then 1 else null end ) wxthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='E' then 1 else null end )  wxhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='E'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxsk, " +
+                    " count ( case when times  <![CDATA[<]]> 0 and paymode ='E' then 1 else null end ) - count ( case when  times  <![CDATA[<]]> 0 and paymode ='E'  then 1 else null end ) wxthhs," +
                     " ABS(sum ( case when times  <![CDATA[<]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and paymode ='E'  then 1 else null end ) wxsshs," +
                     " sum ( case when paymode ='E'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxss," +
-                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='Y' then 1 else null end ) + count ( case when times  <![CDATA[<]]> 0 and paymode ='Y'  then 1 else null end ) byjzhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='Y'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS(sum ( case when  times  <![CDATA[<]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) byjzsk, " +
-                    " count ( case when times  <![CDATA[<]]> 0 and paymode ='Y' then 1 else null end ) byjzthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='Y' then 1 else null end )  byjzhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='Y'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) byjzsk, " +
+                    " count ( case when times  <![CDATA[<]]> 0 and paymode ='Y' then 1 else null end ) - count ( case when times  <![CDATA[<]]> 0 and paymode ='Y'  then 1 else null end ) byjzthhs," +
                     " ABS(sum ( case when times  <![CDATA[<]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) byjzth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and paymode ='Y'  then 1 else null end ) byjzsshs," +
                     " sum ( case when paymode ='Y'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) byjzss," +
-                    " count ( case when times  <![CDATA[>]]> 0 and (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null) then 1 else null end ) +count ( case when  (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null)  and times  <![CDATA[<]]> 0 then 1 else null end ) hjhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS(sum ( case when  (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null) and times  <![CDATA[<]]> 0 then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ))hjsk, " +
-                    " count ( case when (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null)  and times  <![CDATA[<]]> 0 then 1 else null end ) hjthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null) then 1 else null end ) hjhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) hjsk, " +
+                    " count ( case when (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null)  and times  <![CDATA[<]]> 0 then 1 else null end ) -count ( case when  (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null)  and times  <![CDATA[<]]> 0 then 1 else null end ) hjthhs," +
                     " ABS(sum ( case when (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null) and times  <![CDATA[<]]> 0 then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) hjth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and (paymode <![CDATA[<>]]> 'hospital_z' or paymode is null) then 1 else null end ) hjsshs," +
                     " sum ( case when paymode <![CDATA[<>]]> 'hospital_z' or paymode is null then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) hjss," +
-                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='WX' then 1 else null end ) + count ( case when  op_id='99999' and times  <![CDATA[<]]> 0 and paymode ='WX' then 1 else null end ) wxzzhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='WX'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when op_id='99999' and   times  <![CDATA[<]]> 0 and paymode ='WX'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxzzsk, " +
-                    " count ( case when op_id='99999' and  times  <![CDATA[<]]> 0 and paymode ='WX' then 1 else null end ) wxzzthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='WX' then 1 else null end ) wxzzhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='WX'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )  wxzzsk, " +
+                    " count ( case when op_id='99999' and  times  <![CDATA[<]]> 0 and paymode ='WX' then 1 else null end ) - count ( case when  op_id='99999' and times  <![CDATA[<]]> 0 and paymode ='WX' then 1 else null end ) wxzzthhs," +
                     " ABS( sum ( case when op_id='99999' and   times  <![CDATA[<]]> 0 and paymode ='WX'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxzzth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and paymode ='WX' then 1 else null end ) wxzzsshs," +
                     " sum ( case when op_id='99999' and paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxzzss, " +
-                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='ZFB' then 1 else null end ) + count ( case when op_id='99999' and times  <![CDATA[<]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzhs," +
-                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='ZFB'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when op_id='99999' and   times  <![CDATA[<]]> 0 and paymode ='ZFB'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbzzsk, " +
-                    " count ( case when op_id='99999' and    times  <![CDATA[<]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzthhs," +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='ZFB'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )  zfbzzsk, " +
+                    " count ( case when op_id='99999' and    times  <![CDATA[<]]> 0 and paymode ='ZFB' then 1 else null end ) - count ( case when op_id='99999' and times  <![CDATA[<]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzthhs," +
                     " ABS( sum ( case when  op_id='99999' and   times  <![CDATA[<]]> 0 and paymode ='ZFB'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbzzth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzsshs," +
                     " sum ( case when op_id='99999' and paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbzzss, " +

+ 8 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/MzDepositFileMapper.java

@@ -108,4 +108,12 @@ public interface MzDepositFileMapper {
      */
     @Update("update mz_deposit_file set cheque_type=#{chequeType} where receipt_sn=#{receiptSn}")
     int updateChequeType(@Param("chequeType") String chequeType,@Param("receiptSn") Integer receiptSn);
+
+    /**
+     * 判断是否已经入库,防止重复缴费
+     * @param mzDepositFile
+     * @return
+     */
+    @Select("select count(1) from mz_deposit_file where patient_id=#{patientId} and times = #{times} and receipt_no=#{receiptNo} and pay_mark=#{payMark} and cheque_type=#{chequeType} and amount=#{amount} and op_id=#{opId}")
+    int selectBySameParams(MzDepositFile mzDepositFile);
 }

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

@@ -356,6 +356,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
     @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
     @Override
     public void afterChargeFee(String patientId, Integer times, List<MzDepositFile> mzDepositFiles, Date now, int serialNo, MzReceiptSerial mzReceiptSerial, BigDecimal totalPayable) throws MzException {
+        if(mzDepositFileMapper.selectBySameParams(mzDepositFiles.get(0))>0){
+            throw new MzException("当前病人本次处方已经成功缴费,无需重复缴费");
+        }
         MzYjReq updateMzYjReq = new MzYjReq(patientId, times);
         updateMzYjReq.setSerialNo(serialNo);
         updateMzYjReq.setPayMark(PayMarkEnum.CHARGED.code);
@@ -410,6 +413,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
 //        List<MzChargeDetail> newMzChargeDetailList = getMzChargeDetails(opId, mzDepositFileVo, now, serialNo);
 //        getMzChargeDetailService().saveMzChargeDetail(newMzChargeDetailList);
         List<MzDepositFile> newMzDepositFileList = getMzDepositFiles(mzDepositFileVo, now, serialNo);
+        if(mzDepositFileMapper.selectBySameParams(newMzDepositFileList.get(0))>0){
+            throw new MzException("当前病人本次处方已经成功缴费,无需重复缴费");
+        }
         mzDepositFileService.batchSaveMzDepositFile(newMzDepositFileList);
         List<MzReceiptSerial> newMzReceiptSerialList = getMzReceiptSerials(opId, mzDepositFileVo, now, serialNo);
         mzReceiptSerialService.batchSaveMzReceiptSerial(newMzReceiptSerialList);

+ 9 - 1
src/main/resources/static/js/registration.js

@@ -1698,7 +1698,15 @@ function prn1Print(patientId, times) {
                 if (times > 0) {
                     loadRegistrationList(true);
                 }
-            } else if (res.code == -1) {
+            }else if(res.code == -2){
+                new PNotify({
+                    title: '操作提示',
+                    text: res.message,
+                    type: 'success',
+                    hide: true,
+                    styling: 'bootstrap3'
+                });
+            }else if (res.code == -1) {
                 new PNotify({
                     title: '错误提示',
                     text: res.message,