lighter 2 years ago
parent
commit
e63d080c27
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/java/thyyxxk/webserver/dao/his/inpatient/PatientDao.java

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

@@ -305,7 +305,7 @@ public interface PatientDao {
                               @Param("times") int times,
                               @Param("ledger") int ledger);
 
-    @Update("update zy_ledger_file set balance=(deposit+charge_yb-total_charge) where " +
+    @Update("update zy_ledger_file set balance=(deposit+isnull(charge_yb,0)-total_charge) where " +
             "inpatient_no=#{zyh} and admiss_times=#{times} and ledger_sn=#{ledger}")
     void updateBalance(@Param("zyh") String zyh,
                        @Param("times") int times,