瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

zhaowenrui 1 年之前
父節點
當前提交
7753902f80

+ 19 - 8
src/main/java/com/sooka/sponest/data/index/service/impl/IndexViewServiceImpl.java

@@ -237,19 +237,30 @@ public class IndexViewServiceImpl extends BaseServiceImpl implements IndexViewSe
         Map<String, Long> message = this.getMessage();
         // 一网通办
         Map<String, Long> oneTongData = this.getOneTongData();
-        // 对各项数据进行合并
+        // 合并各项数据
+        Map<String, Long> systemInfoReportMap = new LinkedHashMap<>();
         // 合并一网通办
-        Map<String, Long> systemInfoReportMap = new LinkedHashMap<>(oneTongData);
+        if (oneTongData != null) {
+            systemInfoReportMap.putAll(oneTongData);
+        }
         // 合并基础数据
-        for (int i = 0; i < basicDataList.size(); i++) {
-            systemInfoReportMap.put("basicDataSubclass" + i, basicDataList.get(i).getSubclass());
-            systemInfoReportMap.put("basicDataCount" + i, basicDataList.get(i).getCount());
+        if (basicDataList != null) {
+            for (int i = 0; i < basicDataList.size(); i++) {
+                systemInfoReportMap.put("basicDataSubclass" + i, basicDataList.get(i).getSubclass());
+                systemInfoReportMap.put("basicDataCount" + i, basicDataList.get(i).getCount());
+            }
         }
         // 合并四长人数、巡护距离
-        systemInfoReportMap.putAll(siZhang);
-        systemInfoReportMap.putAll(fourLengthPatrolDistance);
+        if (siZhang != null) {
+            systemInfoReportMap.putAll(siZhang);
+        }
+        if (fourLengthPatrolDistance != null) {
+            systemInfoReportMap.putAll(fourLengthPatrolDistance);
+        }
         // 合并重点监控领域、各类资源数据
-        systemInfoReportMap.putAll(message);
+        if (message != null) {
+            systemInfoReportMap.putAll(message);
+        }
         return systemInfoReportMap;
     }
 

+ 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>