|
|
|
@ -252,7 +252,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//第一次生成订单也要生成包件信息
|
|
|
|
|
List<DistributionParcelListEntity> ls = new ArrayList<>(); |
|
|
|
|
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>(); |
|
|
|
|
for (WarehouseWayBillDetail warehouseWayBillDetail : details) { |
|
|
|
|
DistributionParcelListEntity entity = new DistributionParcelListEntity(); |
|
|
|
|
entity.setFirsts(warehouseWayBillDetail.getProductName()); |
|
|
|
@ -278,20 +278,15 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
entity.setSendWarehouseName(warehouseWaybill.getDepartureWarehouseName()); |
|
|
|
|
entity.setAcceptWarehouseId(warehouseWaybill.getDestinationWarehouseId()); |
|
|
|
|
entity.setAcceptWarehouseName(warehouseWaybill.getDestinationWarehouseName()); |
|
|
|
|
ls.add(entity); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
boolean b = distributionParcelListClient.addBatch(ls); |
|
|
|
|
if (!b) { |
|
|
|
|
log.warn("#################createStockArticle: 保存包件信息失败 orderSelfNum={}", waybillNo); |
|
|
|
|
throw new CustomerException(405, "保存包件信息失败"); |
|
|
|
|
} |
|
|
|
|
Long aLong = distributionParcelListClient.addReturnId(entity); |
|
|
|
|
|
|
|
|
|
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>(); |
|
|
|
|
for (DistributionParcelListEntity entity:ls){ |
|
|
|
|
DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity(); |
|
|
|
|
parcelNumberEntity.setStockArticleId(id); |
|
|
|
|
parcelNumberEntity.setParcelListId(entity.getId()); |
|
|
|
|
parcelNumberEntity.setParcelListId(aLong); |
|
|
|
|
parcelNumberEntity.setTenantId("627683"); |
|
|
|
|
parcelNumberEntity.setCreateUser(distributionStockArticleEntity.getCreateUser()); |
|
|
|
|
parcelNumberEntity.setUpdateUser(distributionStockArticleEntity.getCreateUser()); |
|
|
|
|
parcelNumberEntity.setCreateDept(distributionStockArticleEntity.getCreateDept()); |
|
|
|
|
if(totalCount.equals(stockCount)){ |
|
|
|
|
parcelNumberEntity.setHandQuantity(entity.getQuantity()); |
|
|
|
|
}else{ |
|
|
|
@ -302,9 +297,11 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
parcelNumberEntity.setSigninQuantity(0); |
|
|
|
|
parcelNumberEntity.setOutboundQuantity(0); |
|
|
|
|
parcelNumberList.add(parcelNumberEntity); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//存入零担订单包件数量
|
|
|
|
|
distributionParcelNumberClient.addBatch(parcelNumberList); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
id = distributionStockArticleEntity.getId(); |
|
|
|
|