Browse Source

按照老大要求添加了 statue = ‘1’ 的sql

xiaochan 3 years ago
parent
commit
5b8ff6e68f

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

@@ -130,7 +130,7 @@ public interface DismissDao {
                      @Param("endtime") Date endtime);
 
     @Update("update zy_ledger_file set deposit=(select sum(depo_amount) from zy_deposit_file f with(nolock) " +
-            "where f.inpatient_no=#{zyh} and f.admiss_times=#{times} and f.ledger_sn=#{ledger}) " +
+            "where f.inpatient_no=#{zyh} and f.admiss_times=#{times} and f.ledger_sn=#{ledger} and f.status = '1') " +
             "where inpatient_no=#{zyh} and admiss_times=#{times} and ledger_sn=#{ledger}")
     void recountDeposit(@Param("zyh") String zyh,
                         @Param("times") int times,
@@ -368,10 +368,10 @@ public interface DismissDao {
                               @Param("ledgerSn") int ledgerSn);
 
     @Select("select cast(sum(depo_amount) as varchar(16)) from zy_deposit_file where " +
-            "inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn}")
+            "inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn} and status = '1' ")
     String selectDepositSumamt(@Param("patNo") String patNo,
-                                 @Param("times") int times,
-                                 @Param("ledgerSn") int ledgerSn);
+                               @Param("times") int times,
+                               @Param("ledgerSn") int ledgerSn);
 
     @Update("update zy_ledger_file set deposit=#{deposit}, balance=#{balance}, responce_type=#{restype}, " +
             "total_charge=#{map.total},charge1=#{map.001},charge2=#{map.002}, charge3=#{map.003},charge4=#{map.004}, " +

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/yibao/PatientDao.java

@@ -327,7 +327,7 @@ public interface PatientDao {
     void insertDisDiags(@Param("staffId") String staffId, @Param("list") List<ZyInYbDiag> list);
 
     @Update("update zy_ledger_file set deposit=(select sum(depo_amount) from zy_deposit_file f with(nolock) " +
-            "where f.inpatient_no=#{zyh} and f.admiss_times=#{times} and f.ledger_sn=#{ledger}) " +
+            "where f.inpatient_no=#{zyh} and f.admiss_times=#{times} and f.ledger_sn=#{ledger} and f.status = '1') " +
             "where inpatient_no=#{zyh} and admiss_times=#{times} and ledger_sn=#{ledger}")
     void recountDeposit(@Param("zyh") String zyh,
                         @Param("times") int times,