Browse Source

处理人员处理 接口,增加校验

tags/v1.1.0^2
wanghaoran 1 year ago
parent
commit
1fb316303a
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/WorkOrderServiceImpl.java

+ 8
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/WorkOrderServiceImpl.java View File

@@ -152,6 +152,14 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
@Override
@Transactional
public JsonResult handle(WorkOrderHandleRequest request) {
//校验,已处理的问题,无法再处理
Integer handleCount = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>()
.eq(WorkOrderQuestion::getQuestionId, request.getQuestionId())
.eq(WorkOrderQuestion::getStatus, 1)
.eq(WorkOrderQuestion::getMark, MarkTypeEnum.VALID.getCode()));
if(handleCount > 0){
return JsonResult.error("问题"+request.getQuestionId()+"已经处理,无法再处理");
}

//将工单子表状态修改为已处理
WorkOrderQuestion workOrderQuestion = new WorkOrderQuestion();

Loading…
Cancel
Save