|
@@ -804,9 +804,6 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
parentGoodsAddTotalPriceMap.put(sellOrder.getParentGoodsId(),parentTotalGoodsPrice.subtract(totalGoodsPrice));
|
|
|
}else if(parentTotalGoodsPrice.compareTo(totalGoodsPrice) == -1){//小于
|
|
|
parentGoodsCutTotalPriceMap.put(sellOrder.getParentGoodsId(),totalGoodsPrice.subtract(parentTotalGoodsPrice));
|
|
|
- }else {
|
|
|
- parentGoodsCutTotalPriceMap.put(sellOrder.getParentGoodsId(),BigDecimal.ZERO);
|
|
|
- parentGoodsAddTotalPriceMap.put(sellOrder.getParentGoodsId(),BigDecimal.ZERO);
|
|
|
}
|
|
|
}
|
|
|
//分配组合商品的中单个商品的价格
|
|
@@ -830,7 +827,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
//获取比例
|
|
|
BigDecimal ratioAmount = sellDto.getTotalGoodsPrice().divide(divide, 6, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
- if(addTotalPrice.doubleValue() > 0l){
|
|
|
+ if(addTotalPrice != null && addTotalPrice.doubleValue() > 0l){
|
|
|
//如果是最后一件商品
|
|
|
if(i == integers.size() - 1){
|
|
|
sellDto.setTotalGoodsPrice(sellDto.getTotalGoodsPrice().add(usableParentGoodsAddTotalPrice));
|
|
@@ -841,7 +838,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
usableParentGoodsAddTotalPrice = usableParentGoodsAddTotalPrice.subtract(multiply);
|
|
|
}
|
|
|
sellDto.setGoodsPrice(sellDto.getTotalGoodsPrice());
|
|
|
- }else if(cutTotalPrice.doubleValue() > 0l){
|
|
|
+ }else if(cutTotalPrice != null && cutTotalPrice.doubleValue() > 0l){
|
|
|
//如果是最后一件商品
|
|
|
if(i == integers.size() - 1){
|
|
|
sellDto.setTotalGoodsPrice(sellDto.getTotalGoodsPrice().subtract(usableParentGoodsCutTotalPrice));
|