Explorar el Código

数据中心-领导页面 四长统计

hanfucheng hace 1 año
padre
commit
9382f193c2

+ 3 - 2
src/main/resources/mapper/commandcenter/CommandCentreMapper.xml

@@ -17,7 +17,7 @@
         UNION ALL
         SELECT COUNT(DISTINCT a.user_id) userId FROM centerdata_t_forest_linleader a
         LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
-        where a.lin_job != 'forest_lin_jy'
+        where a.lin_job in ('forest_lin_zonglinzhang','forest_lin_fuzonglinzhang','forest_lin_linzhang','forest_lin_fulinzhang','forest_lin_wgz')
             <if test="deptId != null and deptId != ''">
                 AND FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )
             </if>
@@ -91,7 +91,8 @@
                 UNION
                 SELECT DISTINCT a.user_id userId,'1' type FROM centerdata_t_forest_linleader a
                 LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
-                WHERE a.lin_job != 'forest_lin_jy' AND FIND_IN_SET(#{deptId}, CONCAT(d.ancestors,',',d.dept_id))
+                WHERE a.lin_job in ('forest_lin_zonglinzhang','forest_lin_fuzonglinzhang','forest_lin_linzhang','forest_lin_fulinzhang','forest_lin_wgz')
+                AND FIND_IN_SET(#{deptId}, CONCAT(d.ancestors,',',d.dept_id))
             ) a GROUP BY userId
         ) t GROUP BY name
     </select>