|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.tuoheng.admin.service.inspectionfile.processing; |
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.tuoheng.admin.entity.*; |
|
|
|
import com.tuoheng.admin.enums.InspectionFileStatusEnum; |
|
|
@@ -92,7 +93,7 @@ public class InspectionFileProcessingService { |
|
|
|
WorkOrder workOrder = workOrderMapper.selectOne(new LambdaQueryWrapper<WorkOrder>() |
|
|
|
.eq(WorkOrder::getId, request.getWorkOrderId()) |
|
|
|
.eq(WorkOrder::getMark, MarkEnum.VALID.getCode())); |
|
|
|
if (null == workOrder) { |
|
|
|
if (ObjectUtil.isEmpty(workOrder)) { |
|
|
|
return JsonResult.error(InspectionFileProcessingCodeEnum.WORK_ORDER_IS_NOT_EXIST.getCode(), InspectionFileProcessingCodeEnum.WORK_ORDER_IS_NOT_EXIST.getMsg()); |
|
|
|
} |
|
|
|
// 判断任务问题id是否为空 |
|
|
@@ -103,10 +104,17 @@ public class InspectionFileProcessingService { |
|
|
|
InspectionFile inspectionFile = inspectionFileMapper.selectOne(new LambdaQueryWrapper<InspectionFile>() |
|
|
|
.eq(InspectionFile::getId, request.getInspectionFileId()) |
|
|
|
.eq(InspectionFile::getMark, MarkEnum.VALID.getCode())); |
|
|
|
if (null == inspectionFile) { |
|
|
|
if (ObjectUtil.isEmpty(inspectionFile)) { |
|
|
|
log.info("任务问题不存在,inspectionFileId:{}", request.getInspectionFileId()); |
|
|
|
return JsonResult.error(InspectionFileProcessingCodeEnum.INSPECTION_FILE_IS_NOT_EXIST.getCode(), InspectionFileProcessingCodeEnum.INSPECTION_FILE_IS_NOT_EXIST.getMsg()); |
|
|
|
} |
|
|
|
InspectionFileHandle inspectionFileHandle = inspectionFileHandleMapper.selectOne(new LambdaQueryWrapper<InspectionFileHandle>() |
|
|
|
.eq(InspectionFileHandle::getInspectionFileId, request.getInspectionFileId()) |
|
|
|
.eq(InspectionFileHandle::getMark, MarkEnum.VALID.getCode())); |
|
|
|
if (ObjectUtil.isNotEmpty(inspectionFileHandle)) { |
|
|
|
log.info("该问题已处理,不能重复提交,inspectionFileHandleId:{}", inspectionFileHandle.getId()); |
|
|
|
return JsonResult.error(InspectionFileProcessingCodeEnum.INSPECTION_FILE_Handle_IS_EXIST.getCode(), InspectionFileProcessingCodeEnum.INSPECTION_FILE_Handle_IS_EXIST.getMsg()); |
|
|
|
} |
|
|
|
return JsonResult.success(inspectionFile); |
|
|
|
} |
|
|
|
|