|
@@ -2942,12 +2942,16 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
.set(BasePo::getUpdateTime, new Date())
|
|
|
);
|
|
|
|
|
|
+ Contract contract = this.getById(id);
|
|
|
+ Assert.notEmpty(contract, "查询不到销售订单信息!");
|
|
|
+
|
|
|
List<ContractProduct> productionOrderDetailList = contractProductService
|
|
|
.list(q -> q.eq(ContractProduct::getContractId, id));
|
|
|
|
|
|
//生成待出库数据
|
|
|
StockWait stockWait = new StockWait();
|
|
|
stockWait.setType(2);
|
|
|
+ stockWait.setBusinessCode(contract.getCode());
|
|
|
stockWait.setBusinessType(JournalType.SALE_OUT.getDetailType());
|
|
|
stockWait.setBusinessId(id);
|
|
|
stockWait.setStatus(0);
|
|
@@ -2960,6 +2964,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
stockWaitDetails.setProductId(contractProduct.getProductId());
|
|
|
stockWaitDetails.setQuantity(contractProduct.getQuantity());
|
|
|
stockWaitDetails.setReceiptQuantity(BigDecimal.ZERO);
|
|
|
+ stockWaitDetails.setBusinessDetailsId(contractProduct.getId());
|
|
|
stockWaitDetailsList.add(stockWaitDetails);
|
|
|
}
|
|
|
stockWaitDetailsService.saveBatch(stockWaitDetailsList);
|