miaolijing пре 3 година
родитељ
комит
533cc9b7c3

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

@@ -99,13 +99,14 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
 
     @Override
     @Async("asyncComputeMaintenanceDataExecutor")
-    public Future<String> computeMaintenanceData(Date todayDate,ProjectDTO projectDTO, CountDownLatch latch) {
+    public Future<String> computeMaintenanceData(Date todayDate,ProjectDTO projectDTO, CountDownLatch latch)throws Exception {
         long time = System.currentTimeMillis() + (20 * 1000);
         try {
             if (!lockUtil.lock(projectDTO.getProjectId() + "_computeMaintenance", String.valueOf(time))) {
                 // 获取不到锁,略过
                 return new AsyncResult<>("【监测维保数据计算线程】项目:" + projectDTO.getProjectId() + "被占用");
             }
+
             long start = System.currentTimeMillis();
             AsyncResult<String> projectDTOBack = computeProjectMaintenanceData(todayDate, projectDTO);
             if (projectDTOBack != null) {
@@ -1103,7 +1104,7 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
                         Double hVal = TwdTempUtil.getHVal(dto.getTemperature(),dto.getHumidity());
                         //根据允许范围推出Tw值
                         Double Tw = TwdTempUtil.getTw(dto.getTemperature(),hVal,TwdTemp_Limit);
-//                        log.info("温度:"+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);