|
|
@ -62,6 +62,9 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService |
|
|
|
private SysSalesShippingInformMapper shippingInformMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SysSalesShippingInformDetailMapper shippingInformDetailMapper; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询仓库出库单 |
|
|
|
* |
|
|
@ -232,8 +235,20 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService |
|
|
|
sysSalesOrderChild.setQuoteId(warehouseOutOrder.getSalesOrderCode()); |
|
|
|
sysSalesOrderChild.setMaterialCode(warehouseOutOrderDetail.getMaterialNo()); |
|
|
|
sysSalesOrderChild.setOutBoundQuantity(warehouseOutOrderDetail.getActualOutOrderSum()); |
|
|
|
sysSalesOrderChild.setUpdateBy(loginName); |
|
|
|
sysSalesOrderChild.setUpdateTime(new Date()); |
|
|
|
int updateSalesOrderChildResult = salesOrderChildMapper.updateSysSalesOrderChildByCodeAndQuoteId(sysSalesOrderChild); |
|
|
|
if (updateSalesOrderChildResult <= 0){ |
|
|
|
throw new BusinessException("更新销售订单子表数据失败"); |
|
|
|
} |
|
|
|
SysSalesShippingInformDetail sysSalesShippingInformDetail = new SysSalesShippingInformDetail(); |
|
|
|
sysSalesShippingInformDetail.setHasOutOrderNum(warehouseOutOrderDetail.getActualOutOrderSum()); |
|
|
|
sysSalesShippingInformDetail.setUpdateBy(loginName); |
|
|
|
sysSalesShippingInformDetail.setUpdateTime(new Date()); |
|
|
|
sysSalesShippingInformDetail.setOutOrderCode(warehouseOutOrder.getOutOrderCode()); |
|
|
|
sysSalesShippingInformDetail.setMaterialNo(warehouseOutOrderDetail.getMaterialNo()); |
|
|
|
int updateShippingInformDetailResult = shippingInformDetailMapper.updateSysSalesShippingInformDetailByCodeAndNo(sysSalesShippingInformDetail); |
|
|
|
if (updateShippingInformDetailResult <= 0){ |
|
|
|
throw new BusinessException("更新销售出库详情数据失败"); |
|
|
|
} |
|
|
|
warehouseOutOrderDetail.setUpdateBy(loginName); |
|
|
@ -579,6 +594,18 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService |
|
|
|
|
|
|
|
WarehouseOutOrder warehouseOutOrder = new WarehouseOutOrder(); |
|
|
|
warehouseOutOrder.setOutOrderCode(outOrderCode); |
|
|
|
//添加生产单号
|
|
|
|
SysMakeOrder makeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); |
|
|
|
if (makeOrder == null){ |
|
|
|
log.warn("生产订单编号为空:{}",makeOrder.getMakeNo()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
warehouseOutOrder.setDeliveryName(sysSalesOrderVo.getCustomerDelivery()); |
|
|
|
warehouseOutOrder.setDeliveryNumber(sysSalesOrderVo.getDeliveryPhone()); |
|
|
|
warehouseOutOrder.setDeliveryAddress(sysSalesOrderVo.getDeliveryAddress()); |
|
|
|
|
|
|
|
warehouseOutOrder.setMakeNo(makeOrder.getMakeNo()); |
|
|
|
//出库状态为 待仓库准备物料
|
|
|
|
warehouseOutOrder.setWarehouseOutStatus("0"); |
|
|
|
warehouseOutOrder.setRelatedOrderCode(salesOrderCode); |
|
|
@ -587,10 +614,17 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService |
|
|
|
warehouseOutOrder.setWarehouseOrderType("0"); |
|
|
|
//出库类型设置为 销售出库
|
|
|
|
warehouseOutOrder.setWarehouseOutType("0"); |
|
|
|
|
|
|
|
//物料合计
|
|
|
|
warehouseOutOrder.setMaterialSum(Math.toIntExact(sysSalesOrderVo.getMaterialSum())); |
|
|
|
//数量合计
|
|
|
|
warehouseOutOrder.setEnterpriseSum(Math.toIntExact(sysSalesOrderVo.getEnterpriseSum())); |
|
|
|
|
|
|
|
|
|
|
|
warehouseOutOrder.setBusinessName(sysSalesOrderVo.getBusinessMembers()); |
|
|
|
warehouseOutOrder.setCustomerId(sysSalesOrderVo.getEnterpriseCode()); |
|
|
|
warehouseOutOrder.setCustomerName(sysSalesOrderVo.getEnterpriseName()); |
|
|
|
warehouseOutOrder.setApplyName(sysSalesOrderVo.getApplyUserName()); |
|
|
|
warehouseOutOrder.setApplyName(sysSalesOrderVo.getApplyUser()); |
|
|
|
warehouseOutOrder.setDeliveryCondition(sysSalesOrderVo.getDeliveryConditions()); |
|
|
|
warehouseOutOrder.setCreateTime(new Date()); |
|
|
|
warehouseOutOrder.setCreateBy(ShiroUtils.getLoginName()); |
|
|
|