From 4d3533b6e75e6afa5af325288b03915715add4b6 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期三, 21 八月 2024 13:30:15 +0800
Subject: [PATCH] data

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/DataController.java |   42 ------------------------------------------
 1 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/DataController.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/DataController.java
index cd54c25..0c83c57 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/DataController.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/DataController.java
@@ -1,6 +1,5 @@
 package com.iailab.module.data.api.controller;
 
-import com.iailab.api.IFeignModelApi;
 import com.iailab.framework.common.pojo.CommonResult;
 import com.iailab.framework.common.util.date.DateUtils;
 import com.iailab.module.data.common.dto.IndexQueryDTO;
@@ -60,9 +59,6 @@
 
     @Resource
     private IndItemCollector indItemCollector;
-
-    @Resource
-    private IFeignModelApi feignModelApi;
 
     @PostMapping("/point/history")
     @Operation(summary = "point历史数据")
@@ -238,44 +234,6 @@
             });
             return R.ok().put("data", data);
         } catch (Exception ex) {
-            return R.error(ex.getMessage());
-        }
-    }
-
-    @PostMapping("/ind-item/values-trend")
-    @Operation(summary = "point当前实时数据")
-    public R indItemValuesTrend(HttpServletResponse response, HttpServletRequest
-            request, @RequestBody List<String> itemNos) {
-        try {
-            apiSecurityUtils.validate(request);
-            Map<String, Object> CommonResult = new HashMap<>();
-            Map<String, List<IndItemValueDTO>> values = indItemCollector.getValueList(itemNos);
-            CommonResult.put("values", values);
-
-            Map<String, Map<String, Object>> trend = new HashMap<>();
-            Map<String, Object> params = new HashMap<>(1);
-            params.put("modelCode", "trend_analysis");
-            values.forEach((k, v) -> {
-                try {
-                    List<double[][]> sampleDataList = new ArrayList<>();
-                    List<IndItemValueDTO> nv = v.stream().filter(dto -> {
-                        return dto.getDataValue() != null;
-                    }).collect(Collectors.toList());
-                    double[][] mix = new double[nv.size()][1];
-                    for (int i = 0; i < nv.size(); i++) {
-                        mix[i][0] = nv.get(i).getDataValue().doubleValue();
-                    }
-                    sampleDataList.add(mix);
-                    Map<String, Object> trendItem = feignModelApi.runModel(params, sampleDataList);
-                    trend.put(k, trendItem);
-                } catch (Exception ex) {
-                    ex.printStackTrace();
-                }
-            });
-            CommonResult.put("trend", trend);
-            return R.ok().put("data", CommonResult);
-        } catch (Exception ex) {
-            ex.printStackTrace();
             return R.error(ex.getMessage());
         }
     }

--
Gitblit v1.9.3