Explorar el Código

添加删除标识

朴弘宇 hace 1 año
padre
commit
fdf24f66ca

+ 3 - 0
src/main/resources/mapper/digitalfirecontrol/FireControlBigDataMapper.xml

@@ -157,6 +157,7 @@ FROM (
     FROM centerdata_t_forest_watercrane a
     FROM centerdata_t_forest_watercrane a
     LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
     LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
     WHERE 1 = 1 ${params.dataScope}
     WHERE 1 = 1 ${params.dataScope}
+    AND del_flag = 0
     GROUP BY a.dept_id
     GROUP BY a.dept_id
 
 
     UNION ALL
     UNION ALL
@@ -165,6 +166,7 @@ FROM (
     FROM centerdata_t_forest_waterintake a
     FROM centerdata_t_forest_waterintake a
     LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
     LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
     WHERE 1 = 1 ${params.dataScope}
     WHERE 1 = 1 ${params.dataScope}
+    AND del_flag = 0
     GROUP BY a.dept_id
     GROUP BY a.dept_id
 
 
     UNION ALL
     UNION ALL
@@ -173,6 +175,7 @@ FROM (
     FROM centerdata_t_forest_firehydrant a
     FROM centerdata_t_forest_firehydrant a
     LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
     LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
     WHERE 1 = 1 ${params.dataScope}
     WHERE 1 = 1 ${params.dataScope}
+    AND del_flag = 0
     GROUP BY a.dept_id
     GROUP BY a.dept_id
 ) a GROUP BY a.ancestors,a.deptId
 ) a GROUP BY a.ancestors,a.deptId
     </select>
     </select>