| | |
| | | // 立即触发异步任务,不等待结果 |
| | | 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)) { |
| | | if (!Cools.isEmpty(loc) && loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | // outStockService.getOrderOutTaskItem(orderOutTaskParam,param.getOrderItemId()); |
| | | //出库 |
| | | // boolean itemsCheck = waitPakinService.mergeItemsCheck(pakinParam, loginUserId); |
| | | // if (true) { |
| | | CompletableFuture.runAsync(() -> { |
| | | try { |
| | | asyncOutboundExecutionWcs(syncOrder.getStationId(), wkOrder.getId(), loginUserId); |
| | | asyncOutboundExecutionWcs(syncOrder.getStationId(), wkOrder.getId(), loginUserId,loc.getCode()); |
| | | } catch (Exception e) { |
| | | log.warn("订单 {} 开始自动出库", syncOrder.getOrderNo()); |
| | | } |
| | |
| | | } |
| | | |
| | | @Async |
| | | public void asyncOutboundExecutionWcs(String stationId ,Long orderId, Long loginUserId) { |
| | | public void asyncOutboundExecutionWcs(String stationId ,Long orderId, Long loginUserId,String locCode) { |
| | | try { |
| | | |
| | | GenWaveParams genWaveParams = new GenWaveParams(); |
| | |
| | | // return; |
| | | // } |
| | | // outStockService.genOutStockTask(tasks, loginUserId, orderId); |
| | | R r = outStockService.generateWavesOrderAuto(genWaveParams, stationId); |
| | | R r = outStockService.generateWavesOrderAuto(genWaveParams, stationId,locCode); |
| | | |
| | | log.info("订单ID {} 自动转波次", orderId); |
| | | } catch (Exception e) { |