From 1a677d2b4a4bc615602f8c2a22bc07ec1356e5be Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 16 十月 2025 17:39:06 +0800
Subject: [PATCH] 2025.10.16 1. 根据全局响应增强器GlobalResponseAdvice,将原先的BaseResPack接口包装函数统一去除; 2. 新增三种类型的数据产品数据库实体 3. 新增典型问题场景清单中间数据产品接口
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 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 70db70c..f103925 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
@@ -10,6 +10,7 @@
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.common.utils.UUIDGenerator
+import cn.flightfeather.supervision.domain.ds1.repository.SceneRep
import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
import cn.flightfeather.supervision.domain.ds1.repository.TaskRep
import cn.flightfeather.supervision.lightshare.service.*
@@ -26,6 +27,7 @@
val taskMapper: TaskMapper,
private val taskRep: TaskRep,
private val subTaskRep: SubTaskRep,
+ private val sceneRep: SceneRep,
) : TaskService {
@Autowired
@@ -766,14 +768,33 @@
districtName = t.districtname
townCode = t.towncode
townName = t.townname
+
var count = 0
+ val countByScene = mutableMapOf<String?, Int>()
+ val allScenes = sceneRep.findSceneList(t.tguid!!, areaVo.scensetypeid?.toInt(), areaVo.towncode)
taskRep.findMonitorList(t.tguid!!, areaVo.scensetypeid).forEach {
- val c = if (it.extension1 != null) it.extension1!!.toInt() else 1
+ val c = it.monitornum ?: 1
count += c
+
+ allScenes.find { s-> s?.guid == it.sguid }?.let { s->
+// if (!countByScene.containsKey(s.type)) {
+// countByScene[s.type] = 0
+// }
+ countByScene[s.type] = (countByScene[s.type] ?: 0) + c
+ }
}
totaltask = count
- subTaskSummary = subTaskRep.findSummary(areaVo)
+ totaltaskByScene = countByScene
+
+ subTaskSummary = subTaskRep.findSummary(AreaVo().apply {
+ topTaskId = t.tguid
+ })
+ val completeByScene = mutableMapOf<String?, Int>()
+ subTaskSummary?.forEach {
+ completeByScene[it.sceneType] = (completeByScene[it.sceneType] ?: 0) + 1
+ }
completetask = this.subTaskSummary?.size
+ completetaskByScene = completeByScene
}
res.add(pro)
}
--
Gitblit v1.9.3