From aa0382e44311f9f7e62a688c8fcaa9c69a512e0f Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期二, 24 十二月 2024 15:15:10 +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 |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 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 d5a4c21..339c042 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
@@ -4,7 +4,6 @@
 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.framework.tenant.core.context.TenantContextHolder;
 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;
@@ -39,7 +38,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.*;
@@ -151,8 +149,8 @@
                 queryDto.setPointNo(item.getPointNo());
                 List<ApiPointValueDTO> list = dataPointApi.queryPointHistoryValue(queryDto);
                 List<Object[]> sData = list.stream().map(dataItem -> {
-                    Object[] valueArray = new Object[]{DateUtils.format(dataItem.getDataTime(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND),
-                            getFormatValue(item.getDataType(), dataItem.getDataValue())};
+                    Object[] valueArray = new Object[]{DateUtils.format(dataItem.getT(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND),
+                            getFormatValue(item.getDataType(), dataItem.getV())};
                     return valueArray;
                 }).collect(Collectors.toList());
                 seriesItem.setData(sData);
@@ -282,8 +280,8 @@
     @PostMapping("/export-plan/history-value")
     @Operation(summary = "导出计划数据")
     public void exportPlanHistoryValue(HttpServletResponse response, HttpServletRequest
-            request, @RequestBody ApiDataQueryDTO dto) throws IOException {
-        //apiSecurityUtils.validate(request);
+            request, @RequestBody ApiDataQueryDTO dto) throws Exception {
+        apiSecurityUtils.validate(request);
         Calendar calendar = Calendar.getInstance();
         calendar.set(Calendar.MILLISECOND, 0);
         calendar.set(Calendar.SECOND, 0);
@@ -306,8 +304,9 @@
     @PermitAll
     @GetMapping("/query-ind/default-value")
     @Operation(summary = "查询指标默认值")
-    public CommonResult<List<ApiIndItemValueDTO>> queryIndItemDefaultValue(@RequestParam String itemNo) {
-        TenantContextHolder.setTenantId(161L);
+    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 -> {

--
Gitblit v1.9.3