From 1571cd0f137ced4345fa8785e166a29dc31b6ad1 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 13 五月 2025 17:42:39 +0800
Subject: [PATCH] 1. 新增动态污染溯源的数据异常判断逻辑 2. 新增动态污染溯源websocket连接功能

---
 src/main/kotlin/com/flightfeather/uav/domain/repository/impl/AirDataRepImpl.kt |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/impl/AirDataRepImpl.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/impl/AirDataRepImpl.kt
index 6f2bdc1..5008d5b 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/impl/AirDataRepImpl.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/impl/AirDataRepImpl.kt
@@ -127,8 +127,8 @@
         return count
     }
 
-    override fun savePrepData2(dataList: List<DataVo>): Int {
-        var count = 0
+    override fun savePrepData2(dataList: List<DataVo>): List<BaseRealTimeData> {
+        val res = mutableListOf<BaseRealTimeData>()
         dataList.forEach {vo ->
             when (UWDeviceType.getType(vo.deviceCode)) {
                 UWDeviceType.VEHICLE -> {
@@ -139,7 +139,7 @@
                     calibration(d, UWDeviceType.VEHICLE)
                     /***************************************************************************************************/
                     realTimeDataVehicleMapper.insert(d)
-                    count++
+                    res.add(d)
                 }
                 UWDeviceType.UAV -> {
                     val d = RealTimeDataUav()
@@ -164,7 +164,7 @@
                     }
                     /***************************************************************************************************/
                     realTimeDataUavMapper.insert(d)
-                    count++
+                    res.add(d)
                 }
                 UWDeviceType.GRID -> {
                     val d = RealTimeDataGrid()
@@ -196,7 +196,7 @@
 //                    d.h2s = d.h2s?.let { sqrt(it) * 2 }
                     /**************************************************************************/
                     realTimeDataGridMapper.insert(d)
-                    count++
+                    res.add(d)
                 }
                 UWDeviceType.BOAT -> {
 
@@ -204,7 +204,7 @@
                 else -> Unit
             }
         }
-        return count
+        return res
     }
 
     private fun dataTransform(vo: RealTimeData, bean: BaseRealTimeData) {

--
Gitblit v1.9.3