填报报表加了个加载结束事件报错,但代码感觉没问题啊,有排查思路吗,加了那段代码查询都点不了

Q@6ZTC~{BS{8[CZDLF23J_R.png

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列单元格赋值

}

FineReport 帆软用户frLlnxgPLQ 发布于 2023-3-2 15:44 (编辑于 2023-3-2 15:44)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
1
用户k6280494Lv6资深互助
发布于2023-3-2 15:48

注释掉一部分,一部分一部分调试吧

  • 2关注人数
  • 271浏览人数
  • 最后回答于:2023-3-2 15:48
    请选择关闭问题的原因
    确定 取消
    返回顶部