| | |
| | | //删除所有明细 |
| | | outboundDetailService.remove(new LambdaQueryWrapper<OutboundDetail>() |
| | | .eq(OutboundDetail::getOutStorehouseId, outboundOrder.getId())); |
| | | OutboundOrder outboundOrderUpdate = BeanUtil.copyProperties(outboundOrder, OutboundOrder.class); |
| | | OutboundOrder outboundOrderUpdate = OutboundOrderConvert.INSTANCE.convert(outboundOrder); |
| | | outboundOrderMapper.updateById(outboundOrderUpdate); |
| | | List<OutboundDetail> detailList = CollectionUtil.newArrayList(); |
| | | outboundOrder.getOutboundDetailList().forEach(item->{ |
| | |
| | | if (!Objects.equals(outboundOrder.getOrderStatus(), OutBillStatus.DRAFT.getValue())) { |
| | | throw new JeecgBootException("无法提交非草稿状态的出库申请单!"); |
| | | } |
| | | //锁定申请单明细中工具库存 |
| | | if (lockOutboundStock(id)) { |
| | | //启动流程 |
| | | if (triggerProcess(outboundOrder)) { |
| | | outboundOrder.setOrderStatus(OutBillStatus.SUBMITTED.getValue()); |
| | | updateById(outboundOrder); |
| | | } |
| | | if (!OutStorehouseType.PREPARATION_OUTBOUND.getValue().equals(outboundOrder.getOutStorehouseType())) { |
| | | //不是从准备单转入的出库申请,执行锁库 |
| | | lockOutboundStock(id); |
| | | } |
| | | //启动流程 |
| | | if (triggerProcess(outboundOrder)) { |
| | | outboundOrder.setOrderStatus(OutBillStatus.SUBMITTED.getValue()); |
| | | updateById(outboundOrder); |
| | | } |
| | | } |
| | | |