| | |
| | | |
| | | import com.flightfeather.uav.biz.FactorFilter |
| | | import com.flightfeather.uav.biz.dataanalysis.BaseExceptionResult |
| | | import com.flightfeather.uav.biz.dataanalysis.model.ExceptionTag |
| | | import com.flightfeather.uav.biz.dataanalysis.model.ExceptionType |
| | | import com.flightfeather.uav.biz.sourcetrace.config.RTExcWindLevelConfig |
| | | import com.flightfeather.uav.common.utils.DateUtil |
| | |
| | | */ |
| | | class PollutedClue() : BaseExceptionResult() { |
| | | |
| | | // constructor( |
| | | // start: BaseRealTimeData, |
| | | // end: BaseRealTimeData?, |
| | | // factor: FactorFilter.SelectedFactor, |
| | | // exceptionData: List<BaseRealTimeData>, |
| | | // eType: ExceptionType, |
| | | // config: RTExcWindLevelConfig, |
| | | // windLevelCondition: RTExcWindLevelConfig.WindLevelCondition?, |
| | | // ) : this() { |
| | | // if (exceptionData.isEmpty()) return |
| | | // pollutedData = PollutedData(start, end, factor, exceptionData, eType, windLevelCondition) |
| | | // pollutedArea = PollutedArea(exceptionData, config, windLevelCondition) |
| | | // } |
| | | |
| | | constructor( |
| | | start: BaseRealTimeData, |
| | | end: BaseRealTimeData?, |
| | | factor: FactorFilter.SelectedFactor, |
| | | exceptionData: List<BaseRealTimeData>, |
| | | eType: ExceptionType, |
| | | config: RTExcWindLevelConfig, |
| | | windLevelCondition: RTExcWindLevelConfig.WindLevelCondition |
| | | ) : this() { |
| | | this.factor = factor |
| | | if (exceptionData.isEmpty()) return |
| | | pollutedData = PollutedData(start, end, factor, exceptionData, eType, windLevelCondition) |
| | | pollutedArea = PollutedArea(exceptionData, config, windLevelCondition) |
| | | tag: ExceptionTag, factor: FactorFilter.SelectedFactor, eType: ExceptionType, config: RTExcWindLevelConfig, |
| | | windLevelCondition: RTExcWindLevelConfig.WindLevelCondition?, |
| | | ) :this() |
| | | // this( |
| | | // tag.startData!!, tag.endData, factor, tag.exceptionData, eType, config, |
| | | // windLevelCondition |
| | | // ) |
| | | { |
| | | if (tag.exceptionData.isEmpty()) return |
| | | pollutedData = PollutedData( |
| | | tag.startData!!, tag.endData, factor, tag.exceptionData, tag.historyData, eType, windLevelCondition |
| | | ) |
| | | pollutedArea = PollutedArea(tag.historyData, tag.exceptionData, config, windLevelCondition) |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | var pollutedSource: PollutedSource? = null |
| | | |
| | | private var factor: FactorFilter.SelectedFactor? = null |
| | | |
| | | /** |
| | | * 查找系统内部溯源范围内的污染企业 |
| | | */ |
| | | fun searchScenes(sceneInfoRep: SceneInfoRep) { |
| | | if (pollutedArea == null || factor == null) return |
| | | pollutedSource = PollutedSource().also { it.searchScenes(pollutedArea!!, sceneInfoRep, factor!!) } |
| | | if (pollutedArea == null || pollutedData == null) return |
| | | pollutedSource = PollutedSource().also { |
| | | it.searchScenes(pollutedArea!!, sceneInfoRep, pollutedData!!) |
| | | } |
| | | } |
| | | } |