| | |
| | | |
| | | if (salesLedger != null) { |
| | | if(status.equals(2)){ |
| | | // 审批完成 -> 自动扣除库存 |
| | | try { |
| | | shippingInfoService.deductStockByOrder(salesLedger.getId(), null); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("自动扣除库存失败: " + e.getMessage()); |
| | | } |
| | | // 审批完成 -> 修改状态为审核通过,不扣除库存 (扣除库存移至发货台账补充信息阶段) |
| | | updateSalesLedgerDeliveryStatus(salesLedger.getId(), 4); |
| | | updateShippingInfoStatusByOrder(salesLedger.getId(), "审核通过"); |
| | | } else if(status.equals(3)){ |
| | | updateSalesLedgerDeliveryStatus(salesLedger.getId(), 3); |
| | | // 更新关联的发货记录为审核拒绝 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 绑定附件 |
| | | if(!CollectionUtils.isEmpty(approveNode.getTempFileIds()) && approveNode.getApproveNodeStatus() == 1){ |
| | | tempFileService.migrateTempFilesToFormal(approveNode.getId(), approveNode.getTempFileIds(), FileNameType.ApproveNode.getValue()); |