From 99be60a4c8c1f39eb01d414460cbe0ac76ca97d3 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 21 七月 2022 17:47:40 +0800
Subject: [PATCH] 1. 巡查汇总报告功能添加整改跟踪提醒统计列; 2. 新增获取巡查任务统计信息接口;

---
 src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt |   39 ++++++++++++++++++++++++++++++---------
 1 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt
index 1eec3c3..83cdc70 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt
@@ -16,6 +16,20 @@
 
         summarys.sortByDescending { it.count }
 
+        var tPros = 0
+        var mainTPros = 0
+        var pDes = ""
+        for (i in summarys.indices) {
+            val it = summarys[i]
+            tPros += it.count
+            if (i < max) {
+                val lr = if (i > 0) "\n" else ""
+                mainTPros += it.count
+                pDes += "${lr}${i+1}銆�${it.proDes}"
+            }
+        }
+        var per = if (tPros == 0) .0 else mainTPros.toDouble() / tPros
+
         head.clear()
         head.add(
             mutableListOf(
@@ -41,16 +55,23 @@
                 ExcelUtil.MyCell("涓昏闂鍗犳瘮"),
             )
         )
-        for (i in summarys.indices) {
-            if (i >= max) break
+//        for (i in summarys.indices) {
+//            if (i >= max) break
+//
+//            val s = summarys[i]
+//            contents.add(
+//                mutableListOf(
+//                    i + 1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, s.count,
+//                    s.proDes, s.count, ExcelUtil.MyCell(s.countPer.toString(), isPercent = true)
+//                )
+//            )
+//        }
 
-            val s = summarys[i]
-            contents.add(
-                mutableListOf(
-                    i + 1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, s.count,
-                    s.proDes, s.count, ExcelUtil.MyCell(s.countPer.toString(), isPercent = true)
-                )
+        contents.add(
+            mutableListOf(
+                1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, tPros,
+                pDes, mainTPros, ExcelUtil.MyCell(per.toString(), isPercent = true)
             )
-        }
+        )
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3