|
@@ -25,12 +25,12 @@ public interface ChargeListDao {
|
|
|
"gender=(case when sex='1' then '男' when sex='2' then '女' else '未知' end), " +
|
|
|
"rtrim(admiss_dept) as dept,admiss_date as admdate,med_type as medtype, " +
|
|
|
"admiss_date as begndate,isnull(dis_date,getdate()) as enddate, " +
|
|
|
- "balance=(select ((select isnull(sum(t.depo_amount),0) from zy_deposit_file t where t.inpatient_no=a.inpatient_no " +
|
|
|
- "and t.admiss_times=a.admiss_times and t.status in (1,2)) + " +
|
|
|
+ "balance=(select ((select isnull(sum(t.depo_amount),0) from zy_deposit_file t " +
|
|
|
+ "where t.inpatient_no=a.inpatient_no and t.admiss_times=a.admiss_times and t.status in (1,2)) + " +
|
|
|
"(select sum(e.fund_pay_sumamt) from zy_ledger_file e where e.inpatient_no=#{patNo} and e.admiss_times=#{times}) - " +
|
|
|
"(select isnull(sum(t.charge_fee),0) from zy_detail_charge t where t.inpatient_no=a.inpatient_no " +
|
|
|
"and t.admiss_times=a.admiss_times))),a.total_charge as totalCost " +
|
|
|
- "from ${table} a where a.inpatient_no=#{patNo} and a.admiss_times=#{times}")
|
|
|
+ "from ${table} a where a.inpatient_no=#{patNo} and a.admiss_times=#{times} ")
|
|
|
BriefPatInfo selectBriefPatInfo(String patNo, int times, String table);
|
|
|
|
|
|
@Select("execute zy_receive_drug #{patNo},#{times},#{patNo},'0';" +
|