Commit cc595960 authored by liuzeheng's avatar liuzeheng

优化

parent 6fc4a7ce
......@@ -3329,8 +3329,11 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
ProductPriceStepDO clear = new ProductPriceStepDO();
if(createReqVO.getPriceType()==1){
if(CollectionUtil.isNotEmpty(respVO.getFullPricePackagingList())){
List<ProductPriceStepPackagingDO> specialDOList = new ArrayList<>();
List<ProductPriceStepPackagingDO> packagingList = new ArrayList<>();
respVO.getFullPricePackagingList().forEach(pack->{
createReqVO.setFreightPriceStepList(respVO.getFreightPriceStepList());
ProductPriceStepDO packagingDO = new ProductPriceStepDO() ;
BeanUtils.copyProperties(pack,packagingDO);
packagingDO.setId(null);
......@@ -3340,12 +3343,28 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
// packagingDO.setTransportPrice(pack.getPackagingPrice());
// packagingDO.setTransportPriceUnit(pack.getPackagingPriceUnit());
// packagingDO.setTransportVolumeUnit(pack.getPackagingVolumeUnit());
packagingDO.setAllPrice(pack.getPackagingPrice());
packagingDO.setAllPriceUnit(pack.getPackagingPriceUnit()) ;
packagingDO.setAllVolumeUnit(pack.getPackagingVolumeUnit());
packagingDO.setAllPrice(respVO.getAllPrice());
packagingDO.setAllPriceUnit(respVO.getAllPriceUnit()) ;
packagingDO.setAllVolumeUnit(respVO.getAllVolumeUnit());
if(CollectionUtil.isNotEmpty(respVO.getSpecialList())){
List<ProductPriceStepSpecialDO> specialList = new ArrayList<>();
respVO.getSpecialList().forEach(sp->{
ProductPriceStepSpecialDO specialDO = new ProductPriceStepSpecialDO();
BeanUtils.copyProperties(sp,specialDO);
specialDO.setId(null);
specialList.add(specialDO);
});
packagingDO.setSpecialList(specialList);
}
ProductPriceStepPackagingDO stepPackagingDO = new ProductPriceStepPackagingDO() ;
BeanUtils.copyProperties(pack,stepPackagingDO);
packagingList.add(stepPackagingDO);
packagingDO.setPackagingList(packagingList);
fullPriceStepList.add(packagingDO) ;
});
createReqVO.setFullPriceStepList(fullPriceStepList);
}
}else{
if(CollectionUtil.isEmpty(respVO.getFreightPriceStepList()) ){
......@@ -3698,6 +3717,28 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
initBasePrice(dbItem, transportType);
insertList1.add(dbItem);
}
// if(stepItem.getPriceType()==1){
//
// ProductPricePackagingDO pricePackagingDO = new ProductPricePackagingDO() ;
// BeanUtils.copyProperties(stepItem,pricePackagingDO);
// pricePackagingDO.setId(null);
// pricePackagingDO.setProductPriceId(productPriceId) ;
// productPricePackagingDOS.add(pricePackagingDO);
//
// }else {
// if(CollectionUtil.isNotEmpty(stepItem.getPackagingList())){
// stepItem.getPackagingList().forEach(pg->{
// ProductPricePackagingDO pricePackagingDO = new ProductPricePackagingDO() ;
// BeanUtils.copyProperties(pg,pricePackagingDO);
// pricePackagingDO.setId(null);
// pricePackagingDO.setProductPriceId(productPriceId) ;
// pricePackagingDO.setPriceType(stepItem.getPriceType()) ;
// productPricePackagingDOS.add(pricePackagingDO);
//
// });
// }
// }
if(CollectionUtil.isNotEmpty(stepItem.getPackagingList())){
stepItem.getPackagingList().forEach(pg->{
ProductPricePackagingDO pricePackagingDO = new ProductPricePackagingDO() ;
......@@ -3709,7 +3750,6 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
});
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment