From df0d1bb2024bf78edbe4588da10ac98d519862a3 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Fri, 27 Sep 2024 14:32:46 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=8E=BB=E9=99=A4=E6=97=A5=E5=BF=97=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scheduled/DutyNoticeScheduledTask.java | 1 - .../service/alarm/impl/AlarmServiceImpl.java | 2 - .../home/impl/ObtainGenerationServiceImpl.java | 6 --- .../operation/home/impl/RealTargetServiceImpl.java | 43 ---------------------- .../operation/home/impl/ShowServiceImpl.java | 1 - .../operation/monitor/impl/MonitorServiceImpl.java | 1 - .../operation/plate/impl/DataServiceImpl.java | 4 -- .../service/impl/RealMonitorServiceImpl.java | 4 -- 8 files changed, 62 deletions(-) diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/DutyNoticeScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/DutyNoticeScheduledTask.java index ffd7788..a83cab4 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/DutyNoticeScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/DutyNoticeScheduledTask.java @@ -109,7 +109,6 @@ public class DutyNoticeScheduledTask { List userList = userListByRoleAlias.stream().map(s -> s.getId().toString()).collect(Collectors.toList()); String userIds = String.join(",", userList); if (StringUtils.isBlank(userIds)) { - log.error("推送的消息不能为空哦,{}", userIds); throw new ServiceException("推送的消息不能为空"); } message.setCreateUser(Long.valueOf(userList.get(0))); diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java index 12db9f1..fd8b449 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java @@ -128,7 +128,6 @@ public class AlarmServiceImpl implements AlarmService { } } }); - log.error("start_stop_alarm : {}",refresh); redisTemplate.opsForValue().set(start_stop_cache_final,refresh); } @@ -279,7 +278,6 @@ public class AlarmServiceImpl implements AlarmService { alarm.setRealId(entity.getRealId()); alarm.setContext(entity.getSoeExplain()); alarm.setState(entity.getStatus()); - log.error("send_interruption_msg : {}",JsonUtil.toJson(alarm)); mqttSender.sendToMqtt(InterruptionConstants.HZ3000_TOPIC_PREFIX + entity.getStationId(), JsonUtil.toJson(alarm)); }); } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ObtainGenerationServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ObtainGenerationServiceImpl.java index 0d65df5..c6e57b7 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ObtainGenerationServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ObtainGenerationServiceImpl.java @@ -206,10 +206,8 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { }); }); countDownLatch.countDown(); - log.error("save_generation_execute_complete: {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList())); }catch (Exception e){ countDownLatch.countDown(); - log.error("save_generation_execute_complete_error : {}" ,e.getMessage()); } }); } @@ -356,10 +354,8 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { }); }); countDownLatch.countDown(); - log.error("save_generation_execute_complete: {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList())); }catch (Exception e){ countDownLatch.countDown(); - log.error("save_generation_execute_complete_error : {}" ,e.getMessage()); } }); } @@ -450,10 +446,8 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { threeGenerateService.saveBatch(this.saveFillGenerate(station,start,end)); }); countDownLatch.countDown(); - log.error("save_generation_execute_complete: {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList())); }catch (Exception e){ countDownLatch.countDown(); - log.error("save_generation_execute_complete_error : {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList())); } }); } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java index bea786c..1f03f7d 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java @@ -39,7 +39,6 @@ import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import com.hnac.hzinfo.sdk.core.response.HzPage; import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.v5.device.DeviceDataClient; -import com.xxl.job.core.log.XxlJobLogger; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; @@ -698,21 +697,17 @@ public class RealTargetServiceImpl implements RealTargetService { list.add(waterLevelVo); } countDownLatch.countDown(); - XxlJobLogger.log("load_water_level : 子线程执行完成 {}", item.getInstanceCode()); } catch (Exception exception) { countDownLatch.countDown(); - XxlJobLogger.log("load_water_level_error : 子线程执行失败 {}", exception.getMessage()); } }); } try { - XxlJobLogger.log("load_water_level :等待线程执行"); countDownLatch.await(); } catch (InterruptedException e) { e.printStackTrace(); Thread.currentThread().interrupt(); } - XxlJobLogger.log("load_water_level :线程执行结束"); redisTemplate.opsForValue().set(loadwater_level_key,list); } @@ -1444,7 +1439,6 @@ public class RealTargetServiceImpl implements RealTargetService { powerMap.put(station.getCode(),generateMap); }); countDownLatch.countDown(); - log.error("pool_item_execute_complete: {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList())); }catch (Exception e){ countDownLatch.countDown(); } @@ -1461,43 +1455,6 @@ public class RealTargetServiceImpl implements RealTargetService { } - private Map lastReduceFirst(StationEntity station, List devices, String start, String end) { - List datas = new ArrayList<>(); - // 设备采集发电量 - if(CollectionUtil.isNotEmpty(devices)){ - devices.forEach(device->{ - List> records = dataService.lastFirstBySignage(start,end,7,5,device.getEmCode(),HomePageConstant.HYDROPOWER_GENERATE_POWER); - if(CollectionUtil.isEmpty(records)){ - return; - } - datas.addAll(records.stream().map(record -> { - PowerMonthVo generate = new PowerMonthVo(); - Date time; - if(record.get("ts").contains(".0")){ - time = DateUtil.parse(record.get("ts"), "yyyy-MM-dd HH:mm:ss.s"); - }else{ - time = DateUtil.parse(record.get("ts") + ".0", "yyyy-MM-dd HH:mm:ss.s"); - } - generate.setStrMonth(DateUtil.format(time,DateUtil.PATTERN_DATE)); - String val = record.get(HomePageConstant.HYDROPOWER_GENERATE_POWER); - if(StringUtil.isEmpty(val)){ - generate.setPower(0f); - }else{ - generate.setPower(Float.parseFloat(String.valueOf(Double.parseDouble(val) * device.getRideCount()))); - } - return generate; - }).collect(Collectors.toList())); - }); - } - // 补充填报数据 - datas.addAll(this.generateFill(station,start,end)); - if(CollectionUtil.isEmpty(datas)){ - return null; - } - return datas.stream().collect(Collectors.toMap(PowerMonthVo::getStrMonth, PowerMonthVo::getPower, Float::sum)); - - } - /** * 近年发电量数据 * diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java index 67b4407..0d5f494 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java @@ -627,7 +627,6 @@ public class ShowServiceImpl implements ShowService { target.setTaget_three(0.0); target.setTaget_four(0.0); target.setCharge(0); - log.error("charge_target_exception: {} ", e.getMessage()); } return target; } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java index 919ae93..3dc8b79 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java @@ -211,7 +211,6 @@ public class MonitorServiceImpl implements MonitorService { if(CollectionUtil.isEmpty(realIds)){ return; } - log.error("real_time_data: {},{}",stationReal.getStation(),realIds); List objects = redisClient.getBatchRealDataByRealId(stationReal.getStation(),realIds); for(int i = 0; i < realIds.size() ;i++){ if(ObjectUtil.isNotEmpty(objects.get(i))){ diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java index 4ec5391..9b8e962 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java @@ -109,12 +109,10 @@ public class DataServiceImpl implements DataService { analyzeDataConditionPO.setEndTime(LocalDateTime.parse(DateUtil.format(new Date(), endTime), DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME))); signboardConditions.add(analyzeDataConditionPO); po.setSignboardConditions(signboardConditions); - log.error("period_target_data_request {}",po); R> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po); if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { return new ArrayList<>(); } - log.error("period_target_data_resp {}",result); return result.getData().get(0).getList(); } @@ -147,12 +145,10 @@ public class DataServiceImpl implements DataService { signboardConditions.add(analyzeDataConditionPO); }); po.setSignboardConditions(signboardConditions); - log.error("period_targets_data_request {}",po); R> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po); if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { return new ArrayList<>(); } - log.error("period_targets_data_resp {}",result); return result.getData(); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java index 061b7e7..7ee45b1 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java @@ -225,7 +225,6 @@ public class RealMonitorServiceImpl implements IRealMonitorService { if(CollectionUtil.isEmpty(realStationVoList)){ return null; } - log.info("步骤1获取所有监控缓存数据 耗时 : {}",System.currentTimeMillis() - beginTime); beginTime = System.currentTimeMillis(); // 集中监控响应站点数据 List validList = realStationVoList.stream().filter(o -> message.getDeptIds().contains(o.getStationDeptId())).collect(Collectors.toList()); @@ -240,11 +239,9 @@ public class RealMonitorServiceImpl implements IRealMonitorService { Map nowWeather = this.weatherService.getNowWeather(codes); // 七日内天气 Map weekWeather = this.weatherService.getWeekWeather(codes); - log.info("步骤2获取天气 耗时 : {}",System.currentTimeMillis() - beginTime); beginTime = System.currentTimeMillis(); // 站点水位数据 List levelList = (List) redisTemplate.opsForValue().get(loadwater_level_key); - log.info("步骤3获取水位数据 耗时 : {}",System.currentTimeMillis() - beginTime); beginTime = System.currentTimeMillis(); // 遍历站点 validList.forEach(item->{ @@ -253,7 +250,6 @@ public class RealMonitorServiceImpl implements IRealMonitorService { // 前池水位 this.waterLevel(levelList,item); }); - log.info("步骤4站点数据处理 耗时 : {}",System.currentTimeMillis() - beginTime); return new TextMessage(JSONObject.toJSONString(validList.stream().peek(o->{ if(ObjectUtil.isEmpty(o.getSort())){ o.setSort(999);