package com.iailab.module.ansteel.api.controller; import com.iailab.framework.common.pojo.CommonResult; import com.iailab.module.ansteel.util.ApiSecurityUtils; 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.PreDataItemChartReqVO; import com.iailab.module.model.api.mcs.dto.PreDataItemChartRespVO; import com.iailab.module.model.api.mcs.dto.PreDataSingleChartReqVO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; import static com.iailab.framework.common.pojo.CommonResult.success; /** * @author: lirm * @date: 2025/03/17 **/ @Tag(name = "发电厂机组运行情况") @RestController @RequestMapping("/ansteel/api/mcs") public class McsController { @Autowired private AnSteelApi anSteelApi; @Resource private ApiSecurityUtils apiSecurityUtils; @GetMapping("/power-run-state/list") public CommonResult> list(@RequestParam Map params) { List list = anSteelApi.getPowerRunState(); return success(list); } @PostMapping("/predict-data/charts") @Operation(summary = "预测数据图表") public CommonResult getPreDataChart(HttpServletResponse response, HttpServletRequest request, @RequestBody PreDataSingleChartReqVO reqVO) throws Exception { apiSecurityUtils.validate(request); PreDataChartRespVO respVO = anSteelApi.getPreDataChart(reqVO); return CommonResult.success(respVO); } }