|
|
|
@ -341,16 +341,16 @@ public class MakeRecServiceImpl extends BaseServiceImpl<MakeRecMapper, MakeRec> |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public WorkPlanLoadVO loadNotReceived(String cardNo) { |
|
|
|
public WorkPlanLoadVO loadNotReceived(String cardNo) { |
|
|
|
List<Long> tsIds = relTeamSetUserService.list(Wrappers.lambdaQuery(RelTeamSetUser.class).eq(RelTeamSetUser::getUserId, 1297)).stream().map(RelTeamSetUser::getTeamSetId).collect(Collectors.toList()); |
|
|
|
List<Long> tsIds = relTeamSetUserService.list(Wrappers.lambdaQuery(RelTeamSetUser.class).eq(RelTeamSetUser::getUserId, AuthUtil.getUserId())).stream().map(RelTeamSetUser::getTeamSetId).collect(Collectors.toList()); |
|
|
|
WorkPlanLoadVO rtn = new WorkPlanLoadVO(); |
|
|
|
WorkPlanLoadVO rtn = new WorkPlanLoadVO(); |
|
|
|
if (CollectionUtils.isEmpty(tsIds)) { |
|
|
|
if (CollectionUtils.isEmpty(tsIds)) { |
|
|
|
return rtn; |
|
|
|
throw new ServiceException("没有可操作的班组!"); |
|
|
|
} |
|
|
|
} |
|
|
|
WorkOrder wo = workOrderMapper.getWorkOrderByCardNo(cardNo, (short) 0); |
|
|
|
WorkOrder wo = workOrderMapper.getWorkOrderByCardNo(cardNo, (short) 0); |
|
|
|
Optional.ofNullable(wo).orElseThrow(() -> new ServiceException("车间订单不存在!")); |
|
|
|
Optional.ofNullable(wo).orElseThrow(() -> new ServiceException("车间订单不存在!")); |
|
|
|
List<WorkPlanLoadVO> wpList = workPlanMapper.loadNotReceived(tsIds, wo.getId()); |
|
|
|
List<WorkPlanLoadVO> wpList = workPlanMapper.loadNotReceived(tsIds, wo.getId()); |
|
|
|
if (CollectionUtils.isEmpty(wpList)) { |
|
|
|
if (CollectionUtils.isEmpty(wpList)) { |
|
|
|
return rtn; |
|
|
|
throw new ServiceException("没有可操作的工单!"); |
|
|
|
} |
|
|
|
} |
|
|
|
WorkPlanLoadVO workPlanLoadVO = wpList.get(0); |
|
|
|
WorkPlanLoadVO workPlanLoadVO = wpList.get(0); |
|
|
|
workPlanLoadVO.setRunStatusTitle(WorkOrderEnum.getName(workPlanLoadVO.getRunStatus())); |
|
|
|
workPlanLoadVO.setRunStatusTitle(WorkOrderEnum.getName(workPlanLoadVO.getRunStatus())); |
|
|
|
|