|
@@ -117,7 +117,7 @@ public interface Routines {
|
|
|
|
|
|
@Select("select * from (" +
|
|
|
"select a.detail_sn,charge_date,his_item_code=b.code,charge_fee=sum(a.charge_fee), " +
|
|
|
- "his_item_name=max(c.his_name),price=max(b.charge_amount), " +
|
|
|
+ "his_item_name=max(b.name),price=max(b.charge_amount), " +
|
|
|
"yb_bill_code=isnull(max(c.yb_bill_code),''),yb_code=isnull(max(c.yb_code),''), " +
|
|
|
"yb_self_flag=isnull(a.yb_self_flag,0),yb_class=isnull(max(c.yb_class),''), " +
|
|
|
"charge_amount=cast(sum(isnull(a.charge_amount,1)) as real ) " +
|
|
@@ -125,7 +125,7 @@ public interface Routines {
|
|
|
"(select charge_code=his_code,max(his_name) his_name, " +
|
|
|
"yb_code=max(yb_code),yb_bill_code=max(charge_type),yb_class=max(charge_category),max(audit_date) sh_date " +
|
|
|
"from zd_cssyb_xmdz group by his_code) c " +
|
|
|
- "where a.inpatient_no=#{inpatientNo} and a.admiss_times=#{admissTimes} and a.ledger_sn=#{ledgerSn} and " +
|
|
|
+ "where a.inpatient_no=#{inpatientNo} and a.admiss_times=#{admissTimes} and a.ledger_sn=#{ledgerSn} and " +
|
|
|
"a.charge_code=b.code and a.charge_status>1 and " +
|
|
|
"(case when isnull(a.serial,'')='' or isnull(a.serial,'')='00' then '00' else a.serial end)='00' and " +
|
|
|
"b.code*=c.charge_code and isnull(a.trans_flag_yb,'0')='0' and isnull(a.infant_flag,'0')='0' and " +
|
|
@@ -134,7 +134,7 @@ public interface Routines {
|
|
|
"b.code,isnull(trans_flag_yb,''),yb_self_flag " +
|
|
|
"union all " +
|
|
|
"select detail_sn=a.detail_sn,charge_date,his_item_code=b.code,charge_fee=sum(a.charge_fee), " +
|
|
|
- "his_item_name=max(c.his_name),price=max(b.charge_amount), " +
|
|
|
+ "his_item_name=max(b.name),price=max(b.charge_amount), " +
|
|
|
"yb_bill_code=isnull(max(c.yb_bill_code),''),yb_code=isnull(max(c.yb_code),''), " +
|
|
|
"yb_self_flag=isnull(a.yb_self_flag,0),yb_class=isnull(max(c.yb_class),''), " +
|
|
|
"charge_amount=cast(sum(isnull(a.charge_amount,1)) as real ) " +
|
|
@@ -142,7 +142,7 @@ public interface Routines {
|
|
|
"(select charge_code=his_code,max(his_name) his_name, " +
|
|
|
"yb_code=max(yb_code),yb_bill_code=max(charge_type),yb_class=max(charge_category),max(audit_date) sh_date " +
|
|
|
"from zd_cssyb_xmdz group by his_code) c " +
|
|
|
- "where a.inpatient_no=#{inpatientNo} and a.admiss_times=#{admissTimes} and a.ledger_sn=#{ledgerSn} and " +
|
|
|
+ "where a.inpatient_no=#{inpatientNo} and a.admiss_times=#{admissTimes} and a.ledger_sn=#{ledgerSn} and " +
|
|
|
"a.charge_code=b.code and a.charge_status>1 and " +
|
|
|
"(case when isnull(a.serial,'')='' or isnull(a.serial,'')='00' then '00' else a.serial end)='00' and " +
|
|
|
"b.code*=c.charge_code and isnull(a.trans_flag_yb,'0')='0' and isnull(a.infant_flag,'0')='0' and " +
|
|
@@ -162,12 +162,12 @@ public interface Routines {
|
|
|
"charge_amount=cast (sum(a.charge_amount) as real),his_item_name=max(b.name ) , " +
|
|
|
"yb_bill_code=isnull(max(c.yb_bill_code),''),yb_code=isnull(max(c.yb_code),''), " +
|
|
|
"yb_self_flag=isnull(a.yb_self_flag,0),yb_class=isnull(max(c.yb_class),'') " +
|
|
|
- "from zy_detail_charge a,yp_zd_dict b, " +
|
|
|
+ "from zy_detail_charge a,yp_zd_dict b, " +
|
|
|
"(select charge_code=his_code,yb_name=max(his_name), " +
|
|
|
"yb_code=max(yb_code),yb_bill_code=max(charge_type), " +
|
|
|
"yb_class=max(charge_category),max(audit_date) sh_date " +
|
|
|
"from zd_cssyb_xmdz group by his_code) c " +
|
|
|
- "where a.inpatient_no=#{inpatientNo} and a.admiss_times=#{admissTimes} and " +
|
|
|
+ "where a.inpatient_no=#{inpatientNo} and a.admiss_times=#{admissTimes} and " +
|
|
|
"a.ledger_sn=#{ledgerSn} and a.charge_status>'1' and " +
|
|
|
"a.charge_code_mx=b.code and a.serial=b.serial and " +
|
|
|
"a.charge_code_mx *=c.charge_code and isnull(a.serial,'')<>'00' and " +
|
|
@@ -182,11 +182,11 @@ public interface Routines {
|
|
|
"charge_amount=cast (sum(a.charge_amount) as real),his_item_name=max(b.name ) , " +
|
|
|
"yb_bill_code=isnull(max(c.yb_bill_code),''),yb_code=isnull(max(c.yb_code),''), " +
|
|
|
"yb_self_flag=isnull(a.yb_self_flag,0),yb_class=isnull(max(c.yb_class),'') " +
|
|
|
- "from zy_detail_charge a,yp_zd_dict b, " +
|
|
|
+ "from zy_detail_charge a,yp_zd_dict b, " +
|
|
|
"(select charge_code=his_code,max(his_name) yb_name, " +
|
|
|
"yb_code=max(yb_code),yb_bill_code=max(charge_type),yb_class=max(charge_category),max(audit_date) sh_date " +
|
|
|
"from zd_cssyb_xmdz group by his_code) c " +
|
|
|
- "where a.inpatient_no=#{inpatientNo} and a.admiss_times=#{admissTimes} and " +
|
|
|
+ "where a.inpatient_no=#{inpatientNo} and a.admiss_times=#{admissTimes} and " +
|
|
|
"a.ledger_sn=#{ledgerSn} and a.charge_status>'1' and " +
|
|
|
"a.charge_code_mx=b.code and a.serial=b.serial and " +
|
|
|
"a.charge_code_mx *=c.charge_code and isnull(a.serial,'')<>'00' and " +
|