feiyu02
2025-03-21 e5bdf2e02090357cbd580d54e6cd2406dd541760
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))
}