var text = contentPane.curLGP.getCellValue("D3"); //获取D3控件值 if (!text) { var sql = "select to_char(nvl(anar.in_oproom_date, aly.scheduled_date), 'yyyy-mm-dd') oper_date, to_char(nvl(reg.patient_name, aly.patient_name)) patient_name, nvl(rop.operator_doctor, aop.operator_doctor) operator_doctor, nvl(rop.narcotic_doctor, aop.narcotic_doctor) narcotic_doctor, nvl(rop.circuit_nurse,aop.circuit_nurse) circuit_nurse,nvl(rop.scrub_nurse,aop.scrub_nurse) scrub_nurse from sam_apply aly left join sam_reg reg on reg.sam_apply_id = aly.id left join ipi_registration ipi on ipi.id = nvl(reg.ipi_registration_id, aly.ipi_registration_id) left join sam_anar anar on anar.sam_apply_id = aly.id left join (select max(e.employee_name) operator_doctor,max(e4.employee_name) narcotic_doctor, max(e2.employee_name) scrub_nurse, max(e3.employee_name) circuit_nurse, op.sam_apply_id from sam_apply_op op left join hrm_employee e on e.id = op.operator_doctor_id left join hrm_employee e4 on e.id = op.narcotic_doctor_id left join hrm_employee e2 on e2.id = op.scrub_nurse_01 left join hrm_employee e3 on e3.id = op.circuit_nurse_01 group by op.sam_apply_id) aop on aop.sam_apply_id = aly.id left join (select max(e.employee_name) operator_doctor,max(e4.employee_name) narcotic_doctor, max(e2.employee_name) scrub_nurse, max(e3.employee_name) circuit_nurse, op.sam_reg_id from sam_reg_op op left join hrm_employee e on e.id = op.operator_doctor_id left join hrm_employee e4 on e.id = op.narcotic_doctor_id left join hrm_employee e2 on e2.id = op.scrub_nurse_01 left join hrm_employee e3 on e3.id = op.circuit_nurse_01 group by op.sam_reg_id) rop on rop.sam_reg_id = aly.id where ipi.ipi_registration_no like '%" + hospitalNo + "%'"; var riqi = FR.remoteEvaluate('=sql("JDBC2","' + sql + '",1,1)'); var xingm = FR.remoteEvaluate('=sql("JDBC2","' + sql + '",2,1)'); var zdys = FR.remoteEvaluate('=sql("JDBC2","' + sql + '",3,1)'); var mzys = FR.remoteEvaluate('=sql("JDBC2","' + sql + '",4,1)'); var xhhs = FR.remoteEvaluate('=sql("JDBC2","' + sql + '",5,1)'); var xshs = FR.remoteEvaluate('=sql("JDBC2","' + sql + '",6,1)'); //var zhudaoys=FR.remoteEvaluate("value('ds1','成本价','产品ID','"+id+"')"); //var xunhuihs=FR.remoteEvaluate("value('ds1','单价','产品ID','"+id+"')"); //var xishouhs=FR.remoteEvaluate("value('ds1','库存量','产品ID','"+id+"')"); //根据产品ID去ds1数据集中获取其他字段的值 var row = 2 //获取当前行号 _g().setCellValue(0, 1, row, riqi); _g().setCellValue(0, 2, row, xingm); _g().setCellValue(0, 3, row, hospitalNo); _g().setCellValue(0, 6, row, zdys); _g().setCellValue(0, 7, row, mzys); _g().setCellValue(0, 8, row, xhhs); _g().setCellValue(0, 9, row, xshs); //给当前行其他单元格赋值; _g().setCellValue('K' + (row+1), null, 1); //给当前行的L列单元格赋值 } |