From 01ac08186355e85cab4a7c6f4403180184894f23 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期六, 09 十月 2021 14:38:44 +0800
Subject: [PATCH] 1. 新增网格化数据统计功能

---
 src/main/kotlin/com/flightfeather/uav/domain/entity/ExpandFun.kt |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/domain/entity/ExpandFun.kt b/src/main/kotlin/com/flightfeather/uav/domain/entity/ExpandFun.kt
index af678c0..46d5633 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/entity/ExpandFun.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/entity/ExpandFun.kt
@@ -3,6 +3,7 @@
 import com.flightfeather.uav.common.utils.DateUtil
 import com.flightfeather.uav.common.utils.GsonUtils
 import com.flightfeather.uav.socket.bean.AirData
+import com.flightfeather.uav.socket.eunm.FactorType
 
 /**
  * 鏁版嵁搴撹〃瀹炰綋鎵╁睍鏂规硶
@@ -15,9 +16,11 @@
     list.add("绾害")
     val values = GsonUtils.parserJsonToArrayBeans(factors, AirData::class.java)
     values.forEach {
-        val name = it.factorName ?: ""
-        list.add(name)
-        list.add("$name(鐗╃悊閲�)")
+        if (FactorType.outputFactor(it.factorName)) {
+            val name = it.factorName ?: ""
+            list.add(name)
+//            list.add("$name(鐗╃悊閲�)")
+        }
     }
     return list.toTypedArray()
 }
@@ -38,8 +41,10 @@
     }
     val values = GsonUtils.parserJsonToArrayBeans(factors, AirData::class.java)
     values.forEach {
-        row.add(it.factorData ?: -1.0)
-        row.add(it.physicalQuantity ?: -1.0)
+        if (FactorType.outputFactor(it.factorName)) {
+            row.add(it.factorData ?: -1.0)
+//            row.add(it.physicalQuantity ?: -1.0)
+        }
     }
     return row.toTypedArray()
 }

--
Gitblit v1.9.3