lighter 7 月之前
父节点
当前提交
7a36eac3d3
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 5 6
      src/main/java/thyyxxk/sizyfeeoprnsystm/dao/SiZyDao.java

+ 5 - 6
src/main/java/thyyxxk/sizyfeeoprnsystm/dao/SiZyDao.java

@@ -92,14 +92,13 @@ public interface SiZyDao {
             "charge_amount as cnt, " +
             "pric=charge_fee/charge_amount, " +
             "tcmdrugUsedWay=(case when charge_code='BILL02' then '1' else '' end), " +
-            "hospApprFlag=COALESCE(hosp_appr_flag, (case when yb_self_flag='1' then '2' else '0' end))," +
+            "hospApprFlag=(case when yb_self_flag='1' then '2' else '0' end)," +
             "mdtrtId=(select mdtrt_id from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "psnNo=(select psn_no from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "medListCodg=isnull((select max(national_code) from yp_zd_dict where code=charge_code_mx),(select max(national_code) from zd_charge_item where code=charge_code_mx)), " +
             "bilgDeptCodg=(select t.si_caty from zd_unit_code t where t.code=ward_code), " +
-            "bilgDeptName=(select z.name from t_yb_dept z where z.code=" +
-            "(select t.si_caty from zd_unit_code t where t.code=ward_code)), " +
+            "bilgDeptName=(select t.si_caty_name from zd_unit_code t where t.code=ward_code), " +
             "bilgDrCodg=isnull(" +
             "(select rtrim(nullif(yb_code,'')) from a_employee_mi where code=isnull(isnull(nullif(doctor_code,''),refer_physician),op_id_code)), " +
             "(select rtrim(yb_code) from a_employee_mi where code=isnull(nullif(refer_physician,''),op_id_code))), " +
@@ -133,7 +132,7 @@ public interface SiZyDao {
             "charge_amount as cnt, " +
             "pric=charge_fee/charge_amount, " +
             "tcmdrugUsedWay=(case when charge_code='BILL02' then '1' else '' end), " +
-            "hospApprFlag=COALESCE(hosp_appr_flag, (case when yb_self_flag='1' then '2' else '0' end))," +
+            "hospApprFlag=(case when yb_self_flag='1' then '2' else '0' end)," +
             "mdtrtId=(select mdtrt_id from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "psnNo=(select psn_no from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
@@ -300,7 +299,7 @@ public interface SiZyDao {
             "charge_fee as detItemFeeSumamt, " +
             "charge_amount as cnt, " +
             "pric=charge_fee/charge_amount, " +
-            "hospApprFlag=COALESCE(hosp_appr_flag, (case when yb_self_flag='1' then '2' else '0' end))," +
+            "hospApprFlag=(case when yb_self_flag='1' then '2' else '0' end)," +
             "mdtrtId=(select mdtrt_id from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "psnNo=(select psn_no from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
@@ -341,7 +340,7 @@ public interface SiZyDao {
             "charge_fee as detItemFeeSumamt, " +
             "charge_amount as cnt, " +
             "pric=charge_fee/charge_amount, " +
-            "hospApprFlag=COALESCE(hosp_appr_flag, (case when yb_self_flag='1' then '2' else '0' end))," +
+            "hospApprFlag=(case when yb_self_flag='1' then '2' else '0' end)," +
             "mdtrtId=(select mdtrt_id from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "psnNo=(select psn_no from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +
             "medType=(select med_type from t_si_pat_info b where b.pat_no=inpatient_no and b.times=admiss_times and b.ledger_sn=a.ledger_sn), " +