| | |
| | | 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 |
| | |
| | | private val taskRep: TaskRep, |
| | | private val subTaskRep: SubTaskRep, |
| | | private val problemRep: ProblemRep, |
| | | private val bizLog: BizLog, |
| | | ) : ProblemlistService { |
| | | |
| | | @Resource |
| | |
| | | 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(), |
| | | -> { |
| | |
| | | } else { |
| | | Constant.CHANGE_CHECK_FAIL |
| | | } |
| | | event = "在${subtask?.scensename}审核了一个整改" |
| | | } else { |
| | | response.success = false |
| | | response.message = "问题还未整改,无法进行整改审核!操作无效" |
| | |
| | | } |
| | | } |
| | | } else if (extension3 == Constant.CHANGE_UNCHECKED) { |
| | | event = "在${subtask?.scensename}审核了一个整改" |
| | | when (action) { |
| | | 0.toByte(), |
| | | 1.toByte(), |
| | |
| | | if (r != 1) { |
| | | response.success = false |
| | | response.message = "问题更新失败!" |
| | | } else { |
| | | bizLog.info(WorkStreamLogInfo(subtask?.executorguids, subtask?.executorrealtimes, event)) |
| | | } |
| | | } |
| | | return response |
| | |
| | | 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) |
| | | } |
| | | |