From c1becf4cbd2e99601ce011c14b8742427249cfb4 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 09 一月 2024 17:25:05 +0800
Subject: [PATCH] 1. 多项调整

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
index bf7ef44..d49e29f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
@@ -323,6 +323,12 @@
                 mediafileMapper.deleteByExample(Example(Mediafile::class.java).apply {
                     createCriteria().andEqualTo("businessguid", id)
                 })
+                //鏇存柊宸℃煡淇℃伅涓殑闂鏁伴噺
+                val inspection = inspectionMapper.selectByPrimaryKey(p.iguid)
+                if (inspection.problemcount != null && inspection.problemcount!! > 0) {
+                    inspection.problemcount = inspection.problemcount!! - 1
+                    inspectionMapper.updateByPrimaryKey(inspection)
+                }
                 BaseResponse(true, "闂鍒犻櫎鎴愬姛", data = i)
             }
         }
@@ -486,6 +492,12 @@
             }
         }
 
+        //鏇存柊宸℃煡淇℃伅鐨勯棶棰樻暟
+        if (inspection.problemcount != null) {
+            inspection.problemcount = inspection.problemcount!! + 1
+            inspectionMapper.updateByPrimaryKey(inspection)
+        }
+
         return BaseResponse(true)
     }
 
@@ -544,4 +556,22 @@
 
         return BaseResponse(true)
     }
+
+    override fun getBySubTask(stGuid: String): List<ProblemlistVo> {
+        //鏍规嵁瀛愪换鍔D鑾峰彇闂鍒楄〃
+        val problemListVo = findBySubtaskId(stGuid)
+        //鍒ゆ柇鏄惁鏈夐棶棰樺垪琛�
+        if (!problemListVo.isEmpty()) {
+            //鏍规嵁姣忎釜闂,鑾峰彇濯掍綋鏂囦欢
+            problemListVo.forEach {
+                val mediafileVo = mediafileService.findByBusinessGUID(it.guid!!)
+                //鍒ゆ柇鏄惁鏈夊獟浣撹祫鏂�
+                if (!mediafileVo.isEmpty()) {
+                    //璧嬪��
+                    it.mediafileList = mediafileVo
+                }
+            }
+        }
+        return problemListVo
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3