From 38d72198bfcced01ed9513b978163e5cd1d84625 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 21 七月 2025 15:31:41 +0800
Subject: [PATCH] 2025.7.21 1. 修改动态溯源异常判断逻辑

---
 src/main/kotlin/com/flightfeather/uav/model/epw/EPWModel.kt |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/model/epw/EPWModel.kt b/src/main/kotlin/com/flightfeather/uav/model/epw/EPWModel.kt
index b12dd82..c096d17 100644
--- a/src/main/kotlin/com/flightfeather/uav/model/epw/EPWModel.kt
+++ b/src/main/kotlin/com/flightfeather/uav/model/epw/EPWModel.kt
@@ -1,6 +1,5 @@
 package com.flightfeather.uav.model.epw
 
-import com.flightfeather.uav.lightshare.bean.CompanySOP
 import com.flightfeather.uav.lightshare.bean.DataVo
 import com.flightfeather.uav.model.*
 import com.flightfeather.uav.socket.eunm.FactorType
@@ -11,19 +10,25 @@
  * 鏍规嵁璧拌埅鐩戞祴鏁版嵁锛岀粨鍚堥閫熴�侀鍚戙�佺洃娴嬬偣涓庝紒涓氱殑鐩稿浣嶇疆绛夊洜绱狅紝璁$畻浼佷笟瀵圭洃娴嬪尯鍩熺殑褰卞搷绋嬪害
  * @author riku
  */
-class EPWModel : BaseModel<DataVo, CompanySOP>() {
+class EPWModel : BaseModel<DataVo, BaseSOP>() {
 
-    override var dataPrep: BaseDataPrep<DataVo, CompanySOP> = EPWDataPrep()
+    // 榛樿鐩戞祴鐐圭粡绾害
+    var defaultLocation: Pair<Double, Double>? = null
+        set(value) {
+            weights = listOf(WindDirWeight(value), WindDisWeight(value))
+        }
+
+    override var dataPrep: BaseDataPrep<DataVo, BaseSOP> = EPWDataPrep()
 
     override var factorTypes: List<FactorType> = WeightType.weightType
 
-    override var weights: List<BaseWeight<DataVo, CompanySOP>> = listOf(WindDirWeight(), WindDisWeight())
+    override var weights: List<BaseWeight<DataVo, BaseSOP>> = listOf(WindDirWeight(defaultLocation), WindDisWeight(defaultLocation))
 
-    override var sections: List<BaseSection<DataVo, CompanySOP>> = listOf(TimeSection())
+    override var sections: List<BaseSection<DataVo, BaseSOP>> = listOf(TimeSection())
 
     override fun mDataCheck(m: DataVo): Boolean = !(m.lng == null || m.lng == 0.0 || m.lat == null || m.lat == 0.0)
 
-    override fun sopCheck(s: CompanySOP): Boolean =
+    override fun sopCheck(s: BaseSOP): Boolean =
         !(s.ciLongitude == null || s.ciLongitude == BigDecimal(0) || s.ciLatitude == null || s.ciLatitude == BigDecimal(0))
 
 }
\ No newline at end of file

--
Gitblit v1.9.3