From 594de76ed51fd49fb79b912212bb0052a63e7671 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 09 四月 2026 16:10:45 +0800
Subject: [PATCH] 2026.4.9
---
src/main/kotlin/com/flightfeather/uav/lightshare/bean/DataVo.kt | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/lightshare/bean/DataVo.kt b/src/main/kotlin/com/flightfeather/uav/lightshare/bean/DataVo.kt
index b548bc7..ebd420d 100644
--- a/src/main/kotlin/com/flightfeather/uav/lightshare/bean/DataVo.kt
+++ b/src/main/kotlin/com/flightfeather/uav/lightshare/bean/DataVo.kt
@@ -35,6 +35,15 @@
return null
}
+ fun setFactorData(type: FactorType, value: Double?) {
+ if (values == null) throw IllegalStateException(this.javaClass.name + ": 鐩戞祴鏁版嵁鏁扮粍涓簄ull")
+ for (d in values!!) {
+ if (d.factorName == type.name) {
+ d.factorData = value
+ }
+ }
+ }
+
fun toRowContent(): Array<Any> {
val row = mutableListOf<Any>()
row.add(deviceCode ?: "")
@@ -42,7 +51,7 @@
row.add(lng ?: -1.0)
row.add(lat ?: -1.0)
values?.forEach {
- if (FactorType.outputFactor(it.factorName)) {
+ if (FactorType.isOutputFactor(it.factorName)) {
row.add(it.factorData ?: -1.0)
// row.add(it.physicalQuantity ?: -1.0)
}
@@ -57,7 +66,7 @@
list.add("缁忓害")
list.add("绾害")
values?.forEach {
- if (FactorType.outputFactor(it.factorName)) {
+ if (FactorType.isOutputFactor(it.factorName)) {
val name = it.factorName ?: ""
list.add(name)
// list.add("$name(鐗╃悊閲�)")
--
Gitblit v1.9.3