提交 8665bbad authored 作者: aiqingguo's avatar aiqingguo

Merge branch 'v4.9_create_goods_child_20230918' into test

......@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
......@@ -167,11 +168,11 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
if (orderChild.getUnloadNet() != null){
BigDecimal dif = orderChild.getUnloadNet().subtract(orderChild.getWeight());
if (dif.compareTo(BigDecimal.ZERO) < 0){
totalFreight.subtract(orderChild.getLossPrice().multiply(dif));
totalFreight = totalFreight.add(orderChild.getLossPrice().multiply(dif));
}
}
return totalFreight.setScale(0, BigDecimal.ROUND_HALF_UP);
return totalFreight.setScale(0, RoundingMode.HALF_UP);
}
}
......@@ -1051,11 +1051,11 @@ public class OrderChildServiceImpl implements OrderChildService {
if (orderChild.getUnloadNet() != null){
BigDecimal dif = orderChild.getUnloadNet().subtract(orderChild.getWeight());
if (dif.compareTo(BigDecimal.ZERO) < 0){
totalFreight.subtract(orderChild.getLossPrice().multiply(dif));
totalFreight = totalFreight.add(orderChild.getLossPrice().multiply(dif));
}
}
return totalFreight.setScale(0, BigDecimal.ROUND_HALF_UP);
return totalFreight.setScale(0, RoundingMode.HALF_UP);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论