From eb3dd00b0b7fcda477229d518d250f9c842b790b Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 21 十月 2025 17:45:44 +0800
Subject: [PATCH] 2025.10.21 1. 走航季度报告相关数据计算逻辑调整
---
src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt
index 8ce8813..3628b1b 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt
@@ -89,6 +89,32 @@
}
/**
+ * 缁熶竴鐨剈pdate鏂规硶
+ * @param deviceType 璁惧绫诲瀷
+ * @param type 鏁版嵁缁熻鍛ㄦ湡锛�0锛氱绾у�硷紱1锛氬垎閽熷��
+ * @param data 鏁版嵁
+ */
+ fun updateByDeviceType(deviceType: UWDeviceType?, type: Int? = 0, data: List<BaseRealTimeData>): Int {
+ return byDeviceType(deviceType, type, {
+ var count = 0
+ data.forEach { count += realTimeDataVehicleMapper.updateByPrimaryKeySelective(it as RealTimeDataVehicle) }
+ count
+ }, {
+ var count = 0
+ data.forEach { count += realTimeDataUavMapper.updateByPrimaryKeySelective(it as RealTimeDataUav) }
+ count
+ }, {
+ var count = 0
+ data.forEach { count += realTimeDataGridMapper.updateByPrimaryKeySelective(it as RealTimeDataGrid) }
+ count
+ }, {
+ var count = 0
+ data.forEach { count += realTimeDataGridMinMapper.updateByPrimaryKeySelective(it as RealTimeDataGridMin) }
+ count
+ }) ?: 0
+ }
+
+ /**
* 缁熶竴鐨刣elete鏂规硶
* @param deviceType 璁惧绫诲瀷
* @param type 鏁版嵁缁熻鍛ㄦ湡锛�0锛氱绾у�硷紱1锛氬垎閽熷��
--
Gitblit v1.9.3