| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | |