From 94fee0b511279679b43e210878d3d36e5a14384b Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 30 九月 2025 09:14:10 +0800
Subject: [PATCH] 2025.9.30 1. 新增走航任务统计功能

---
 src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRep.kt |   42 ++++--------------------------------------
 1 files changed, 4 insertions(+), 38 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRep.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRep.kt
index 718bdd4..1c21daf 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRep.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRep.kt
@@ -48,37 +48,6 @@
                 }
             }
         }
-
-
-//        var result = listOf<BaseRealTimeData>()
-//        when (deviceType) {
-//            UWDeviceType.VEHICLE -> {
-//                result = realTimeDataVehicleMapper.selectByExample(Example(RealTimeDataVehicle::class.java).apply {
-//                    getSecondDataExample(this, deviceCode, sTime, eTime)
-//                })
-//            }
-//            UWDeviceType.UAV -> {
-//                result = realTimeDataUavMapper.selectByExample(Example(RealTimeDataUav::class.java).apply {
-//                    getSecondDataExample(this, deviceCode, sTime, eTime)
-//                })
-//            }
-//            UWDeviceType.GRID -> {
-//                // 缃戞牸鍖栫洃娴嬬绾у��
-//                result = if (type == null || type == 0) {
-//                    realTimeDataGridMapper.selectByExample(Example(RealTimeDataGrid::class.java).apply {
-//                        getSecondDataExample(this, deviceCode, sTime, eTime)
-//                    })
-//                }
-//                // 缃戞牸鍖栫洃娴嬪垎閽熷��
-//                else {
-//                    realTimeDataGridMinMapper.selectByExample(Example(RealTimeDataGridMin::class.java).apply {
-//                        getSecondDataExample(this, deviceCode, sTime, eTime)
-//                    })
-//                }
-//            }
-//            else -> Unit
-//        }
-//        return result
     }
 
     fun fetchData(mission: Mission) =
@@ -87,13 +56,10 @@
 
     fun saveData(deviceType: UWDeviceType?, data: List<BaseRealTimeData>, type: Int? = 0): Int {
         return delegate.insertByDeviceType(deviceType, type, data)
-//        return when (deviceType) {
-//            UWDeviceType.UAV -> realTimeDataUavMapper.insertList(data as List<RealTimeDataUav>)
-//            UWDeviceType.VEHICLE -> realTimeDataVehicleMapper.insertList(data as List<RealTimeDataVehicle>)
-//            UWDeviceType.GRID -> realTimeDataGridMapper.insertList(data as List<RealTimeDataGrid>)
-//            UWDeviceType.BOAT -> 0
-//            else -> 0
-//        }
+    }
+
+    fun updateData(deviceType: UWDeviceType?, data: List<BaseRealTimeData>, type: Int? = 0): Int {
+        return delegate.updateByDeviceType(deviceType, type, data)
     }
 
     fun deleteData(mission: Mission, type: Int? = 0): Int {

--
Gitblit v1.9.3