Bläddra i källkod

住院日结优化

lihong 3 månader sedan
förälder
incheckning
8318627027

+ 2 - 2
src/main/java/thyyxxk/webserver/dao/his/zygl/ZyDailySettlementDao.java

@@ -274,8 +274,8 @@ public interface ZyDailySettlementDao {
             "         charge28=sum(b.charge28),  " +
             "         name=max(c.name)," +
             "         receipt_no=max(b.receipt_no) " +
-            "    FROM zy_ledger_file a join zy_receipt b on a.inpatient_no = b.inpatient_no and a.admiss_times = b.admiss_times " +
-            "     left join  a_patient_mi c on a.inpatient_no = b.inpatient_no " +
+            "    FROM zy_ledger_file a join zy_receipt b on a.inpatient_no = b.inpatient_no and a.admiss_times = b.admiss_times and a.ledger_sn=b.ledger_sn " +
+            "     left join  a_patient_mi c on a.inpatient_no = c.inpatient_no " +
             "    WHERE a.cash_date >  #{beginTime} and " +
             " a.cash_date <= #{endTime}  and " +
             "          (a.cash_id =#{opId} or a.cash_id is null)   " +