From 7fe73fc1cc71b6dc85ec7e4fdaed01b995934284 Mon Sep 17 00:00:00 2001 From: liriming <1343021927@qq.com> Date: 星期二, 18 三月 2025 16:26:30 +0800 Subject: [PATCH] 预测数据接口 --- ansteel-biz/src/main/java/com/iailab/module/ansteel/api/controller/McsController.java | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ansteel-biz/src/main/java/com/iailab/module/ansteel/api/controller/McsController.java b/ansteel-biz/src/main/java/com/iailab/module/ansteel/api/controller/McsController.java index f281cf1..650a9f5 100644 --- a/ansteel-biz/src/main/java/com/iailab/module/ansteel/api/controller/McsController.java +++ b/ansteel-biz/src/main/java/com/iailab/module/ansteel/api/controller/McsController.java @@ -1,15 +1,21 @@ package com.iailab.module.ansteel.api.controller; import com.iailab.framework.common.pojo.CommonResult; -import com.iailab.module.model.api.mcs.AnSteelApi; -import com.iailab.module.sms.api.dto.PowerRunStateDTO; +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.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +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; @@ -21,16 +27,27 @@ **/ @Tag(name = "发电厂机组运行情况") @RestController -@RequestMapping("/mcs/power-run-state") +@RequestMapping("/ansteel/api/mcs") public class McsController { @Autowired private AnSteelApi anSteelApi; - @GetMapping("list") + @Resource + private ApiSecurityUtils apiSecurityUtils; + + @GetMapping("/power-run-state/list") public CommonResult<List<PowerRunStateDTO>> list(@RequestParam Map<String, Object> params) { List<PowerRunStateDTO> list = anSteelApi.getPowerRunState(); return success(list); } + @PostMapping("/predict-data/charts") + @Operation(summary = "预测数据图表") + public CommonResult<PreDataChartRespVO> getPreDataChart(HttpServletResponse response, HttpServletRequest request, @RequestBody PreDataSingleChartReqVO reqVO) throws Exception { + apiSecurityUtils.validate(request); + PreDataChartRespVO respVO = anSteelApi.getPreDataChart(reqVO); + return CommonResult.success(respVO); + } + } \ No newline at end of file -- Gitblit v1.9.3