|
@@ -1,5 +1,6 @@
|
|
|
package com.persagy.apm.diagnose.maintenance.service.impl;
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -134,8 +135,10 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
|
|
|
return new AsyncResult<>("【监测维保数据推送线程】:项目:" + projectId + "被占用");
|
|
|
}
|
|
|
|
|
|
+ getConfigItemSendTimeDTO("Pj1101060001","Eq11010600010b63c95c53e342c193d280357f491d9e_Eqdx002");
|
|
|
+
|
|
|
long start = System.currentTimeMillis();
|
|
|
- sendProjectMaintenanceData(todayDate, projectId);
|
|
|
+// sendProjectMaintenanceData(todayDate, projectId);
|
|
|
long end = System.currentTimeMillis();
|
|
|
return new AsyncResult<>("【监测维保数据推送线程】推送项目维保数据用时:" + projectId + ";" + (end - start));
|
|
|
} finally {
|
|
@@ -371,8 +374,11 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
|
|
|
}
|
|
|
|
|
|
private ConfigItemDataSendTimeDTO getConfigItemSendTimeDTO(String projectId, String objIdAndAlarmItemCode) throws Exception {
|
|
|
- ConfigItemDataSendTimeDTO sendTimeDTO = (ConfigItemDataSendTimeDTO) redisUtil.get(getRedisSendDataKey(projectId, objIdAndAlarmItemCode));
|
|
|
- if (sendTimeDTO == null) {
|
|
|
+ ConfigItemDataSendTimeDTO sendTimeDTO = null;
|
|
|
+ Object obj = redisUtil.get(getRedisSendDataKey(projectId,objIdAndAlarmItemCode));
|
|
|
+ if (null != obj){
|
|
|
+ sendTimeDTO = JSONUtil.toBean(JSON.toJSONString(obj), ConfigItemDataSendTimeDTO.class);
|
|
|
+ }else{
|
|
|
sendTimeDTO = ConfigItemDataSendTimeDTO.builder().lastSendTime(getDefultStartTime()).build();
|
|
|
}
|
|
|
return sendTimeDTO;
|
|
@@ -1105,7 +1111,7 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
|
|
|
Double hVal = getHVal(dto.getTemperature(), dto.getHumidity());
|
|
|
//根据允许范围推出Tw值
|
|
|
Double Tw = getTw(dto.getTemperature(), hVal, TwdTemp_Limit);
|
|
|
- log.info("项目编号为:" + projectDTO.getProjectId() + "日期为:" + dto.getHourTime() + "温度:" + dto.getTemperature() + "湿度:" + dto.getHumidity() + "湿球温度:" + Tw);
|
|
|
+// log.info("项目编号为:" + projectDTO.getProjectId() + "日期为:" + dto.getHourTime() + "温度:" + dto.getTemperature() + "湿度:" + dto.getHumidity() + "湿球温度:" + Tw);
|
|
|
//小时时间
|
|
|
Date hour = dto.getHourTime();
|
|
|
Date nextHour = com.persagy.apm.diagnose.utils.DateUtils.addHours(hour, 1);
|