| | |
| | | @Autowired |
| | | private OutStockItemService outStockItemService; |
| | | @Autowired |
| | | private OutStockService outStockService; |
| | | @Autowired |
| | | private WaveRuleService waveRuleService; |
| | | @Autowired |
| | | private LocItemService locItemService; |
| | |
| | | return LocUtils.isShallowLoc(item.getLocCode()) ? 1 : 0; |
| | | }).reversed()).collect(Collectors.toList()); |
| | | |
| | | WkOrder wkOrder = outStockService.getById(outId); |
| | | WkOrder wkOrder = this.getById(outId); |
| | | if (Cools.isEmpty(wkOrder)) { |
| | | throw new CoolException("单据不存在!!"); |
| | | } |
| | |
| | | |
| | | Double sum = itemList.stream().mapToDouble(OutStockToTaskParams::getOutQty).sum(); |
| | | //更新出库单明细及主单 |
| | | WkOrder outOrder = outStockService.getById(outId); |
| | | WkOrder outOrder = this.getById(outId); |
| | | if (Objects.isNull(outOrder)) { |
| | | throw new CoolException("出库单据不存在!!"); |
| | | } |
| | |
| | | |
| | | outOrder.setWorkQty(workQty).setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_CREATE.val); |
| | | |
| | | if (!outStockService.updateById(outOrder)) { |
| | | if (!this.updateById(outOrder)) { |
| | | throw new CoolException("出库单状态修改失败!!"); |
| | | } |
| | | |
| | |
| | | } |
| | | for (LocItem locItem : locItems) { |
| | | if (sign){ |
| | | if (locItem.getType().equals(OrderWorkType.ORDER_WORK_TYPE_FEED_IN_MATERIAL_PREPARATION.type) || locItem.getType().equals(OrderWorkType.ORDER_WORK_TYPE_NORMAL_MATERIAL_PREPARATION.type) ) { |
| | | if (locItem.getType().equals(OrderType.ORDER_PRE.type) || locItem.getType().equals(OrderType.ORDER_PRE_NOT_OUT.type)) { |
| | | continue; |
| | | } |
| | | } |