|
@@ -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) " +
|