沙钢智慧能源系统后端代码
dengzedong
2025-01-24 e2212f87aa207448a171b3b8e177f6fe3b804236
功率因数调度 保存调度建议 判空
已修改1个文件
19 ■■■■■ 文件已修改
shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelElecPredictFinishConsumer.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelElecPredictFinishConsumer.java
@@ -10,6 +10,7 @@
import com.iailab.module.shasteel.mq.common.constant.CommonConstant;
import com.iailab.module.shasteel.mq.config.QueuePredictFinishConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
@@ -71,14 +72,16 @@
            if (elecScheduleCodes.contains(stScheduleSchemeDTO.getCode())) {
                Map<String, Object> result = mdkScheduleRespDTO.getResult();
                if (result.containsKey(adviceKey)) {
                    String advice = result.get(adviceKey).toString();
                    ScheduleSuggestRespDTO suggest = new ScheduleSuggestRespDTO();
                    suggest.setTitle("电力调度建议");
                    suggest.setContent(advice);
                    suggest.setScheduleObj(stScheduleSchemeDTO.getScheduleObj());
                    suggest.setScheduleTime(scheduleTime);
                    suggest.setSort(0);
                    mcsApi.createScheduleSuggest(suggest);
                    String advice = result.get(adviceKey).toString().trim();
                    if (StringUtils.isNotBlank(advice)) {
                        ScheduleSuggestRespDTO suggest = new ScheduleSuggestRespDTO();
                        suggest.setTitle("电力调度建议");
                        suggest.setContent(advice);
                        suggest.setScheduleObj(stScheduleSchemeDTO.getScheduleObj());
                        suggest.setScheduleTime(scheduleTime);
                        suggest.setSort(0);
                        mcsApi.createScheduleSuggest(suggest);
                    }
                }
            }