diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index 08eee07a..0f26a7b7 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -216,9 +216,6 @@ public class InspectionInfoServiceImpl extends ServiceImpl byUserId = roleService.getByUserId(loginUser.getId()); List roleIds = byUserId.stream().map(UserRoleDO::getRoleId).collect(Collectors.toList()); - if("2".equals(inspectionInfo.getStatus())){ - //进行中 + if(!"1".equals(inspectionInfo.getStatus())){ + //进行中 已完成 inspectionInfo.setDealUserId(loginUser.getId()); } return baseMapper.selectByUser(page,roleIds,inspectionInfo); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java index 93fc7e17..c8309bb9 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java @@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -81,6 +82,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(InspectionWorkNode::getInspectionInfoId, inspectionWorkNode.getInspectionInfoId()); + queryWrapper.eq(InspectionWorkNode::getInspectionInfoId, workNode.getInspectionInfoId()); List inspectionWorkNodes = this.list(queryWrapper); //判断当前是否是最后一个项目 根据顺序号判断 boolean flag = hasNextNode(inspectionWorkNodes, workNode); // 插入步骤信息 InspectionStepInfo inspectionStepInfo = new InspectionStepInfo(); - inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionWorkNode.getInspectionInfoId()))); + inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(workNode.getInspectionInfoId()))); //根据projectId查询项目名称 DlInspectionProject project = inspectionProjectService.getOne(new LambdaQueryWrapper() @@ -170,6 +172,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl #{roleId}