From 16b961c2210fe29fd494ac1f9d830dd93503961f Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期五, 02 八月 2024 17:25:17 +0800 Subject: [PATCH] 1. 新增监测设备的管理功能 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 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 c2b9ac6..8f2b7d4 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 @@ -1,6 +1,8 @@ package cn.flightfeather.supervision.lightshare.service.impl import cn.flightfeather.supervision.common.exception.BizException +import cn.flightfeather.supervision.common.log.BizLog +import cn.flightfeather.supervision.common.log.WorkStreamLogInfo import cn.flightfeather.supervision.domain.ds1.entity.Problemlist import cn.flightfeather.supervision.domain.ds1.entity.Scense import cn.flightfeather.supervision.common.utils.Constant @@ -42,6 +44,7 @@ private val taskRep: TaskRep, private val subTaskRep: SubTaskRep, private val problemRep: ProblemRep, + private val bizLog: BizLog, ) : ProblemlistService { @Resource @@ -374,14 +377,21 @@ return BaseResponse(false, "闈炴硶鐨勬搷浣滄寚浠�") } val p = problemlistMapper.selectByPrimaryKey(pId) ?: return BaseResponse(false, "闂涓嶅瓨鍦�") + val subtask = p.stguid?.let { subTaskRep.findOne(it) } val response = BaseResponse<String>(true) + var event = "" p.apply { this.remark = userName if (extension3 == Constant.PROBLEM_UNCHECKED) { + event = "鍦�${subtask?.scensename}瀹℃牳浜嗕竴涓棶棰�" when (action) { - 0.toByte() -> extension3 = Constant.PROBLEM_CHECK_PASS - 1.toByte() -> extension3 = Constant.PROBLEM_CHECK_FAIL + 0.toByte() -> { + extension3 = Constant.PROBLEM_CHECK_PASS + } + 1.toByte() -> { + extension3 = Constant.PROBLEM_CHECK_FAIL + } 2.toByte(), 3.toByte(), -> { @@ -403,6 +413,7 @@ } else { Constant.CHANGE_CHECK_FAIL } + event = "鍦�${subtask?.scensename}瀹℃牳浜嗕竴涓暣鏀�" } else { response.success = false response.message = "闂杩樻湭鏁存敼锛屾棤娉曡繘琛屾暣鏀瑰鏍革紒鎿嶄綔鏃犳晥" @@ -410,6 +421,7 @@ } } } else if (extension3 == Constant.CHANGE_UNCHECKED) { + event = "鍦�${subtask?.scensename}瀹℃牳浜嗕竴涓暣鏀�" when (action) { 0.toByte(), 1.toByte(), @@ -439,6 +451,8 @@ if (r != 1) { response.success = false response.message = "闂鏇存柊澶辫触锛�" + } else { + bizLog.info(WorkStreamLogInfo(userId, userName, event)) } } return response @@ -518,6 +532,12 @@ inspectionMapper.updateByPrimaryKey(inspection) } + problemlist.stguid?.let { + val subtask = subTaskRep.findOne(it) + val event = "鍦�${subtask?.scensename}鏂板涓�涓棶棰�" + bizLog.info(WorkStreamLogInfo(subtask?.executorguids, subtask?.executorrealtimes, event)) + } + return BaseResponse(true) } -- Gitblit v1.9.3