Browse Source

取消撤销部分医保费用的功能

lighter 5 days ago
parent
commit
00390ac63d

+ 0 - 10
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiQueryDao.java

@@ -553,15 +553,5 @@ public interface SiQueryDao {
     @Select("select count(1) from zy_detail_charge where inpatient_no=#{patNo} and admiss_times=#{times} " +
             "and ledger_sn=#{ledgerSn} and trans_flag_yb='1' ")
     int getUploadedCount(String patNo, int times, int ledgerSn);
-    @Select("select detail_sn from zy_detail_charge where inpatient_no=#{zyh} and admiss_times=#{times} " +
-            "and ledger_sn=#{ledger} and trans_flag_yb=1 and solid is null")
-    List<Integer> getUnsolidSn(String zyh, int times, int ledger);
 
-    @Select("select count(1) from zy_detail_charge where inpatient_no=#{zyh} and admiss_times=#{times} " +
-            "and ledger_sn=#{ledger} and solid=1")
-    Integer getDbSolidSize(String zyh, int times, int ledger);
-
-    @Select("select count(1) from zy_detail_charge where inpatient_no=#{zyh} and admiss_times=#{times} " +
-            "and ledger_sn=#{ledger} and trans_flag_yb=1")
-    Integer getDbUploadedSize(String zyh, int times, int ledger);
 }

+ 1 - 9
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiZyDao.java

@@ -86,7 +86,7 @@ public interface SiZyDao {
      * @param admissTimes 住院次数
      * @param ledgerSn    账页号
      */
-    @Update("update zy_detail_charge set trans_flag_yb=0,solid=null where inpatient_no=#{inpatientNo} and " +
+    @Update("update zy_detail_charge set trans_flag_yb=0 where inpatient_no=#{inpatientNo} and " +
             "admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn} and isnull(trans_flag_yb,0)!=2")
     void revokeAllUploadFee(String inpatientNo, int admissTimes, int ledgerSn);
 
@@ -256,15 +256,7 @@ public interface SiZyDao {
             "sign_date=getdate() where id='medInsurSignIn'")
     void updateSignNo(String signNo);
 
-    // 查询某患者某次住院所有已上传但未结算的明细号(包含录入和上账状态)
-    @Select("SELECT detail_sn FROM zy_detail_charge WHERE inpatient_no = #{patNo} AND admiss_times = #{times} AND ledger_sn = #{ledgerSn} AND trans_flag_yb = 1 AND charge_status IN ('1', '2')")
-    List<Integer> selectAllUploadedDetailSns(@Param("patNo") String patNo, @Param("times") Integer times, @Param("ledgerSn") Integer ledgerSn);
-
     // 根据明细号查处方号
     @Select("SELECT order_no FROM zy_detail_charge WHERE inpatient_no = #{patNo} AND admiss_times = #{times} AND detail_sn = #{detailSn}")
     String selectRxnoByDetailSn(@Param("patNo") String patNo, @Param("times") Integer times, @Param("detailSn") Integer detailSn);
-    @Update("update zy_detail_charge set solid=1 where inpatient_no=#{zyh} " +
-            "and admiss_times=#{times} and ledger_sn=#{ledger} and trans_flag_yb=1")
-    void solidifyPatFees(String zyh, int times, int ledger);
-
 }

+ 5 - 5
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -965,8 +965,8 @@ public class SetlListUpldService {
         }
         if (0 == result.getInteger(RESULT_CODE)) {
             JSONArray output = result.getJSONArray(OUTPUT);
-            if (null == output || output.size() == 0) {
-                return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有查询到费用明细。");
+            if (null == output || output.isEmpty()) {
+                return ResultVoUtil.success("查询成功。");
             }
             List<SiSetlFeeDetl> list = new ArrayList<>();
             for (int i = 0; i < output.size(); i++) {
@@ -980,7 +980,7 @@ public class SetlListUpldService {
                     list.clear();
                 }
             }
-            if (list.size() > 0) {
+            if (!list.isEmpty()) {
                 queryDao.insertSetlFeeDetlBatch(list);
             }
             return ResultVoUtil.success("查询成功。");
@@ -1836,8 +1836,8 @@ public class SetlListUpldService {
         }
         if (0 == result.getInteger(RESULT_CODE)) {
             JSONArray output = result.getJSONArray(OUTPUT);
-            if (null == output || output.size() == 0) {
-                return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有查询到费用明细。");
+            if (null == output || output.isEmpty()) {
+                return ResultVoUtil.success(new ArrayList<>());
             }
             Map<String, MzChargitems> detailsOfMedicalInsuranceExpenses = new HashMap<>();
 //            01	甲类	03	丙类 02	乙类	 	 

+ 3 - 3
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiQueryService.java

@@ -1672,9 +1672,9 @@ public class SiQueryService {
         }
         List<SiSetlinfo> list = setlinfoDao.selectMyList(condition.getSetlType(), insutype, admdvsStatement, begntime, endtime);
         list.forEach(item -> {
-            if (null != item.getHospPartAmt()) {
-                item.setFundPaySumamt(DecimalUtil.minusDouble(item.getFundPaySumamt(), item.getHospPartAmt()));
-            }
+//            if (null != item.getHospPartAmt()) {
+//                item.setFundPaySumamt(DecimalUtil.minusDouble(item.getFundPaySumamt(), item.getHospPartAmt()));
+//            }
             item.setInsuplcAdmdvsName(regionCache.get(item.getInsuplcAdmdvs()));
             FilterUtil.filterCodeToName(item);
         });

+ 1 - 7
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiZyService.java

@@ -322,7 +322,6 @@ public class SiZyService {
                 balance = "0";
             }
             patientDao.updateZyActPatientBalance(p.getInpatientNo(), balance);
-            dao.solidifyPatFees(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
             return "患者【" + p.getName() + "】院内总费用与医保中心总费用一致,医保报销金额为:¥ " + fundPay + "。";
         }
         throw new BizException(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
@@ -336,11 +335,6 @@ public class SiZyService {
         JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.REVOKE_HOSPITALIZATION_FEE_DETAILS, siPatInfo.getInsuplcAdmdvs());
         JSONArray data = new JSONArray();
         if (ListUtil.isBlank(p.getDetailSns())) {
-            p.setDetailSns(queryDao.getUnsolidSn(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
-        }
-        Integer dbSolidSize = queryDao.getDbSolidSize(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
-        Integer dbUploadedSize = queryDao.getDbUploadedSize(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
-        if (ListUtil.isBlank(p.getDetailSns()) || Objects.equals(dbSolidSize, dbUploadedSize)) {
             p.setDetailSns(null);
             JSONObject item = new JSONObject();
             item.put("feedetl_sn", "0000");
@@ -371,7 +365,7 @@ public class SiZyService {
             wrapper.eq("pat_no", p.getInpatientNo());
             wrapper.eq("times", p.getAdmissTimes());
             wrapper.eq("ledger_sn", p.getLedgerSn());
-            if (null == p.getDetailSns() || p.getDetailSns().isEmpty()) {
+            if (ListUtil.isBlank(p.getDetailSns())) {
                 dao.revokeAllUploadFee(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
                 dao.resetFundpayAmt(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
                 chrgtmpdao.delete(wrapper);