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/lightshare/service/impl/ProblemlistServiceImpl.kt |   12 ++++++++++++
 1 files changed, 12 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..a56fe6a 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)
     }
 

--
Gitblit v1.9.3