| | |
| | | class GridFusionByAQI { |
| | | var pollutionDegree: String? = null |
| | | var gridLen:Int? = null |
| | | var missionList: MutableList<MissionInventory.MissionDetail> = mutableListOf() |
| | | var missionList: MutableList<MissionInventory.MissionInfo> = mutableListOf() |
| | | var gridFusionList: MutableList<FusionGrid> = mutableListOf() |
| | | var highRiskGridList: MutableList<HighRiskGridByFactor> = mutableListOf() |
| | | } |
| | |
| | | factorTypes: List<FactorType>, |
| | | gridLen: Int, |
| | | gridCells: List<GridCell>, |
| | | dataList: List<Triple<PollutionDegree, List<MissionInventory.MissionDetail>, List<GridDataDetailMixVo>>>, |
| | | dataList: List<Triple<PollutionDegree, List<MissionInventory.MissionInfo>, List<GridDataDetailMixVo>>>, |
| | | ): List<GridFusionByAQI> { |
| | | return dataList.map { |
| | | GridFusionByAQI().apply { |
| | |
| | | highRiskGridList.addAll(factorTypes.map { f-> |
| | | HighRiskGridByFactor().apply { |
| | | factorType = f |
| | | highRiskGrid = gridFusionList.sortedBy { gf->gf.data.rank }.firstOrNull() |
| | | highRiskGrid = gridFusionList.maxByOrNull { gf->gf.data.getByFactorType(f) ?: 0f } |
| | | if (highRiskGrid != null) { |
| | | factorValue = highRiskGrid!!.data.getByFactorType(f) |
| | | if (highRiskGrid!!.cell.longitude != null && highRiskGrid!!.cell.latitude != null) { |