From b180708562d6fb872c83c05756e8041d9967483a Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期一, 22 十二月 2025 21:04:13 +0800
Subject: [PATCH] 2025.12.22 1. 修改日任务统计接口,新增当天内整改问题数和48小时内整改问题数统计

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
index 7fd361b..4a30f8d 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
@@ -21,6 +21,8 @@
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.stereotype.Service
 import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
 import java.util.*
 import kotlin.collections.ArrayList
 
@@ -405,9 +407,20 @@
                         this.totalProblemNum += proList.size.toDouble() / ids.size
                         this.changedProblemNum += proList.filter { it.ischanged == true }.size.toDouble() / ids.size
                         this.changedProblemNumOnTime += proList.filter {
+                            // 鏄惁鍦ㄥ悓涓�澶╁唴鏁存敼
+                            val _changedDate = it.changedtime?.let { c->
+                                LocalDateTime.ofInstant(c.toInstant(), ZoneId.systemDefault()).toLocalDate()
+                            }
+                            val _proDate = it.time?.let { t->
+                                LocalDateTime.ofInstant(t.toInstant(), ZoneId.systemDefault()).toLocalDate()
+                            }
+                            val isSameDay = _changedDate?.equals(_proDate)
+                            it.ischanged == true && (isSameDay ?: false)
+                        }.size.toDouble() / ids.size
+                        this.efficientChangedProNum += proList.filter {
                             // 鏁存敼鑰楁椂锛堝ぉ锛�
                             val day = ((it.changedtime?.time ?: 0L) - (it?.time?.time ?: 0L)).div(1000 * 60 * 60 * 24)
-                            it.ischanged == true && day <= 1
+                            it.ischanged == true && day <= 2
                         }.size.toDouble() / ids.size
                         // 姝ゅ鍏堢疮璁″贰鏌ユ椂闀匡紝鏈�鍚庡啀鏍规嵁浠诲姟鏁伴噺骞冲潎
                         this.avgInspectionTime +=

--
Gitblit v1.9.3