From dc303cb157a363bb52c9c37d257f35e09625e243 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 18 十一月 2024 18:07:38 +0800
Subject: [PATCH] 查询指标默认值

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/admin/ApiDataController.java |    9 +++++----
 iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java                     |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java
index e0cc621..0fc23d4 100644
--- a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java
+++ b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java
@@ -24,7 +24,7 @@
 
     @GetMapping(PREFIX + "/query-ind/default-value")
     @Operation(summary = "查询指标默认值")
-    List<ApiIndItemValueDTO> queryIndItemDefaultValue(@RequestParam String itemNo);
+    List<ApiIndItemValueDTO> queryIndItemDefaultValue(@RequestParam("itemNo") String itemNo);
 
     @PostMapping(PREFIX + "/query-ind/history-value")
     @Operation(summary = "查询指标历史值")
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 3ed05e1..d8f979d 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
@@ -282,8 +282,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 +306,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