有重检、复检项时 创建订单人员才可以修改引车员
This commit is contained in:
parent
f0f0b376d1
commit
dc6ec5a8dc
@ -282,4 +282,15 @@ public class InspectionInfoController extends BaseController {
|
|||||||
return success(inspectionInfoService.getWorkNodeByIdAndNow(id, status, flag));
|
return success(inspectionInfoService.getWorkNodeByIdAndNow(id, status, flag));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否可以修改引车员
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 15:22 2024/12/11
|
||||||
|
* @param id 工单ID
|
||||||
|
**/
|
||||||
|
@GetMapping("/judgeUpdateLeadMan")
|
||||||
|
public CommonResult<?> judgeUpdateLeadMan(Long id){
|
||||||
|
return success(inspectionInfoService.judgeUpdateLeadMan(id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,4 +119,13 @@ public interface IInspectionInfoService extends IService<InspectionInfo>
|
|||||||
* @param status 状态
|
* @param status 状态
|
||||||
**/
|
**/
|
||||||
Map<String, String> getWorkNodeByIdAndNow(Long id, String status, Boolean flag);
|
Map<String, String> getWorkNodeByIdAndNow(Long id, String status, Boolean flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否可以修改引车员
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 15:22 2024/12/11
|
||||||
|
* @param id 工单ID
|
||||||
|
**/
|
||||||
|
Boolean judgeUpdateLeadMan(Long id);
|
||||||
}
|
}
|
||||||
|
@ -601,4 +601,31 @@ public class InspectionInfoServiceImpl extends ServiceImpl<InspectionInfoMapper,
|
|||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否可以修改引车员
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 15:22 2024/12/11
|
||||||
|
* @param id 工单ID
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public Boolean judgeUpdateLeadMan(Long id){
|
||||||
|
boolean result = true;
|
||||||
|
InspectionInfo inspectionInfo = baseMapper.selectById(id);
|
||||||
|
if (!inspectionInfo.getStatus().equals("2")){
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
if (!result){
|
||||||
|
List<InspectionWorkNode> list = workNodeService.list(new LambdaQueryWrapper<InspectionWorkNode>().eq(InspectionWorkNode::getInspectionInfoId, id));
|
||||||
|
Set<String> status = list.stream().map(InspectionWorkNode::getStatus).collect(Collectors.toSet());
|
||||||
|
if (status.contains("3")){
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result){
|
||||||
|
result = inspectionInfo.getCreator().equals(SecurityFrameworkUtils.getLoginUserId()+"");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user