From 538ba7a3bbc682f4537f1dd34f93feb2cf56b08e Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 14 十月 2025 17:32:04 +0800
Subject: [PATCH] 2025.10.14 1. 新增数据统计颗粒度选项,可选秒级数据、分钟数据进行数据统计 2. 典型隐患区域统计新增按照污染溯源区域进行分类统计的功能
---
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