沙钢智慧能源系统后端代码
潘志宝
2025-01-24 0a176be88c69c732b63b084d55e017270e5ffb8c
shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleOnaOptTask.java
@@ -82,21 +82,20 @@
            }
            schemeMap.clear();
            Map<String, MdkScheduleRespDTO> resultMap = new HashMap<String, MdkScheduleRespDTO>();
            schemeList.forEach(item -> {
                schemeMap.put(item.getCode(), item);
                StScheduleSchemeDTO scheme = schemeList.get(0);
            schemeList.forEach(scheme -> {
                schemeMap.put(scheme.getCode(), scheme);
                MdkScheduleReqDTO dto = new MdkScheduleReqDTO();
                dto.setScheduleTime(scheduleTime);
                dto.setScheduleCode(scheme.getCode());
                MdkScheduleRespDTO mdkScheduleRespDTO = mdkApi.doSchedule(dto);
                resultMap.put(item.getCode(), mdkScheduleRespDTO);
                resultMap.put(scheme.getCode(), mdkScheduleRespDTO);
            });
            if (CollectionUtils.isEmpty(resultMap)) {
                logger.info("resultMap为空");
                return;
            }
            for (Map.Entry<String, MdkScheduleRespDTO> entry : resultMap.entrySet()) {
                if (CommonConstant.MDK_STATUS_100.equals(entry.getValue().getStatusCode())) {
                if (!CommonConstant.MDK_STATUS_100.equals(entry.getValue().getStatusCode())) {
                    logger.info("调度结果异常,STATUS=" + entry.getValue().getStatusCode());
                    continue;
                }
@@ -116,7 +115,7 @@
                    String runAdvice = entry.getValue().getResult().get("RunAdvice").toString();
                    saveScheduleSuggest("宏昌建议调整量", runAdvice, scheduleObj, scheduleTime);
                } else if (entry.getKey().equals(CODE01)) {
                    String scheduleObj = schemeMap.get(CODE05).getScheduleObj();
                    String scheduleObj = schemeMap.get(CODE01).getScheduleObj();
                    String advice = entry.getValue().getResult().get("advice").toString();
                    saveScheduleSuggest("氮气预警", advice, scheduleObj, scheduleTime);
                }