From 8aadcbe920f02806b9fa363b386d3d6c693c5c56 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期五, 07 二月 2025 16:49:03 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/admin/ApiDataController.java | 42 ++++++++++++++++++------------------------ 1 files changed, 18 insertions(+), 24 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/admin/ApiDataController.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/admin/ApiDataController.java index 3913af3..cac9a87 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/admin/ApiDataController.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/admin/ApiDataController.java @@ -1,26 +1,23 @@ package com.iailab.module.data.api.controller.admin; import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.date.DateUtils; -import com.iailab.framework.common.util.object.ConvertUtils; import com.iailab.framework.excel.core.util.ExcelUtils; import com.iailab.module.data.api.dto.DeviceValueDTO; import com.iailab.module.data.api.dto.IndexQueryDTO; import com.iailab.module.data.api.dto.echarts.BarLineDTO; import com.iailab.module.data.api.dto.echarts.SeriesItem; +import com.iailab.module.data.api.ind.IndItemApi; import com.iailab.module.data.api.ind.dto.ApiIndItemQueryDTO; import com.iailab.module.data.api.ind.dto.ApiIndItemValueDTO; import com.iailab.module.data.api.plan.PlanItemApi; import com.iailab.module.data.api.plan.dto.ApiPlanDataDTO; import com.iailab.module.data.api.point.DataPointApi; -import com.iailab.module.data.api.point.dto.ApiPointValueDTO; -import com.iailab.module.data.api.point.dto.ApiPointValueQueryDTO; -import com.iailab.module.data.api.point.dto.ApiPointsValueQueryDTO; +import com.iailab.module.data.api.point.dto.*; import com.iailab.module.data.common.ApiDataQueryDTO; import com.iailab.module.data.common.ApiDataValueDTO; import com.iailab.module.data.common.utils.ApiSecurityUtils; -import com.iailab.module.data.ind.collection.IndItemCollector; -import com.iailab.module.data.ind.item.vo.IndItemValueVO; import com.iailab.module.data.plan.item.entity.PlanItemEntity; import com.iailab.module.data.plan.item.service.PlanItemService; import com.iailab.module.data.plan.item.vo.PlanItemValueExportVO; @@ -38,7 +35,6 @@ import javax.annotation.security.PermitAll; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; @@ -70,7 +66,7 @@ private PlanItemApi planItemApi; @Autowired - private IndItemCollector indItemCollector; + private IndItemApi indItemApi; @Autowired private PlanItemService planItemService; @@ -305,25 +301,23 @@ @PermitAll @GetMapping("/query-ind/default-value") @Operation(summary = "查询指标默认值") - public CommonResult<List<ApiIndItemValueDTO>> queryIndItemDefaultValue(HttpServletResponse response, HttpServletRequest - request,@RequestParam String itemNo) throws Exception { - apiSecurityUtils.validate(request); - List<IndItemValueVO> list = indItemCollector.queryValue(itemNo); - List<ApiIndItemValueDTO> dtoList = new ArrayList<>(); - list.forEach(item -> { - ApiIndItemValueDTO dto = new ApiIndItemValueDTO(); - dto.setDataTime(item.getDataTime()); - dto.setDataValue(item.getDataValue().doubleValue()); - dtoList.add(dto); - }); - return success(dtoList); + public CommonResult<List<ApiIndItemValueDTO>> queryIndItemDefaultValue(@RequestParam String itemNo) { + return success(indItemApi.queryIndItemDefaultValue(itemNo)); } @PermitAll - @GetMapping("/query-ind/history-value") + @PostMapping("/query-ind/history-value") @Operation(summary = "查询指标历史值") - public CommonResult<List<ApiIndItemValueDTO>> queryIndItemHistoryValue(@RequestParam ApiIndItemQueryDTO dto) { - List<IndItemValueVO> list = indItemCollector.queryValue(dto.getItemNo(), dto.getStart(), dto.getEnd()); - return success(ConvertUtils.sourceToTarget(list, ApiIndItemValueDTO.class)); + public CommonResult<List<ApiIndItemValueDTO>> queryIndItemHistoryValue(@RequestBody ApiIndItemQueryDTO dto) { + return success(indItemApi.queryIndItemHistoryValue(dto)); } + + @PermitAll + @PostMapping("/query-math-point/current-value") + @Operation(summary = "根据计算点编号查询测点集合") + public CommonResult<PageResult<ApiPointDTO>> queryMathPointCurrentValue(@RequestBody ApiPointPageReqVO reqVO) { + PageResult<ApiPointDTO> data = dataPointApi.queryMathPointCurrentValue(reqVO); + return success(data); + } + } -- Gitblit v1.9.3