| | |
| | | |
| | | // 新增一条污染线索 |
| | | fun addClue(pollutedClue: PollutedClue) { |
| | | clueList.add(pollutedClue) |
| | | // 当溯源未找到风险源时,此次溯源信息不作为线索统计项 |
| | | if (pollutedClue.pollutedSource?.sceneList?.isNotEmpty() == true) |
| | | clueList.add(pollutedClue) |
| | | // realTimeSummary() |
| | | analysisOnClueCount() |
| | | } |
| | | |
| | | // 新增一条污染线索 |
| | | fun addClueList(pollutedClues: List<PollutedClue>) { |
| | | pollutedClues.forEach { addClue(it) } |
| | | } |
| | | |
| | | // 刷新当前最新的走航监测数据 |
| | |
| | | val closetScene = result.sortedSceneList?.first() |
| | | // 走航路线调整建议 |
| | | result.advice = |
| | | "根据${sT}至${eT}的${clueList.size}条溯源切片,风险源【" + |
| | | "${closetScene?.first?.name}】被多次溯源,具有较高污染风险,现提供新的走航推荐路线,可经过该污染源。" |
| | | "根据${sT}至${eT}的${clueList.size}个溯源切片,风险源【" + |
| | | "${closetScene?.first?.name}】被多次溯源,具有较高污染风险,现提供最新直达走航路线。" |
| | | |
| | | val lastP = realTimeDataList.last() |
| | | // 建议对应的数据采样时间 |
| | |
| | | |
| | | // 建议的走航路线 |
| | | result.direction = AMapService.directionDriving(origin, destination) |
| | | Thread.sleep(200) |
| | | } |
| | | // 线索分析完成后,移动至历史线索列表 |
| | | historyClueList.addAll(clueList) |