预览有数据,页面没有,参数名和控件名一致,而且开始时间和结束时间都要选则7月的时间页面就会有数据,但凡有一个不是7月的都没有,是用dblink的原因吗 还是什么问题呢 select * from (select distinct v.curr_dept_name as 科室名称, v.ippat_no as 住院号, v.pat_name as 病人姓名, v.pat_sex_name as 性别, v.pat_age as 年龄, v.inward_time as 入院日期, v.discharge_date as 出院日期, LISTAGG(n.DIAGNOSIS_DESC,',') WITHIN GROUP (ORDER BY n.VISIT_ID,n.DIAGNOSIS_TIME) as 出院诊断, l.order_item_id as 药品代码, l.order_item_name as 药品名称, l.order_item_spec as 药品规格, v.curr_ip_doctor_id as 医生代码, v.curr_ip_doctor_name as 医生姓名 from wipn.ipn_visit v, wipn.ipn_order l, wpub.p_drug g, jhemr.CDR_INP_DIAG@jhemr n where v.account_id = l.account_id and v.visit_id = n.VISIT_ID and l.order_item_id = g.item_id and g.monitor_drug_flag = 'Y' and v.pat_name not like '%测试%' and v.curr_ward_name not like '%测试%' and g.item_code IN ('121090780102','201040190101','121090280104','113010050205', '112020290303','121090070108','121090270101','121090271405','121090271207','121090271607','121010020209', '125990080201','201990510A07','20199051030M','125990090209','121090380304','12109038031J','201020140340', '201020140225','126010040507','126010040204','12601004010B','126010040389','12601004031J','126010040A0Q', '126010040A0Y','12601087076P','126010010102','126011010501','126010010105','126010010703','126010530102', '126010530702','126010520404','126010520405','12601052120C','126010052120*','124030081102','124030081408', '124030090201','124030090101','124030090301','1010202301AD','10102023019W','10102023055T','111070190502', '111070190604','111070190704','11107009171F','111070090409','11107013040Q','11107007030Q','11107007030N', '12506003010N','12506003020C','10104013054G','10104013013T','101040130569','101040130837','180030090102', '121090030301','121090031502','12101015022T','10202018040S','102020180203','102020182706','10202018271M', '10202018163V') and l.order_type in ('WDRUG', 'PRESC_IN', 'PRESC_OUT') and v.discharge_date >= to_date('${start_date}', 'yyyy-mm-dd') and v.discharge_date < to_date('${end_date}', 'yyyy-mm-dd') + 1 group by v.curr_dept_name, v.ippat_no, v.pat_name, v.pat_sex_name, v.pat_age, v.inward_time, v.discharge_date, l.order_item_id, l.order_item_name, l.order_item_spec, v.curr_ip_doctor_id, v.curr_ip_doctor_name ) x order by x.科室名称, x.药品代码, x.住院号 |