王辉 2 өдөр өмнө
parent
commit
cb22f3dc5d

+ 4 - 4
src/main/java/cn/chinaunicom/omniFlowNetCompute/service/impl/DashboardServiceImpl.java

@@ -170,8 +170,8 @@ public class DashboardServiceImpl implements DashboardService {
         threshold.setUnconfiguredCount(5 - thresholdConfigured.size());
 
         List<String> contentHasData = dashboardMapper.getContentHasDataSystems();
-        threshold.setNoDataCount(threshold.getConfiguredCount() - contentHasData.size());
-        threshold.setTotalSystems(5-threshold.getUnconfiguredCount()-threshold.getNoDataCount());
+        threshold.setNoDataCount(contentHasData.size());
+        threshold.setConfiguredCount(5-threshold.getUnconfiguredCount()-threshold.getNoDataCount());
         vo.setThreshold(threshold);
 
         // 内容类
@@ -180,8 +180,8 @@ public class DashboardServiceImpl implements DashboardService {
         content.setConfiguredCount(contentConfigured.size());
         content.setUnconfiguredCount(5 - contentConfigured.size());
         List<String> thresholdHasData = dashboardMapper.getThresholdHasDataSystems();
-        content.setNoDataCount(content.getConfiguredCount() - thresholdHasData.size());
-        content.setTotalSystems(5-content.getUnconfiguredCount()-content.getNoDataCount());
+        content.setNoDataCount(thresholdHasData.size());
+        content.setConfiguredCount(5-content.getUnconfiguredCount()-content.getNoDataCount());
         vo.setContent(content);
         return vo;
     }

+ 8 - 1
src/main/resources/mapper/omni/DashboardMapper.xml

@@ -68,7 +68,14 @@
               
               SELECT alarm_status
               FROM cus_task_exception_monitor
-              WHERE DATE_FORMAT(trigger_time, '%Y-%m') = #{month}) t
+              WHERE DATE_FORMAT(trigger_time, '%Y-%m') = #{month}
+              
+              UNION ALL
+              
+              SELECT alarm_status
+              FROM sec_data_undelivered_monitor
+              WHERE DATE_FORMAT(trigger_time, '%Y-%m') = #{month}
+              ) t
     </select>