package com.iailab.module.ansteel.api.controller; import com.iailab.framework.common.pojo.CommonResult; import com.iailab.module.api.mcs.AnSteelApi; import com.iailab.module.api.mcs.dto.PowerRunStateDTO; import com.iailab.module.api.mcs.dto.PreDataChartRespVO; import com.iailab.module.model.api.mcs.dto.PreDataSingleChartReqVO; import io.swagger.v3.oas.annotations.Operation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; import static com.iailab.framework.common.pojo.CommonResult.success; /** * @author: lirm * @date: 2025/03/17 **/ @RestController @RequestMapping("/ansteel/api/mcs") public class McsController { @Autowired private AnSteelApi anSteelApi; @GetMapping("/power-run-state/list") @Operation(summary = "å‘电厂机组è¿è¡Œæƒ…况") public CommonResult<List<PowerRunStateDTO>> getPowerRunState(@RequestParam Map<String, Object> params) { List<PowerRunStateDTO> list = anSteelApi.getPowerRunState(); return success(list); } @PostMapping("/predict-data/charts") @Operation(summary = "预测数æ®å›¾è¡¨") public CommonResult<PreDataChartRespVO> getPreDataChart(@RequestBody PreDataSingleChartReqVO reqVO) { PreDataChartRespVO respVO = anSteelApi.getPreDataChart(reqVO); return CommonResult.success(respVO); } }