| | |
| | | import com.flightfeather.uav.domain.entity.BaseRealTimeData |
| | | import com.flightfeather.uav.domain.entity.SceneInfo |
| | | import com.flightfeather.uav.domain.repository.SceneInfoRep |
| | | import com.flightfeather.uav.socket.sender.MsgType |
| | | |
| | | /** |
| | | * 污染线索 |
| | |
| | | */ |
| | | 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( |
| | | tag: ExceptionTag, factor: FactorFilter.SelectedFactor, eType: ExceptionType, config: RTExcWindLevelConfig, |
| | | exceptions: List<Pair<FactorFilter.SelectedFactor, ExceptionTag>>, |
| | | 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) |
| | | ) : this() { |
| | | if (exceptions.isEmpty() || exceptions[0].second.exceptionData.isEmpty()) return |
| | | deviceCode = exceptions[0].second.startData?.deviceCode |
| | | |
| | | |
| | | // 获取去重后的监测因子类型 |
| | | val factorList = exceptions.map { it.first }.distinct() |
| | | pollutedData = PollutedData(exceptions, eType) |
| | | pollutedArea = PollutedArea(pollutedData!!, config, windLevelCondition) |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 6. 展示数据变化情况,上升速率等等 |
| | | * @see [MsgType] |
| | | */ |
| | | var msgType: Int? = null |
| | | |
| | | var deviceCode: String? = null |
| | | |
| | | var pollutedData: PollutedData? = null |
| | | |