Ver código fonte

大屏填报的列表sql更新

ZHOUTD 1 ano atrás
pai
commit
198181e641

+ 6 - 1
xzl-system/src/main/resources/mapper/system/RptDataConfigMapper.xml

@@ -43,7 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectDistinctRptDataConfigList" parameterType="RptDataConfig" resultMap="RptDataConfigResult">
-        select distinct report_id, report_name from rpt_data_config order by report_data_num asc
+        select a.report_id,report_name
+        from (
+                 SELECT DISTINCT report_id,report_name FROM `rpt_data_config`) a
+                 join ( select report_id,count(1) as num from rpt_data_config where report_data_source='0' GROUP BY report_id) b on a.report_id=b.report_id
+        where num>0
+        order by report_data_num asc
     </select>
 
     <select id="selectRptDataConfigById" parameterType="Long" resultMap="RptDataConfigResult">