| | |
| | | log.info("已全部预测完成,清空finishModuleMap"); |
| | | ModelPredictFinishConsumer.finishModuleMap.clear(); |
| | | |
| | | if (!ModelPredictFinishConsumer.finishAlarmMap.contains(predictTime.getTime())) { |
| | | log.info("已全部预测完成,预警消息为空"); |
| | | return; |
| | | } |
| | | ModelPredictFinishConsumer.finishAlarmMap.clear(); |
| | | |
| | | log.info("查找需要执行的调度方案"); |
| | | List<StScheduleSchemeDTO> scheduleSchemeList = mcsApi.listScheduleScheme(ScheduleTriggerMethodEnum.EVENT.getCode(), routingKey); |
| | | if (CollectionUtils.isEmpty(scheduleSchemeList)) { |
| | |
| | | log.info(title + "content为空"); |
| | | return; |
| | | } |
| | | if (adjustObj == null || StringUtils.isBlank(adjustObj.toString()) || "0".equals(adjustObj.toString())) { |
| | | if (!title.contains("预警") && (adjustObj == null || StringUtils.isBlank(adjustObj.toString()) || "0".equals(adjustObj.toString()))) { |
| | | log.info(title + "调整值为空,不产生建议"); |
| | | return; |
| | | } |
| | | BigDecimal adjustValue = new BigDecimal(adjustObj.toString()); |
| | | if (gasAdjustMode.containsKey(scheduleObj) && gasAdjustMode.get(scheduleObj).equals(adjustValue.compareTo(BigDecimal.ZERO)) && |
| | | gasLastSugTime.containsKey(scheduleObj) && (scheduleTime.getTime() - gasLastSugTime.get(scheduleObj).getTime() <= Integer.valueOf(adjustRate).longValue() * 60 * 1000)) { |
| | | log.info("调整建议在有效期内"); |
| | | log.info(title + "调整建议在有效期内"); |
| | | return; |
| | | } |
| | | gasAdjustMode.put(scheduleObj, adjustValue.compareTo(BigDecimal.ZERO)); |