|
|
@@ -1,7 +1,11 @@
|
|
|
-select t1.sys_reportid, if(t1.reporttype = '积木报表', t2.name, t1.name) name, group_concat(t3.type separator ',') type
|
|
|
+select t1.sys_reportid,
|
|
|
+ if(t1.reporttype = '积木报表', t2.name, t1.name) name,
|
|
|
+ group_concat(t3.type separator ',') type
|
|
|
from sys_report t1
|
|
|
left join jimu_report t2 on t1.jimu_report_id = t2.id
|
|
|
left join sys_reporttype t3 on t1.sys_reportid = t3.sys_reportid and t3.siteid = $siteid$
|
|
|
where t1.systemappid = 163
|
|
|
and (ifnull(t1.siteid, '') = '' or t1.siteid = $siteid$)
|
|
|
+ and ((t1.reporttype = '积木报表' and t2.id is not null)
|
|
|
+ or (t1.reporttype != '积木报表'))
|
|
|
group by t1.sys_reportid, t1.name, t2.name
|