燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-04-25 d09e34040a6855c99d930d1b57c7254cf545ead8
src/main/java/com/yssh/service/impl/WarningAnalyseServiceImpl.java
@@ -78,7 +78,9 @@
         nowDate = DateUtils.getAPeriodOfTime(nowDate, -1, Calendar.HOUR_OF_DAY);
      }
      List<WarningDetail> list = alarmAnalyseOperation(nowDate);
      list.forEach(s -> {result.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue()));});
      list.forEach(s -> {
         result.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue()));
      });
      return result;
   }
@@ -92,7 +94,9 @@
         nowDate = DateUtils.getAPeriodOfTime(nowDate, -1, Calendar.HOUR_OF_DAY);
      }
      List<WarningDetail> list = warningAnalyseOperation(nowDate);
      list.forEach(s -> {result.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue()));});
      list.forEach(s -> {
         result.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue()));
      });
      return result;
   }
@@ -199,11 +203,15 @@
      List<DictRecord> recordList = dictRecordMapper.selectByTimeDictRecordList(startTime, endTime);
      checkPoints.forEach(c -> {
         List<String> tableNames = new ArrayList<>(); 
         recordList.forEach(r -> {tableNames.add(r.getTableName());});
         recordList.forEach(r -> {
            tableNames.add(r.getTableName());
         });
         List<Double> values = new ArrayList<>(); 
         if (StringUtils.isNotNull(tableNames)) {
            List<SuYuanMonitorData> data = suYuanMapper.getMonitorData(tableNames, c.getId());
            data.forEach(v -> {values.add(v.getValue());});
            data.forEach(v -> {
               values.add(v.getValue());
            });
            result.put(c.getName(), values);
         }
      });
@@ -219,7 +227,9 @@
      List<DictRecord> recordList = dictRecordMapper.selectByTimeDictRecordList(startTime, endTime);
      checkPoints.forEach(c -> {
         List<String> tableNames = new ArrayList<>(); 
         recordList.forEach(r -> {tableNames.add(r.getTableName());});
         recordList.forEach(r -> {
            tableNames.add(r.getTableName());
         });
         Map<String, Object> map = suYuanMapper.getMonthValueDataMax(tableNames, c.getId());
         if (StringUtils.isNotNull(map) && StringUtils.isNotEmpty(map)) {
            String suYuanId = map.get("id").toString();