| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.api.enums.LocAreaType; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.enums.LocStsType; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.impl.BasAreasServiceImpl; |
| | | import com.zy.asrs.service.impl.BasStationServiceImpl; |
| | |
| | | List<LocDto> locDtos = new ArrayList<>(); |
| | | |
| | | Set<String> exist = new HashSet<>(); |
| | | |
| | | |
| | | |
| | | // 获取订单主表 |
| | | OrderPakout orderPakOut = orderPakOutService.selectByNo(orderDetlPakouts.get(0).getOrderNo()); |
| | |
| | | return R.error("库存不足"); |
| | | } |
| | | |
| | | Thread.sleep(1000L); |
| | | Thread.sleep(300L); |
| | | |
| | | List<TaskDto> taskDtos = new ArrayList<>(); |
| | | // 根据 (库位 & 出库站) 分组; 理想状态:一组为一次出库任务 |
| | |
| | | // ----------------------------------------------------------------------------------------------- |
| | | for (TaskDto taskDto : taskDtos) { |
| | | // BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", taskDto.getAgvStaNo())); |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>() |
| | | .in("loc_sts", Arrays.asList(LocStsType.LOC_STS_TYPE_O.type, LocStsType.LOC_STS_TYPE_O.type)) |
| | | .eq("dev_no", taskDto.getAgvStaNo())); |
| | | if (Objects.isNull(station)) { throw new CoolException("数据错误,站点不存在或已使用!!"); } |
| | | workService.agvStockOut(station, taskDto, getUserId()); |
| | | } |
| | | return R.ok(); |