@ -172,7 +172,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity . setWaybillNumber ( waybillNo ) ;
distributionStockArticleEntity . setWaybillNumber ( waybillNo ) ;
distributionStockArticleEntity . setWaybillId ( warehouseWaybill . getId ( ) ) ;
distributionStockArticleEntity . setWaybillId ( warehouseWaybill . getId ( ) ) ;
distributionStockArticleEntity . setWarehouseId ( basicdataWarehouseEntity . getId ( ) ) ;
distributionStockArticleEntity . setWarehouseId ( basicdataWarehouseEntity . getId ( ) ) ;
distributionStockArticleEntity . setMallName ( warehouseWaybill . getConsigneeName ( ) ) ;
distributionStockArticleEntity . setMallName ( warehouseWaybill . getConsignee ( ) ) ;
distributionStockArticleEntity . setMallId ( warehouseWaybill . getConsigneeId ( ) ) ;
distributionStockArticleEntity . setMallId ( warehouseWaybill . getConsigneeId ( ) ) ;
distributionStockArticleEntity . setDescriptionGoods ( warehouseWaybill . getGoodsName ( ) ) ;
distributionStockArticleEntity . setDescriptionGoods ( warehouseWaybill . getGoodsName ( ) ) ;
distributionStockArticleEntity . setWarehouse ( basicdataWarehouseEntity . getName ( ) ) ;
distributionStockArticleEntity . setWarehouse ( basicdataWarehouseEntity . getName ( ) ) ;
@ -197,7 +197,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
distributionStockArticleEntity . setTypeService ( basicdataStoreBusinessEntity . getMold ( ) ) ;
distributionStockArticleEntity . setTypeService ( basicdataStoreBusinessEntity . getMold ( ) ) ;
}
}
}
}
distributionStockArticleEntity . setCustomerName ( customerName ) ;
distributionStockArticleEntity . setCustomerName ( warehouseWaybill . getConsigneeName ( ) ) ;
distributionStockArticleEntity . setCustomerTelephone ( warehouseWaybill . getConsigneeMobile ( ) ) ;
distributionStockArticleEntity . setCustomerTelephone ( warehouseWaybill . getConsigneeMobile ( ) ) ;
distributionStockArticleEntity . setCustomerAddress ( warehouseWaybill . getConsigneeAddress ( ) ) ;
distributionStockArticleEntity . setCustomerAddress ( warehouseWaybill . getConsigneeAddress ( ) ) ;
distributionStockArticleEntity . setGenre ( 1 ) ;
distributionStockArticleEntity . setGenre ( 1 ) ;
@ -235,6 +235,23 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
log . warn ( "#################createStockArticle: 保存订单信息失败 orderSelfNum={}" , waybillNo ) ;
log . warn ( "#################createStockArticle: 保存订单信息失败 orderSelfNum={}" , waybillNo ) ;
throw new CustomerException ( 405 , "保存订单信息失败" ) ;
throw new CustomerException ( 405 , "保存订单信息失败" ) ;
}
}
//第一次生成订单也要生成包件信息
List < DistributionParcelListEntity > ls = new ArrayList < > ( ) ;
for ( WarehouseWayBillDetail warehouseWayBillDetail : details ) {
DistributionParcelListEntity entity = new DistributionParcelListEntity ( ) ;
entity . setMaterialName ( warehouseWayBillDetail . getProductName ( ) ) ;
entity . setQuantity ( warehouseWayBillDetail . getNum ( ) ) ;
entity . setConditions ( 3 ) ;
entity . setStockArticleId ( id ) ;
ls . add ( entity ) ;
}
boolean b = distributionParcelListClient . addBatch ( ls ) ;
if ( ! b ) {
log . warn ( "#################createStockArticle: 保存包件信息失败 orderSelfNum={}" , waybillNo ) ;
throw new CustomerException ( 405 , "保存包件信息失败" ) ;
}
} else {
} else {
id = distributionStockArticleEntity . getId ( ) ;
id = distributionStockArticleEntity . getId ( ) ;