引车员可以选择操作工单所有项目
This commit is contained in:
parent
5524a08201
commit
fdfaab6ef7
@ -573,12 +573,14 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
||||
throw exception0(500, "查询角色为空");
|
||||
}
|
||||
List<Long> roleIds = roles.stream().map(UserRoleDO::getRoleId).collect(Collectors.toList());
|
||||
List<InspectionWorkNode> workNodes = workNodeService.list(new LambdaQueryWrapper<InspectionWorkNode>()
|
||||
.and(i ->
|
||||
i.eq(InspectionWorkNode::getInspectionInfoId, id)
|
||||
.in(InspectionWorkNode::getRoleId, roleIds)
|
||||
.eq(InspectionWorkNode::getStatus, status)
|
||||
));
|
||||
LambdaQueryWrapper<InspectionWorkNode> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(InspectionWorkNode::getInspectionInfoId, id);
|
||||
wrapper.eq(InspectionWorkNode::getStatus, status);
|
||||
InspectionInfo inspectionInfo = baseMapper.selectById(id);
|
||||
if (!inspectionInfo.getLeadManId().equals(userId)){
|
||||
wrapper.in(InspectionWorkNode::getRoleId, roleIds);
|
||||
}
|
||||
List<InspectionWorkNode> workNodes = workNodeService.list(wrapper);
|
||||
if (CollUtil.isEmpty(workNodes)){
|
||||
throw exception0(500, "查询节点为空");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user