package com.flightfeather.uav.biz.sourcetrace.model
|
|
import com.flightfeather.uav.biz.FactorFilter
|
import com.flightfeather.uav.biz.dataanalysis.model.ExceptionType
|
import com.flightfeather.uav.biz.sourcetrace.config.RTExcWindLevelConfig
|
import com.flightfeather.uav.common.utils.DateUtil
|
import com.flightfeather.uav.domain.entity.BaseRealTimeData
|
import com.flightfeather.uav.lightshare.bean.DataVo
|
|
/**
|
* 污染数据
|
* @date 2025/5/27
|
* @author feiyu02
|
*/
|
class PollutedData() {
|
|
/**
|
*
|
* 1. 软风1.5m/s及以下,
|
* 前后值上升幅度在50%以上1次,认为是临近发生(50米)
|
* 前后值上升幅度在20%以上1次,认为是远距离发生(50米 - 500米)
|
* 1.5 m/s及以下,静稳天气,临近发生(50米)
|
* 2. 1.6 - 7.9 m/s,前后值上升幅度在20%以上3次,认为是远距离发生(50米 - 1公里)
|
* 3. 8 - 13.8 m/s 以上,前后值上升幅度在10%以上3次,认为是远距离发生(50米 - 2公里)
|
*/
|
|
/**
|
* 9. 关联因子
|
* a) pm2.5、pm10特别高,两者在各情况下同步展示,pm2.5占pm10的比重变化,比重越高,越有可能是餐饮
|
* b) pm10特别高、pm2.5较高,大颗粒扬尘污染,只展示pm10,pm2.5占pm10的比重变化,工地为主
|
* c) VOC较高,同比计算pm2.5的量级,可能存在同步偏高(汽修、加油站), 同步计算O3是否有高值
|
* d) VOC较高,处于加油站(车辆拥堵情况),CO一般较高, 同步计算O3是否有高值
|
* e) 氮氧化合物,一般由于机动车尾气,同步计算CO
|
*/
|
|
constructor(
|
start: BaseRealTimeData,
|
end: BaseRealTimeData?,
|
factor: FactorFilter.SelectedFactor,
|
exceptionData: List<BaseRealTimeData>,
|
eType: ExceptionType,
|
windLevelCondition: RTExcWindLevelConfig.WindLevelCondition,
|
) : this() {
|
exception = eType.des
|
exceptionType = eType.value
|
factorId = factor.main.value
|
factorName = factor.main.des
|
subFactorId = factor.subs.map { it.value }
|
subFactorName = factor.subs.map { it.des }
|
selectedFactor = factor
|
|
startTime = DateUtil.instance.dateToString(start.dataTime, DateUtil.DateStyle.HH_MM_SS)
|
endTime = DateUtil.instance.dateToString(end?.dataTime, DateUtil.DateStyle.HH_MM_SS) ?: startTime
|
startData = start.getByFactorType(factor.main)
|
endData = end?.getByFactorType(factor.main) ?: startData
|
|
windSpeed = exceptionData.first().windSpeed?.toDouble()
|
percentage = windLevelCondition.mutationRate.first
|
times = windLevelCondition.countLimit
|
|
exceptionData.forEach {
|
dataList.add(it)
|
dataVoList.add(it.toDataVo())
|
}
|
}
|
|
var deviceCode: String? = null
|
|
var exception: String? = null
|
var exceptionType: Int? = null
|
|
var factorId: Int? = null
|
var factorName: String? = null
|
var subFactorId: List<Int>? = null
|
var subFactorName: List<String>? = null
|
var selectedFactor: FactorFilter.SelectedFactor? = null
|
|
var startTime: String? = null
|
var endTime: String? = null
|
|
var startData: Float? = null
|
var endData: Float? = null
|
|
// 风速
|
var windSpeed: Double? = null
|
|
// 因子量级变化幅度
|
var percentage: Double? = null
|
|
// 发生次数
|
var times: Int? = null
|
|
// 异常监测数据
|
var dataList: MutableList<BaseRealTimeData> = mutableListOf()
|
var dataVoList: MutableList<DataVo> = mutableListOf()
|
}
|