From 5bf42aa9950058f391805e6fb8d7376f4378924b Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 23 十二月 2024 16:16:55 +0800
Subject: [PATCH] cumulateHandle.getCurrent

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/PointCollector.java |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/PointCollector.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/PointCollector.java
index 52e872c..043d3bb 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/PointCollector.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/PointCollector.java
@@ -99,26 +99,10 @@
             influxDBService.asyncWritePointValues(pointValues);
 
             log.info("更新采集状态");
-            updateCollectStatus(pointValues, collectTime);
+            daPointCollectStatusService.recordStatusList(pointValues, collectTime);
             log.info("采集完成");
         } catch (Exception ex) {
             log.info("采集异常!");
-            ex.printStackTrace();
-        }
-    }
-
-    private void updateCollectStatus(List<InfluxPointValuePOJO> pointValues, Date collectTime) {
-        try {
-            for (InfluxPointValuePOJO pointValue : pointValues) {
-                if (pointValue instanceof InfluxPointValueSimPOJO) {
-                    InfluxPointValueSimPOJO pvo = (InfluxPointValueSimPOJO) pointValue;
-                    daPointCollectStatusService.recordStatus(pvo.getPoint(), pvo.getValue().toString(), collectTime);
-                } else if (pointValue instanceof InfluxPointValueDigPOJO) {
-                    InfluxPointValueDigPOJO pvo = (InfluxPointValueDigPOJO) pointValue;
-                    daPointCollectStatusService.recordStatus(pvo.getPoint(), pvo.getValue().toString(), collectTime);
-                }
-            }
-        } catch (Exception ex) {
             ex.printStackTrace();
         }
     }
@@ -132,6 +116,7 @@
             data.putAll(constantHandle.getCurrent(pointNos));
             data.putAll(measureHandle.getCurrent(pointNos));
             data.putAll(calculateHandle.getCurrent(pointNos));
+            data.putAll(cumulateHandle.getCurrent(pointNos));
             return data;
         } catch (Exception ex) {
             return R.error(ex.getMessage());

--
Gitblit v1.9.3