| | |
| | | import com.iailab.module.ansteel.api.vo.PowerTransferRespVO; |
| | | import com.iailab.module.ansteel.common.enums.TransferTypeEnum; |
| | | import com.iailab.module.ansteel.common.utils.DecimalUtil; |
| | | import com.iailab.module.model.api.mcs.McsApi; |
| | | import com.iailab.module.model.api.mcs.dto.PredictTnValueReqVO; |
| | | import com.iailab.module.model.api.mdk.MdkApi; |
| | | import com.iailab.module.model.api.mdk.dto.MdkPredictDataDTO; |
| | | import com.iailab.module.model.api.mdk.dto.MdkScheduleReqDTO; |
| | | import com.iailab.module.model.api.mdk.dto.MdkScheduleRespDTO; |
| | | import com.iailab.module.model.enums.CommonConstant; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | import static com.iailab.framework.common.pojo.CommonResult.success; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | |
| | | |
| | | @Autowired |
| | | private MdkApi mdkApi; |
| | | @Autowired |
| | | private McsApi mcsApi; |
| | | |
| | | /** |
| | | * 负荷移植-负荷移植建议与方案 |
| | |
| | | @Operation(summary = "负荷移植-负荷移植建议与方案") |
| | | public CommonResult<PowerTransferRespVO> scheduleEleLoad(@RequestBody PowerTransferReqVO reqVO) { |
| | | log.info("异常工况下的负荷移植"); |
| | | reqVO.setLimit(new BigDecimal(170000)); |
| | | if (reqVO.getTingjiZhong() == null) { |
| | | reqVO.setTingjiZhong(0); |
| | | } |
| | | if (reqVO.getTingjiHou()== null) { |
| | | reqVO.setTingjiHou(0); |
| | | } |
| | | if (reqVO.getTingjiRezha()== null) { |
| | | reqVO.setTingjiRezha(0); |
| | | } |
| | | |
| | | PowerTransferRespVO result = new PowerTransferRespVO(); |
| | | List<PowerTransferDetRespVO> adviceList = new ArrayList<>(); |
| | | try { |
| | |
| | | reqVO.getMins()}; |
| | | dynamicSettings.put("xiufeng_order", JSONArray.toJSONString(xiufengOrder)); |
| | | dynamicSettings.put("jiaohua_BFG_down", reqVO.getLimit().toString()); |
| | | Integer[] tingjiOrder = {reqVO.getTingjiZhong(), reqVO.getTingjiHou(), reqVO.getTingjiRezha()}; |
| | | dynamicSettings.put("tingji_order", JSONArray.toJSONString(tingjiOrder)); |
| | | dto.setDynamicSettings(dynamicSettings); |
| | | break; |
| | | case JX: |
| | |
| | | result.setCogGapAmount(data.get("cog_gap") == null ? 0 : DecimalUtil.toBigDecimal(data.get("cog_gap"), 1).intValue());//焦化减高炉煤气-数量 |
| | | result.setBfgShengyue(DecimalUtil.toBigDecimal(data.get("BFG_shengyu"))); |
| | | |
| | | if (data.get("zhongabnAdvice") != null) { |
| | | adviceList.add(DecimalUtil.toPowerTransferDetRespVO("中板工序", data.get("zhongabnAdvice"))); |
| | | if (data.get("zhongbanAdvice") != null) { |
| | | adviceList.add(DecimalUtil.toPowerTransferDetRespVO("中板工序", data.get("zhongbanAdvice"))); |
| | | } |
| | | if (data.get("houbanAdvice") != null) { |
| | | adviceList.add(DecimalUtil.toPowerTransferDetRespVO("厚板工序", data.get("houbanAdvice"))); |
| | |
| | | log.info("result=" + JSONObject.toJSONString(result)); |
| | | return CommonResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/predict-data/tn-value") |
| | | @Operation(summary = "获取T+N预测数据") |
| | | public CommonResult<List<MdkPredictDataDTO>> getPredictTnValue(PredictTnValueReqVO reqVO) { |
| | | List<MdkPredictDataDTO> list = mcsApi.getPredictTnValue(reqVO); |
| | | return success(list); |
| | | } |
| | | } |