From 5353617c7b2135ab00f98d8e05b2f8dfb2e096ed Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 30 六月 2021 09:55:40 +0800 Subject: [PATCH] 1. 新增污染权重分析功能 --- src/main/kotlin/com/flightfeather/uav/lightshare/bean/DataVo.kt | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 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 c3b6f14..832df5a 100644 --- a/src/main/kotlin/com/flightfeather/uav/lightshare/bean/DataVo.kt +++ b/src/main/kotlin/com/flightfeather/uav/lightshare/bean/DataVo.kt @@ -1,7 +1,9 @@ package com.flightfeather.uav.lightshare.bean import com.fasterxml.jackson.annotation.JsonInclude +import com.flightfeather.uav.model.BaseMData import com.flightfeather.uav.socket.bean.AirData +import com.flightfeather.uav.socket.eunm.FactorType /** * @author riku @@ -19,4 +21,14 @@ var lng: Double? = null, //绾害 var lat: Double? = null -) \ No newline at end of file +) : BaseMData() { + override fun getFactorData(type: FactorType): Double? { + if (values == null) throw IllegalStateException(this.javaClass.name + ": 鐩戞祴鏁版嵁鏁扮粍涓簄ull") + for (d in values!!) { + if (d.factorName == type.name) { + return d.factorData + } + } + return null + } +} \ No newline at end of file -- Gitblit v1.9.3