From 2ae8bf126599f68ba1ca721ff2acc1dd4461e9a5 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 12 九月 2023 11:05:47 +0800 Subject: [PATCH] 1. 整合了飞羽环境、徐汇油烟及金山扬尘两个数据库; 2. 优化重构自动评估模块逻辑; 3. 新增监测数据自动化统; 4. 将自动统计应用于自动评估中; --- src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt index b63af99..0c185c8 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt @@ -15,7 +15,8 @@ @Throws(Exception::class) override fun execute() { if (dataSource.config.sceneType.toString() != Constant.ScenseType.TYPE1.value) { - throw IllegalStateException("${templateName}鍙兘閽堝宸ュ湴杩涜鍒嗘瀽锛屽綋鍓嶄紶鍏ュ満鏅被鍨嬬紪鍙蜂负${dataSource.config.sceneType}") +// throw IllegalStateException("${templateName}鍙兘閽堝宸ュ湴杩涜鍒嗘瀽锛屽綋鍓嶄紶鍏ュ満鏅被鍨嬬紪鍙蜂负${dataSource.config.sceneType}") + println("sadas") } dataSource.reset() @@ -23,7 +24,8 @@ 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() } @@ -32,7 +34,8 @@ 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 @@ -100,10 +103,10 @@ 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), ) ) } @@ -111,6 +114,7 @@ inner class Summary() { var status = "" + var stage = "" var proType = "" var proDes = "" var count = 0 -- Gitblit v1.9.3