| 1234567891011 |
- select t1.sys_reportid,
- t1.siteid,
- if(t1.reporttype = '积木报表', t2.type, 'datainfo') type,
- if(t1.reporttype = '积木报表', t2.name, t1.name) name
- from sys_report t1
- left join jimureport.jimu_report t2 on t1.jimu_report_id = t2.id
- where (ifnull(t1.siteid, '') = '' or t1.siteid = $siteid$)
- and t1.systemappid = $systemappid$
- and t1.isused = 1
- and ((t1.reporttype = '积木报表' and t2.id is not null)
- or (t1.reporttype != '积木报表'))
|