From 85ef942e7195abeb71466b7159c3ee30161e1e54 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 07 四月 2026 08:51:01 +0800
Subject: [PATCH] 2026.4.7

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt |   45 +++++++++++++++++++++++++--------------------
 1 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
index d264f3c..251713f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
@@ -1,7 +1,6 @@
 package cn.flightfeather.supervision.lightshare.service.impl
 
 import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation
-import cn.flightfeather.supervision.common.exception.BizException
 import cn.flightfeather.supervision.domain.ds1.entity.*
 import cn.flightfeather.supervision.domain.ds1.mapper.*
 import cn.flightfeather.supervision.common.utils.Constant
@@ -104,7 +103,7 @@
         return subtaskVoList
     }
 
-    override fun findByDayTaskID(dayTaskId: String, userId: String, userType: String): List<Subtask> {
+    override fun findByDayTaskID(dayTaskId: String, userId: String, userType: String): List<SubtaskVo> {
         val example = Example(Subtask::class.java)
         val criteria = example.createCriteria()
         criteria.andEqualTo("tsguid", dayTaskId)
@@ -115,24 +114,30 @@
             )
         }
         example.orderBy("name")
-        val result = subtaskMapper.selectByExample(example).apply {
-            forEach breaking@{
-                //宸插鏍告彁绀�
-                it.remark = Constant.PROBLEM_CHECK_PASS
-
-                problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
-                    createCriteria().andEqualTo("stguid", it.stguid)
-                    and(
-                        createCriteria().orIsNull("remark")
-                            .orNotEqualTo("remark", Constant.PROBLEM_DELETED)
-                    )
-                }).forEach { problem ->
-                    //瀛愪换鍔′腑鏈夐棶棰樻湭瀹℃牳鏃讹紝璁剧疆鏈鏍告彁绀�
-                    if (problem.extension3 == Constant.PROBLEM_UNCHECKED) {
-                        it.remark = Constant.PROBLEM_UNCHECKED
-                        return@breaking
-                    }
+        val result = subtaskMapper.selectByExample(example).map {
+            val vo = SubtaskVo()
+            BeanUtils.copyProperties(it, vo)
+            vo
+        }.onEach {
+            //宸插鏍告彁绀�
+            it.remark = Constant.PROBLEM_CHECK_PASS
+            problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+                createCriteria().andEqualTo("stguid", it.stguid)
+                and(
+                    createCriteria().orIsNull("remark")
+                        .orNotEqualTo("remark", Constant.PROBLEM_DELETED)
+                )
+            }).forEach { problem ->
+                //瀛愪换鍔′腑鏈夐棶棰樻湭瀹℃牳鏃讹紝璁剧疆鏈鏍告彁绀�
+                if (problem.extension3 == Constant.PROBLEM_UNCHECKED) {
+                    it.remark = Constant.PROBLEM_UNCHECKED
                 }
+            }
+
+            // 鍦烘櫙绫诲瀷
+            scenseMapper.selectByPrimaryKey(it.scenseid)?.let { s->
+                it.sceneTypeId = s.typeid
+                it.sceneTypeName = s.type
             }
         }
         return result
@@ -950,7 +955,7 @@
                     .apply { sceneId?.let { andEqualTo("scenseid", it) } }
             })
         } else {
-            // 鑾峰彇鏈�杩戜竴涓湀鍐呯殑锛堟煇涓満鏅殑锛夋墍鏈夊贰鏌ヤ换鍔�
+            // 鑾峰彇鏈�杩戜竴娆℃�讳换鍔″唴鐨勶紙鏌愪釜鍦烘櫙鐨勶級鎵�鏈夊贰鏌ヤ换鍔�
             PageHelper.startPage<Subtask>(1, 1)
             val lastOne = subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
                 createCriteria().apply {

--
Gitblit v1.9.3