| | |
| | | val proMap = mutableMapOf<String?, MutableMap<String?, Summary>>() |
| | | dataSource.loop { _, rowData -> |
| | | rowData.problems.forEach { |
| | | val s = (rowData.baseScene as SceneConstructionSite?)?.csStatus |
| | | val baseScene = rowData.baseScene as SceneConstructionSite? |
| | | val s = baseScene?.siExtension1 |
| | | if (!proMap.containsKey(s)) { |
| | | proMap[s] = mutableMapOf() |
| | | } |
| | |
| | | proMap[s]?.put(pt, Summary().apply { |
| | | for (p in rowData.problemTypes) { |
| | | if (p.guid == pt) { |
| | | status = s ?: "" |
| | | stage = s ?: "" |
| | | status = baseScene?.csStatus ?: "" |
| | | proType = p.typename ?: "" |
| | | proDes = p.description ?: "" |
| | | break |
| | |
| | | val s = summarys[i] |
| | | contents.add( |
| | | mutableListOf( |
| | | i + 1, "", "", dataSource.rowData.scene?.type ?: "", "", s.status, s.status, |
| | | i + 1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, s.status, s.stage, |
| | | s.proType, s.proDes, |
| | | s.count, "${round(s.countPer * 1000) / 10}%", |
| | | s.changeNum, "${round(s.changePer * 1000) / 10}%", |
| | | s.count, ExcelUtil.MyCell(s.countPer.toString(), isPercent = true), |
| | | s.changeNum, ExcelUtil.MyCell(s.changePer.toString(), isPercent = true), |
| | | ) |
| | | ) |
| | | } |
| | |
| | | |
| | | inner class Summary() { |
| | | var status = "" |
| | | var stage = "" |
| | | var proType = "" |
| | | var proDes = "" |
| | | var count = 0 |