From e58a05b78d09bcd4c1a12e8610c5adfc316494e8 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 18 十二月 2025 10:04:42 +0800
Subject: [PATCH] 2025.12.18
---
src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedData.kt | 29 ++++++++++-------------------
1 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedData.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedData.kt
index 3dc2e05..577b38b 100644
--- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedData.kt
+++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedData.kt
@@ -34,15 +34,6 @@
var max: Double? = null
}
- /**
- * 9. 鍏宠仈鍥犲瓙
- * a) pm2.5銆乸m10鐗瑰埆楂橈紝涓よ�呭湪鍚勬儏鍐典笅鍚屾灞曠ず锛宲m2.5鍗爌m10鐨勬瘮閲嶅彉鍖栵紝姣旈噸瓒婇珮锛岃秺鏈夊彲鑳芥槸椁愰ギ
- * b) pm10鐗瑰埆楂樸�乸m2.5杈冮珮锛屽ぇ棰楃矑鎵皹姹℃煋锛屽彧灞曠ずpm10锛宲m2.5鍗爌m10鐨勬瘮閲嶅彉鍖栵紝宸ュ湴涓轰富
- * c) VOC杈冮珮锛屽悓姣旇绠梡m2.5鐨勯噺绾э紝鍙兘瀛樺湪鍚屾鍋忛珮锛堟苯淇�佸姞娌圭珯锛�, 鍚屾璁$畻O3鏄惁鏈夐珮鍊�
- * d) VOC杈冮珮锛屽浜庡姞娌圭珯锛堣溅杈嗘嫢鍫垫儏鍐碉級锛孋O涓�鑸緝楂�, 鍚屾璁$畻O3鏄惁鏈夐珮鍊�
- * e) 姘哀鍖栧悎鐗╋紝涓�鑸敱浜庢満鍔ㄨ溅灏炬皵锛屽悓姝ヨ绠桟O
- */
-
constructor(
start: BaseRealTimeData,
end: BaseRealTimeData?,
@@ -59,8 +50,8 @@
endTime = end?.dataTime
// startData = start.getByFactorType(factor.main)
// endData = end?.getByFactorType(factor.main) ?: startData
- startData = start
- endData = end
+// startData = start
+// endData = end
windSpeed = exceptionData.first().windSpeed?.toDouble()
times = windLevelCondition?.countLimit
@@ -84,7 +75,7 @@
avgPer = calPer(f.main)
avgRate = calRate(f.main)
- val s = dataSummary(exceptionData, f.main)
+ val s = dataSummary(dataList, f.main)
avg = s.first
min = s.second
max = s.third
@@ -100,8 +91,8 @@
var startTime: Date? = null
var endTime: Date? = null
- var startData: BaseRealTimeData? = null
- var endData: BaseRealTimeData? = null
+// var startData: BaseRealTimeData? = null
+// var endData: BaseRealTimeData? = null
// 椋庨��
var windSpeed: Double? = null
@@ -110,7 +101,7 @@
var times: Int? = null
var historyDataList = mutableListOf<DataVo>()
- // 寮傚父鐩戞祴鏁版嵁
+ // 寮傚父鐩戞祴鏁版嵁锛屽寘鍚崟娆″紓甯镐腑鎵�鏈夊彂鐢熶簡寮傚父鐨勬暟鎹�硷紙鍙兘涓嶆槸鏃堕棿杩炵画鐨勬暟鎹級
var dataList: MutableList<BaseRealTimeData> = mutableListOf()
var dataVoList: MutableList<DataVo> = mutableListOf()
@@ -127,8 +118,8 @@
var total = .0
for (i in 0 until list.size - 1) {
- val p = list[i].getByFactorType(factorType)!!
- val n = list[i + 1].getByFactorType(factorType)!!
+ val p = list[i].getByFactorType(factorType) ?: .0f
+ val n = list[i + 1].getByFactorType(factorType) ?: .0f
total += (n - p) / p
}
return total / (list.size - 1)
@@ -140,8 +131,8 @@
var total = .0
for (i in 0 until list.size - 1) {
- val p = list[i].getByFactorType(factorType)!!
- val n = list[i + 1].getByFactorType(factorType)!!
+ val p = list[i].getByFactorType(factorType) ?: .0f
+ val n = list[i + 1].getByFactorType(factorType) ?: .0f
total += (n - p) / 4
}
return total / (list.size - 1)
--
Gitblit v1.9.3