浏览代码

运行状态 范围修改

miaolijing 3 年之前
父节点
当前提交
d4c4a3654c

+ 9 - 2
src/main/java/com/persagy/apm/diagnose/maintenance/service/impl/ProjectDataRecordServiceImpl.java

@@ -737,7 +737,7 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
                         //冷凝温度、冷凝器出口水温 均不为空
                         if (firstDateDataMap.containsKey(date) && null != firstDateDataMap.get(date)
                                 && secondDateDataMap.containsKey(date) && null != secondDateDataMap.get(date)) {
-                            Double divideTemp = DataUtils.divide(firstDateDataMap.get(date), secondDateDataMap.get(date));
+                            Double divideTemp = DataUtils.subtract(firstDateDataMap.get(date), secondDateDataMap.get(date));
                             totalVal = totalVal == null ? divideTemp : DataUtils.plus(totalVal, divideTemp);
                             num++;
                         }
@@ -915,9 +915,16 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
                 String time = dto.getTime();
                 Date getDate = com.persagy.apm.diagnose.utils.DateUtils.str2Date(time, com.persagy.apm.diagnose.utils.DateUtils.SDFSECOND);
                 if (getDate.compareTo(firstDate) >= 0 && getDate.compareTo(twoHourDate) <= 0) {
-                    if (Objects.equals(EnumRunStatusType.Close.getCode(), dto.getData())) {
+                    if (null == dto.getData()){
+                        continue;
+                    }
+                    //TODO 测试 运行状态
+                    if (dto.getData() < runStateDownLimit || dto.getData() > runStateUpLimit) {
                         return false;
                     }
+//                    if (Objects.equals(EnumRunStatusType.Close.getCode(), dto.getData())) {
+//                        return false;
+//                    }
                 }
             }
         } catch (Exception e) {