沙钢智慧能源系统后端代码
潘志宝
2 天以前 6cce675bb26ab0ffbdc19fe7f48cb3fcbd9890e3
压缩空气优化调度
已修改2个文件
25 ■■■■■ 文件已修改
shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleAirDispatchTask.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleOnaOptTask.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleAirDispatchTask.java
@@ -67,14 +67,15 @@
            dto.setScheduleTime(scheduleTime);
            dto.setScheduleCode(scheme.getCode());
            MdkScheduleRespDTO mdkScheduleRespDTO = mdkApi.doSchedule(dto);
            if (CommonConstant.MDK_STATUS_100.equals(mdkScheduleRespDTO.getStatusCode())) {
            if (!CommonConstant.MDK_STATUS_100.equals(mdkScheduleRespDTO.getStatusCode())) {
                logger.info("调度结果异常,STATUS=" + mdkScheduleRespDTO.getStatusCode());
                return;
            }
            // 保存预警信息
            String pressureLWarning = mdkScheduleRespDTO.getResult().get("pressureLWarning").toString();
            if (StringUtils.isNotBlank(pressureLWarning)) {
            if (mdkScheduleRespDTO.getResult().get("pressureLWarning") != null &&
                    StringUtils.isNotEmpty(mdkScheduleRespDTO.getResult().get("pressureLWarning").toString())) {
                String pressureLWarning = mdkScheduleRespDTO.getResult().get("pressureLWarning").toString();
                AlarmMessageRespDTO alarm = new AlarmMessageRespDTO();
                alarm.setTitle("压力低于下限预警");
                alarm.setContent(pressureLWarning);
@@ -84,8 +85,10 @@
                mcsApi.createAlarmMessage(alarm);
            }
            String pressureHWarning = mdkScheduleRespDTO.getResult().get("pressureHWarning").toString();
            if (StringUtils.isNotBlank(pressureHWarning)) {
            if (mdkScheduleRespDTO.getResult().get("pressureHWarning") != null &&
                    StringUtils.isNotEmpty(mdkScheduleRespDTO.getResult().get("pressureHWarning").toString())) {
                String pressureHWarning = mdkScheduleRespDTO.getResult().get("pressureHWarning").toString();
                AlarmMessageRespDTO alarm = new AlarmMessageRespDTO();
                alarm.setTitle("压力高于上限预警");
                alarm.setContent(pressureHWarning);
@@ -96,8 +99,9 @@
            }
            // 保存调度建议
            String dispatchStart = mdkScheduleRespDTO.getResult().get("dispatchStart").toString();
            if (StringUtils.isNotBlank(pressureHWarning)) {
            if (mdkScheduleRespDTO.getResult().get("dispatchStart") != null &&
                    StringUtils.isNotEmpty(mdkScheduleRespDTO.getResult().get("dispatchStart").toString())) {
                String dispatchStart = mdkScheduleRespDTO.getResult().get("dispatchStart").toString();
                ScheduleSuggestRespDTO suggest = new ScheduleSuggestRespDTO();
                suggest.setTitle("空压机启动调度建议");
                suggest.setContent(dispatchStart);
@@ -107,8 +111,9 @@
                mcsApi.createScheduleSuggest(suggest);
            }
            String dispatchClose = mdkScheduleRespDTO.getResult().get("dispatchClose").toString();
            if (StringUtils.isNotBlank(dispatchClose)) {
            if (mdkScheduleRespDTO.getResult().get("dispatchClose") != null &&
                    StringUtils.isNotEmpty(mdkScheduleRespDTO.getResult().get("dispatchClose").toString())) {
                String dispatchClose = mdkScheduleRespDTO.getResult().get("dispatchClose").toString();
                ScheduleSuggestRespDTO suggest = new ScheduleSuggestRespDTO();
                suggest.setTitle("空压机关停调度建议");
                suggest.setContent(dispatchClose);
shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/RunScheduleOnaOptTask.java
@@ -96,7 +96,7 @@
                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;
                }