| | |
| | | import cn.flightfeather.supervision.business.report.BaseTemplate |
| | | import cn.flightfeather.supervision.business.report.DataSource |
| | | import cn.flightfeather.supervision.business.report.cols.ColInspectionInfo |
| | | import cn.flightfeather.supervision.business.report.cols.ColStrategy |
| | | import cn.flightfeather.supervision.business.report.cols.ColTotalGrade |
| | | import cn.flightfeather.supervision.common.utils.Constant |
| | | import cn.flightfeather.supervision.common.utils.ExcelUtil |
| | |
| | | import cn.flightfeather.supervision.domain.ds1.entity.SceneMixingPlant |
| | | import cn.flightfeather.supervision.domain.ds1.entity.SceneStorageYard |
| | | import cn.flightfeather.supervision.domain.ds1.entity.SceneWharf |
| | | import kotlin.math.round |
| | | import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult |
| | | import cn.flightfeather.supervision.business.report.bean.ProAnalysisSummaryResult |
| | | |
| | | /** |
| | | * 分街镇问题整改分析汇总表 |
| | | */ |
| | | class ProAnalysisSummary(dataSource: DataSource) : BaseTemplate(dataSource) { |
| | | override val cols: List<BaseCols> = listOf(ColInspectionInfo(), ColTotalGrade()) |
| | | override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProAnalysisSummaryResult()) |
| | | override val cols: List<BaseCols> = listOf(ColInspectionInfo(), ColTotalGrade(), ColStrategy()) |
| | | |
| | | override val templateName: String = "分街镇问题整改分析汇总表" |
| | | |
| | | override fun execute() { |
| | | override fun genData() { |
| | | //数据源重置 |
| | | dataSource.reset() |
| | | |
| | |
| | | |
| | | val r = cols[0].getOneRow(rowData) |
| | | val r1 = cols[1].getOneRow(rowData) |
| | | val r2 = cols[2].getOneRow(rowData) |
| | | |
| | | val k = rowData.scene?.townname |
| | | if (!districtMap.containsKey(k)) { |
| | |
| | | districtMap[k]?.apply { |
| | | sceneCount++ |
| | | val status = when (dataSource.config.sceneType.toString()) { |
| | | Constant.ScenseType.TYPE1.value -> { |
| | | Constant.SceneType.TYPE1.value -> { |
| | | (rowData.baseScene as SceneConstructionSite?)?.csStatus |
| | | } |
| | | Constant.ScenseType.TYPE2.value -> { |
| | | Constant.SceneType.TYPE2.value -> { |
| | | (rowData.baseScene as SceneWharf?)?.getwStatus() |
| | | } |
| | | Constant.ScenseType.TYPE3.value -> { |
| | | Constant.SceneType.TYPE3.value -> { |
| | | (rowData.baseScene as SceneMixingPlant?)?.mpStatus |
| | | } |
| | | Constant.ScenseType.TYPE14.value -> { |
| | | Constant.SceneType.TYPE14.value -> { |
| | | (rowData.baseScene as SceneStorageYard?)?.syStatus |
| | | } |
| | | else -> "" |
| | |
| | | changeNum += cNum |
| | | |
| | | |
| | | //根据规范性和监管策略结果判断是否为重点监管对象 |
| | | val standard = r1[1] as ExcelUtil.MyCell |
| | | if (standard.text.contains("不规范")) { |
| | | if (standard.text.contains("严重不规范") || r2[0].toString().contains("7、")) { |
| | | focusSceneNum++ |
| | | } |
| | | } |