From 328ef4264c7be7b57f24d7dd1f040e9f681b27b5 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 18 十一月 2024 13:39:40 +0800 Subject: [PATCH] 预测数据图表 --- iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataViewRespDTO.java | 4 ++-- iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataSingleChartReqVO.java | 25 +++++++++++++++++++++++++ iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataItemChartRespVO.java | 5 ++--- iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/McsApi.java | 4 ++++ iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java | 10 ++++++++++ iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java | 10 +++++++++- 6 files changed, 52 insertions(+), 6 deletions(-) diff --git a/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/McsApi.java b/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/McsApi.java index 5d41936..6e5fa27 100644 --- a/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/McsApi.java +++ b/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/McsApi.java @@ -36,6 +36,10 @@ @Operation(summary = "预测数据图表") PreDataItemChartRespVO getPreDataItemChart(@RequestBody PreDataItemChartReqVO reqVO); + @PostMapping(PREFIX + "/predict-data/single-chart") + @Operation(summary = "预测数据图表") + PreDataItemChartRespVO getPreDataSingleChart(@RequestBody PreDataSingleChartReqVO reqVO); + @PostMapping(PREFIX + "/alarm-message/create") @Operation(summary = "添加预警信息") Boolean createAlarmMessage(@RequestBody AlarmMessageRespDTO dto); diff --git a/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataItemChartRespVO.java b/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataItemChartRespVO.java index 76833a2..8ab17a0 100644 --- a/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataItemChartRespVO.java +++ b/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataItemChartRespVO.java @@ -8,7 +8,6 @@ import java.util.Date; import java.util.LinkedHashMap; import java.util.List; -import java.util.Map; /** * @author PanZhibao @@ -19,9 +18,9 @@ public class PreDataItemChartRespVO implements Serializable { private static final long serialVersionUID = 1L; - @Schema(description = "最后运行时间") + @Schema(description = "预测时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date lastTime; + private Date predictTime; @Schema(description = "开始时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") diff --git a/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataSingleChartReqVO.java b/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataSingleChartReqVO.java new file mode 100644 index 0000000..00206fd --- /dev/null +++ b/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataSingleChartReqVO.java @@ -0,0 +1,25 @@ +package com.iailab.module.model.api.mcs.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author PanZhibao + * @Description + * @createTime 2024年11月18日 + */ +@Data +public class PreDataSingleChartReqVO implements Serializable { + private static final long serialVersionUID = 1L; + + @Schema(description = "图表code") + private String chartCode; + + @Schema(description = "预测时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date predictTime; +} \ No newline at end of file diff --git a/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataViewRespDTO.java b/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataViewRespDTO.java index 0e3f2cf..96d9e11 100644 --- a/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataViewRespDTO.java +++ b/iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PreDataViewRespDTO.java @@ -52,10 +52,10 @@ private BigDecimal deadLineL; @Schema(description = "运行上限") - private BigDecimal limtH; + private BigDecimal limitH; @Schema(description = "运行下限") - private BigDecimal limtL; + private BigDecimal limitL; @Schema(description = "最大值") private BigDecimal maxValue; diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java index 81a761c..623c97d 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java @@ -206,7 +206,7 @@ if (predictItem.getLastTime() == null) { return result; } - result.setLastTime(predictItem.getLastTime()); + result.setPredictTime(predictItem.getLastTime()); Date startTime = reqVO.getStartTime(); if (startTime == null) { Calendar calendar = Calendar.getInstance(); @@ -250,6 +250,14 @@ return result; } + @Override + public PreDataItemChartRespVO getPreDataSingleChart(PreDataSingleChartReqVO reqVO) { + PreDataItemChartRespVO result = new PreDataItemChartRespVO(); + + + return result; + } + /** * 获取真实值 * diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java index e02730c..7198837 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/controller/admin/McsApiController.java @@ -67,4 +67,14 @@ PreDataItemChartRespVO respVO = mcsApi.getPreDataItemChart(reqVO); return CommonResult.success(respVO); } + + @PermitAll + @GetMapping("/predict-data/single-chart") + @Operation(summary = "预测数据图表") + public CommonResult<PreDataItemChartRespVO> getPreDataSingleChart(HttpServletResponse response, HttpServletRequest + request, @RequestBody PreDataSingleChartReqVO reqVO) throws Exception { + apiSecurityUtils.validate(request); + PreDataItemChartRespVO respVO = mcsApi.getPreDataSingleChart(reqVO); + return CommonResult.success(respVO); + } } \ No newline at end of file -- Gitblit v1.9.3