فهرست منبع

医保结算时,向zy_ledger_file表写入基金支付与个账支付。

lighter 3 سال پیش
والد
کامیت
2ce553c4c6

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>2</version>
+    <version>1</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 14 - 11
src/main/java/thyyxxk/webserver/dao/his/yibao/DismissDao.java

@@ -148,17 +148,18 @@ public interface DismissDao {
 
     @Delete("delete zy_ledger_file_yb where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn}")
     void deleteZyLedgerFileYb(@Param("patNo") String patNo,
-                              @Param("times") Integer times, @Param("ledgerSn") int ledgerSn);
+                              @Param("times") Integer times,
+                              @Param("ledgerSn") int ledgerSn);
 
     @Insert("insert into zy_ledger_file_yb (inpatient_no,admiss_times,ledger_sn,total_cost,tczf,grzhzf,dbzf,xjzf," +
             "full_self_pay,part_self_pay,hospital_pay) values (#{inpatientNo},#{admissTimes},#{ledgerSn},#{totalCost}," +
             "#{tczf},#{grzhzf},#{dbzf},#{xjzf},#{fullSelfPay},#{partSelfPay},#{hospitalPay})")
     int insertZyLedgerFileYb(MedinsSettleFee settleFee);
 
-    @Update("update zy_ledger_file set charge_yb=1 where inpatient_no=#{patNo} and " +
-            "admiss_times=#{times} and ledger_sn=#{ledgerSn}")
+    @Update("update zy_ledger_file set charge_yb=1 where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn}")
     int beforeWriteReceiptTable(@Param("patNo") String patNo,
-                                @Param("times") Integer times, @Param("ledgerSn") int ledgerSn);
+                                @Param("times") Integer times,
+                                @Param("ledgerSn") int ledgerSn);
 
     @Insert("insert into zy_receipt (inpatient_no,admiss_times,ledger_sn,receipt_sn,receipt_no," +
             "account_date,date_1,date_2,ward,dept,print_date,responce_unit,op_id_code,total_charge," +
@@ -187,14 +188,15 @@ public interface DismissDao {
     int updateZifeiCostStatus(MedinsSettleFee settleFee);
 
     @Update("update zy_ledger_file set account_date=#{zjdzDatetime},settle_type='1',balance=0,last_balance=#{xjzf}, " +
-            "settle=(deposit-#{xjzf}),ward_code=#{wardCode},dept_code=#{deptCode},op_id_code=#{staffId},charge_yb=0 " +
-            "where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
+            "settle=(deposit-#{xjzf}),ward_code=#{wardCode},dept_code=#{deptCode},op_id_code=#{staffId},charge_yb=0," +
+            "fund_pay_sumamt=#{tczf},acct_pay=#{grzhzf} where inpatient_no=#{inpatientNo} and " +
+            "admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
     int updateCostStatusWithoutInfant(MedinsSettleFee settleFee);
 
-    @Update("update zy_ledger_file set account_date=#{zjdzDatetime},settle_type='1',balance=0, " +
-            "last_balance=(total_charge-#{tczf}),settle=(deposit-total_charge+#{tczf}), " +
-            "ward_code=#{wardCode},dept_code=#{deptCode},op_id_code=#{staffId}, " +
-            "charge_yb=0 where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
+    @Update("update zy_ledger_file set account_date=#{zjdzDatetime},settle_type='1',balance=0,charge_yb=0, " +
+            "last_balance=(total_charge-#{tczf}-#{grzhzf}),settle=(deposit-total_charge+#{tczf}+#{grzhzf}), " +
+            "ward_code=#{wardCode},dept_code=#{deptCode},op_id_code=#{staffId},fund_pay_sumamt=#{tczf},acct_pay=#{grzhzf} " +
+            "where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
     int updateCostStatusWithInfant(MedinsSettleFee settleFee);
 
     @Update("update zy_detail_charge set charge_status=3 where charge_status=2 and " +
@@ -323,7 +325,8 @@ public interface DismissDao {
             "charge13=#{map.013},charge14=#{map.014},charge15=#{map.015},charge16=#{map.016},charge17=#{map.017}, " +
             "charge18=#{map.018},charge19=#{map.019},charge20=#{map.020},charge21=#{map.021},charge22=#{map.022}," +
             "charge23=#{map.023},charge24=#{map.024},charge25=#{map.025},charge26=#{map.026},charge27=#{map.027}, " +
-            "charge28=#{map.028},charge29=0,charge30=0 where inpatient_no>=#{patNo1} and inpatient_no<=#{patNo6} and admiss_times=#{times} ")
+            "charge28=#{map.028},charge29=0,charge30=0 where inpatient_no>=#{patNo1} and inpatient_no<=#{patNo6} and " +
+            "admiss_times=#{times} ")
     void updateInfantfee(@Param("patNo1") String patNo1,
                          @Param("patNo6") String patNo6,
                          @Param("times") int times,

+ 13 - 4
src/main/java/thyyxxk/webserver/entity/yibao/dismiss/MedinsSettleFee.java

@@ -1,6 +1,7 @@
 package thyyxxk.webserver.entity.yibao.dismiss;
 
 import lombok.Data;
+import thyyxxk.webserver.utils.StringUtil;
 
 import java.util.Date;
 
@@ -15,7 +16,7 @@ public class MedinsSettleFee {
     private String deptCode;
     private String totalCost;
     private String tczf;    // 统筹支付
-    private String grzhzf;
+    private String grzhzf; // 个人账户支付
     private String dbzf;    // 大病支付
     private String xjzf;    // 现金支付
     private String hospitalPay; // 医院支付
@@ -41,15 +42,23 @@ public class MedinsSettleFee {
     }
 
     public String getTczf() {
-        return (null == tczf || tczf.trim().equals("")) ? "0.00" : tczf.trim();
+        return StringUtil.isBlank(tczf) ? "0.00" : tczf.trim();
+    }
+
+    public String getGrzhzf() {
+        return StringUtil.isBlank(grzhzf) ? "0.00" : grzhzf.trim();
+    }
+
+    public String getXjzf() {
+        return StringUtil.isBlank(xjzf) ? "0.00" : xjzf.trim();
     }
 
     public String getSbzf() {
-        return (null == sbzf || sbzf.trim().equals("")) ? "0.00" : sbzf.trim();
+        return StringUtil.isBlank(sbzf) ? "0.00" : sbzf.trim();
     }
 
     public String getHospitalPay() {
-        return (null == hospitalPay || hospitalPay.trim().equals("")) ? "0.00" : hospitalPay.trim();
+        return StringUtil.isBlank(hospitalPay) ? "0.00" : hospitalPay.trim();
     }
 
 }