ソースを参照

被退费的收费的ori_detail_sn会变成-1,对此做出相应更改。

lighter 3 年 前
コミット
080f652bd9

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

@@ -127,7 +127,8 @@ public interface SiZyDao {
      * @return 费用明细
      */
     @Select("select detail_sn as feedetlSn, " +
-            "order_no as drordNo, ori_detail_sn as initFeedetlSn, " +
+            "order_no as drordNo, " +
+            "initFeedetlSn=case when ori_detail_sn=-1 then null else ori_detail_sn end, " +
             "charge_date as feeOcurTime, " +
             "charge_code_mx as medinsListCodg, " +
             "charge_fee as detItemFeeSumamt, " +

+ 2 - 12
src/main/java/thyyxxk/webserver/dao/his/yibao/Routines.java

@@ -290,7 +290,8 @@ public interface Routines {
 
     @Select("select charge_amount,detail_sn,ori_detail_sn from zy_detail_charge " +
             "where inpatient_no=#{zyh} and admiss_times=#{zycs} and ledger_sn=#{sn} " +
-            "and isnull(infant_flag,0)!=1 and isnull(trans_flag_yb,0) not in (1,2)")
+            "and isnull(infant_flag,0)!=1 and isnull(trans_flag_yb,0) not in (1,2) " +
+            "and isnull(ori_detail_sn,-1)!=-1")
     List<FeeCounteract> selectNegativeFeesWithOriDetlSn(@Param("zyh") String zyh,
                                                         @Param("zycs") Integer zycs,
                                                         @Param("sn") Integer sn);
@@ -311,15 +312,4 @@ public interface Routines {
     @Update("update zy_detail_charge set trans_flag_yb=2 where inpatient_no=#{zyh} and " +
             "admiss_times=#{zycs} and detail_sn in (#{sn}, #{sn2})")
     void updateYbTransFlagInPair(@Param("zyh") String zyh, @Param("zycs") Integer zycs, @Param("sn") Integer sn, @Param("sn2") Integer sn2);
-
-    @Select("select max(start_time) from yz_act_order where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} " +
-            "and status_flag > '1' and isnull(group_no, '00')='00' and order_code in ('06026','06053','05973')")
-    Date selectDismissOrderDate(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes);
-
-    @Update("update zy_detail_charge set charge_date=#{disdate}, gen_time=#{disdate} where inpatient_no=#{zyh} " +
-            "and admiss_times=#{zycs} and ledger_sn=#{sn} and charge_date>#{disdate}")
-    int updateChargeDate(@Param("zyh") String zyh,
-                          @Param("zycs") Integer zycs,
-                          @Param("sn") Integer sn,
-                          @Param("disdate") Date disdate);
 }

+ 0 - 5
src/main/java/thyyxxk/webserver/service/yibao/SettleService.java

@@ -35,11 +35,6 @@ public class SettleService {
     }
 
     public void beforeUpload(Overview o) {
-//        Date disdate = routines.selectDismissOrderDate(o.getInpatientNo(), o.getAdmissTimes());
-//        if (null != disdate) {
-//            int updatedCount = routines.updateChargeDate(o.getInpatientNo(), o.getAdmissTimes(), o.getLedgerSn(), disdate);
-//            log.info("更新大于出院时间的费用:{}条", updatedCount);
-//        }
         List<FeeCounteract> negative = routines.selectNegativeFeesWithOriDetlSn(
                 o.getInpatientNo(), o.getAdmissTimes(), o.getLedgerSn());
         if (null == negative || negative.isEmpty()) {