Commit e5202df4 by xiaoer.li@freemud.com

去掉行记录计算

parent cee05f47
...@@ -138,11 +138,11 @@ public class MaterialPromotionService implements IPromotionService { ...@@ -138,11 +138,11 @@ public class MaterialPromotionService implements IPromotionService {
pk = shoppingCartConvertAdapter.jointPk(material.getCartGoodsUid(), material.getGoodsId()); pk = shoppingCartConvertAdapter.jointPk(material.getCartGoodsUid(), material.getGoodsId());
if (mApportion.get(pk) == null) { if (mApportion.get(pk) == null) {
MaterialApportion materialApportion = new MaterialApportion(); MaterialApportion materialApportion = new MaterialApportion();
materialApportion.setSalePrice(material.getNowPrice()); //materialApportion.setSalePrice(material.getNowPrice());
materialApportion.setAmount(material.getNowPrice() * material.getGoodsQuantity()); //materialApportion.setAmount(material.getNowPrice() * material.getGoodsQuantity());
materialApportion.setApportionAmount(material.getApportionAmount() * material.getGoodsQuantity()); materialApportion.setApportionAmount(material.getApportionAmount() * material.getGoodsQuantity());
materialApportion.setGoodsId(material.getGoodsId()); materialApportion.setGoodsId(material.getGoodsId());
materialApportion.setTotalDiscountAmount(material.getApportionAmount()*material.getGoodsQuantity()); materialApportion.setTotalDiscountAmount(material.getApportionAmount() * material.getGoodsQuantity());
materialApportion.setPk(pk); materialApportion.setPk(pk);
ApportionDetails apportionDetails = new ApportionDetails(); ApportionDetails apportionDetails = new ApportionDetails();
if (CollectionUtils.isNotEmpty(material.getApportionDetails())) { if (CollectionUtils.isNotEmpty(material.getApportionDetails())) {
...@@ -155,10 +155,10 @@ public class MaterialPromotionService implements IPromotionService { ...@@ -155,10 +155,10 @@ public class MaterialPromotionService implements IPromotionService {
continue; continue;
} }
MaterialApportion apportion = mApportion.get(pk); MaterialApportion apportion = mApportion.get(pk);
apportion.setSalePrice(apportion.getSalePrice() + material.getNowPrice()); //apportion.setSalePrice(apportion.getSalePrice() + material.getNowPrice());
apportion.setAmount(apportion.getAmount() + material.getNowPrice() * material.getGoodsQuantity()); //apportion.setAmount(apportion.getAmount() + material.getNowPrice() * material.getGoodsQuantity());
apportion.setApportionAmount(apportion.getApportionAmount() + material.getApportionAmount() * material.getGoodsQuantity()); apportion.setApportionAmount(apportion.getApportionAmount() + material.getApportionAmount() * material.getGoodsQuantity());
apportion.setTotalDiscountAmount(apportion.getTotalDiscountAmount()+material.getApportionAmount()*material.getGoodsQuantity()); apportion.setTotalDiscountAmount(apportion.getTotalDiscountAmount() + material.getApportionAmount() * material.getGoodsQuantity());
mApportion.put(pk, apportion); mApportion.put(pk, apportion);
} }
} }
......
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