| | |
| | | // 立即触发异步任务,不等待结果 |
| | | if (!Cools.isEmpty(palletId.get()) && StringUtils.isNotBlank(syncOrder.getOrderNo()) && !Cools.isEmpty(syncOrder.getStationId())) { |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getBarcode, palletId.get())); |
| | | if (!Cools.isEmpty(loc) && loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | if (!Cools.isEmpty(loc) && loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_F.type)) { |
| | | // outStockService.getOrderOutTaskItem(orderOutTaskParam,param.getOrderItemId()); |
| | | //出库 |
| | | // boolean itemsCheck = waitPakinService.mergeItemsCheck(pakinParam, loginUserId); |
| | |
| | | } |
| | | }); |
| | | // } |
| | | } else { |
| | | log.warn("订单 {} 自动出库失败!!未查询到指定库存!!", syncOrder.getOrderNo()); |
| | | throw new CoolException("自动出库失败!!未查询到指定库存!!"); |
| | | } |
| | | } |
| | | } |
| | |
| | | @Async |
| | | public void asyncOutboundExecutionWcs(String stationId ,Long orderId, Long loginUserId,String locCode) { |
| | | try { |
| | | int i = 0; |
| | | while (true) { |
| | | i++; |
| | | if (i > 5) return; |
| | | Thread.sleep(3000); |
| | | WkOrder byId = asnOrderService.getById(orderId); |
| | | if (Cools.isEmpty(byId)) { |
| | | continue; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | GenWaveParams genWaveParams = new GenWaveParams(); |
| | | List<Long> ids = new ArrayList<>(); |