瀏覽代碼

自费费用不用算了

xiaochan 3 年之前
父節點
當前提交
734595f0ec

+ 1 - 27
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -300,36 +300,10 @@ public interface UpIdCollectionDao {
             "where setl_id = #{setlId} " +
             "  and chrgitm_lv = #{chrgitmLv} " +
             "group by med_chrgitm_type")
-    List<IteminfoUpld> aAndBFees(@Param("setlId") String setlId,
+    List<IteminfoUpld> aAndBAndCFees(@Param("setlId") String setlId,
                                  @Param("chrgitmLv") String chrgitmLv,
                                  @Param("feeName") String feeName);
 
-    @Select("select med_chrgitm_type as med_chrgitm,\n" +
-            "       sum(case\n" +
-            "               when chrgitm_lv = '03' then det_item_fee_sumamt\n" +
-            "               else det_item_fee_sumamt * selfpay_prop end) as fulamtOwnpayAmt\n" +
-            "from t_si_setl_fee_detl\n" +
-            "where setl_id = #{setlId}\n" +
-            "group by med_chrgitm_type")
-    List<IteminfoUpld> fulamtOwnpayAmt(@Param("setlId") String setlId);
-
-    // -- 01 甲类
-    @Select("select med_chrgitm_type as med_chrgitm," +
-            "claa_sumfee=cast(sum(det_item_fee_sumamt * (1- selfpay_prop)) as decimal(16,2)) " +
-            "from t_si_setl_fee_detl " +
-            "where setl_id = #{setlId} and chrgitm_lv = '01' " +
-            "group by med_chrgitm_type")
-    List<IteminfoUpld> jiaLeiFeiYong(@Param("setlId") String setlId);
-
-    // -- 02 乙类
-    @Select("select med_chrgitm_type as med_chrgitm," +
-            "clab_amt=cast(sum(det_item_fee_sumamt * (1- selfpay_prop)) as decimal(16,2)) " +
-            "from t_si_setl_fee_detl " +
-            "where setl_id = #{setlId} and chrgitm_lv = '02' " +
-            "group by med_chrgitm_type")
-    List<IteminfoUpld> yiLeiFeiYong(@Param("setlId") String setlId);
-
-
     /**
      * 重症监护信息
      *

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/medicalinsurance/setllistupld/SetlinfoUpld.java

@@ -298,6 +298,7 @@ public class SetlinfoUpld implements Serializable {
      */
     @JSONField(name = "maindiag_flag")
     private String maindiagFlag;
+
     /**
      * 手术操作代码计数
      */

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

@@ -186,7 +186,7 @@ public class SetlListUpldService {
         EntityCopy.Copy(dao.setlinfo2(patNo, times), setlinfoUpld);
         EntityCopy.Copy(dao.setlinfo3(String.format("inpatient_no ='%s'", patNo)), setlinfoUpld);
         EntityCopy.Copy(dao.setlinfo4(patNo, times), setlinfoUpld);
-        EntityCopy.Copy(dao.setlinfo5(patNo, times,ledgerSn), setlinfoUpld);
+        EntityCopy.Copy(dao.setlinfo5(patNo, times, ledgerSn), setlinfoUpld);
 
         if (patNo.startsWith("JT")) {
             EntityCopy.Copy(dao.singleDiseasePatientInformation(patNo, times), setlinfoUpld);
@@ -241,11 +241,11 @@ public class SetlListUpldService {
         setlinfoUpld.setBillCode("143001913350");
         setlinfoUpld.setBizSn(SnowFlakeId.instance().nextId());
         // 甲类费用
-        Map<String, IteminfoUpld> jiaLeiFeiYong = dao.aAndBFees(setlId, "01", "claaSumfee").stream().collect(Collectors.toMap(IteminfoUpld::getMedChrgitm, a -> a, (k1, k2) -> k1));
+        Map<String, IteminfoUpld> jiaLeiFeiYong = dao.aAndBAndCFees(setlId, "01", "claaSumfee").stream().collect(Collectors.toMap(IteminfoUpld::getMedChrgitm, a -> a, (k1, k2) -> k1));
         // 乙类费用
-        Map<String, IteminfoUpld> yiLeiFeiYong = dao.aAndBFees(setlId, "02", "clabAmt").stream().collect(Collectors.toMap(IteminfoUpld::getMedChrgitm, a -> a, (k1, k2) -> k1));
+        Map<String, IteminfoUpld> yiLeiFeiYong = dao.aAndBAndCFees(setlId, "02", "clabAmt").stream().collect(Collectors.toMap(IteminfoUpld::getMedChrgitm, a -> a, (k1, k2) -> k1));
         // 自费
-        Map<String, IteminfoUpld> fulamtOwnpayAmt = dao.fulamtOwnpayAmt(setlId).stream().collect(Collectors.toMap(IteminfoUpld::getMedChrgitm, a -> a, (k1, k2) -> k1));
+        Map<String, IteminfoUpld> fulamtOwnpayAmt = dao.aAndBAndCFees(setlId, "03", "fulamtOwnpayAmt").stream().collect(Collectors.toMap(IteminfoUpld::getMedChrgitm, a -> a, (k1, k2) -> k1));
         if (ListUtil.notBlank(amtAndOthAmt)) {
             for (IteminfoUpld item : amtAndOthAmt) {
                 String key = item.getMedChrgitm();