提交 3eeed7b2 authored 作者: liuhaiquan's avatar liuhaiquan

修改业务信息

上级 5d19841c
...@@ -1177,6 +1177,7 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -1177,6 +1177,7 @@ public class OrderChildServiceImpl implements OrderChildService {
OrderChildBussInfoVO vo = OrderChildBussInfoVO.builder().completeNum(0).historyLoadWeight(new BigDecimal("0")) OrderChildBussInfoVO vo = OrderChildBussInfoVO.builder().completeNum(0).historyLoadWeight(new BigDecimal("0"))
.completeCarryWeight(new BigDecimal("0")).loseWeight(new BigDecimal("0")).loseRate(new BigDecimal("0")) .completeCarryWeight(new BigDecimal("0")).loseWeight(new BigDecimal("0")).loseRate(new BigDecimal("0"))
.overRate(new BigDecimal("0")).build(); .overRate(new BigDecimal("0")).build();
return vo;
} }
...@@ -1203,18 +1204,19 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -1203,18 +1204,19 @@ public class OrderChildServiceImpl implements OrderChildService {
BigDecimal loseWeight = BigDecimal.ZERO; BigDecimal loseWeight = BigDecimal.ZERO;
BigDecimal overWeight = BigDecimal.ZERO; BigDecimal overWeight = BigDecimal.ZERO;
if(complateCarryWeight.subtract(historyLoadWeight).compareTo(BigDecimal.ZERO) <= 0){ //卸车总量 大于 装车总量
if(complateCarryWeight.subtract(historyLoadWeight).compareTo(BigDecimal.ZERO) >= 0){
overWeight = complateCarryWeight.subtract(historyLoadWeight); //超吨 overWeight = complateCarryWeight.subtract(historyLoadWeight); //超吨
}else{ }else{
loseWeight = complateCarryWeight.subtract(historyLoadWeight);//亏吨 loseWeight = historyLoadWeight.subtract(complateCarryWeight);//亏吨
} }
BigDecimal loseRate = BigDecimal.ZERO; BigDecimal loseRate = BigDecimal.ZERO;
BigDecimal overRate = BigDecimal.ZERO; BigDecimal overRate = BigDecimal.ZERO;
//亏吨率 //亏吨率
if(historyLoadWeight.compareTo(BigDecimal.ZERO) != 0){ if(historyLoadWeight.compareTo(BigDecimal.ZERO) != 0){
loseRate = loseWeight.divide(historyLoadWeight,2,RoundingMode.HALF_UP); loseRate = loseWeight.divide(historyLoadWeight,2,RoundingMode.HALF_UP).multiply(new BigDecimal("100"));
overRate = overWeight.divide(historyLoadWeight,2,RoundingMode.HALF_UP); overRate = overWeight.divide(historyLoadWeight,2,RoundingMode.HALF_UP).multiply(new BigDecimal("100"));
} }
OrderChildBussInfoVO vo = OrderChildBussInfoVO.builder().completeNum(complateNum).historyLoadWeight(historyLoadWeight).completeCarryWeight(complateCarryWeight) OrderChildBussInfoVO vo = OrderChildBussInfoVO.builder().completeNum(complateNum).historyLoadWeight(historyLoadWeight).completeCarryWeight(complateCarryWeight)
.loseWeight(loseWeight).loseRate(loseRate).overRate(overRate).build(); .loseWeight(loseWeight).loseRate(loseRate).overRate(overRate).build();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论