|
|
@@ -1531,7 +1531,7 @@ public class AcceptCarriageOrderService {
|
|
|
});
|
|
|
}
|
|
|
/**是否是一级订单,是->推送至贸易,否,数据推送至物流订单上级*/
|
|
|
- if (logisticsOrder.getPid() == null && logisticsOrder.getType().equals("1")) {
|
|
|
+ if (logisticsOrder.getPid() == null && "1".equals(logisticsOrder.getType())) {
|
|
|
//数据推送至贸易订单
|
|
|
CompleteLogisticsOrderParam tradeOrder = new CompleteLogisticsOrderParam();
|
|
|
//todo 2023-09-07 修改为传递页面传输值 不传递总量
|
|
|
@@ -2923,8 +2923,8 @@ public class AcceptCarriageOrderService {
|
|
|
} else if (lastWeek.getTotalPrice().compareTo(new BigDecimal("0.00")) == 0) {
|
|
|
chainRatio = new BigDecimal("100.00").subtract(chainRatio);
|
|
|
} else {
|
|
|
- chainRatio = (currentWeek.getTotalPrice().subtract(lastWeek.getTotalPrice())).divide(lastWeek.getTotalPrice(), NumberConstant.SIX, BigDecimal.ROUND_HALF_UP)
|
|
|
- .multiply(new BigDecimal("100.00")).setScale(NumberConstant.TWO, BigDecimal.ROUND_HALF_UP);
|
|
|
+ chainRatio = (currentWeek.getTotalPrice().subtract(lastWeek.getTotalPrice())).divide(lastWeek.getTotalPrice(), NumberConstant.SIX, RoundingMode.HALF_UP)
|
|
|
+ .multiply(new BigDecimal("100.00")).setScale(NumberConstant.TWO, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
if (chainRatio.compareTo(new BigDecimal("0.00")) == -1) {
|
|
|
flag = 2;
|
|
|
@@ -2950,8 +2950,8 @@ public class AcceptCarriageOrderService {
|
|
|
} else if (lastWeek.getAmount().compareTo(new BigDecimal("0.00")) == 0) {
|
|
|
amountChainRatio = new BigDecimal("100.00").subtract(amountChainRatio);
|
|
|
} else {
|
|
|
- amountChainRatio = (currentWeek.getAmount().subtract(lastWeek.getAmount())).divide(lastWeek.getAmount(), NumberConstant.SIX, BigDecimal.ROUND_HALF_UP)
|
|
|
- .multiply(new BigDecimal("100.00")).setScale(NumberConstant.TWO, BigDecimal.ROUND_HALF_UP);
|
|
|
+ amountChainRatio = (currentWeek.getAmount().subtract(lastWeek.getAmount())).divide(lastWeek.getAmount(), NumberConstant.SIX, RoundingMode.HALF_UP)
|
|
|
+ .multiply(new BigDecimal("100.00")).setScale(NumberConstant.TWO, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
if (amountChainRatio.compareTo(new BigDecimal("0.00")) == -1) {
|
|
|
amountFlag = 2;
|
|
|
@@ -2979,8 +2979,8 @@ public class AcceptCarriageOrderService {
|
|
|
} else if (lastWeek.getWaitingAmount().compareTo(new BigDecimal("0.00")) == 0) {
|
|
|
chainRatio = new BigDecimal("100.00").subtract(chainRatio);
|
|
|
} else {
|
|
|
- chainRatio = (currentWeek.getWaitingAmount().subtract(lastWeek.getWaitingAmount())).divide(lastWeek.getWaitingAmount(), NumberConstant.SIX, BigDecimal.ROUND_HALF_UP)
|
|
|
- .multiply(new BigDecimal("100.00")).setScale(NumberConstant.TWO, BigDecimal.ROUND_HALF_UP);
|
|
|
+ chainRatio = (currentWeek.getWaitingAmount().subtract(lastWeek.getWaitingAmount())).divide(lastWeek.getWaitingAmount(), NumberConstant.SIX, RoundingMode.HALF_UP)
|
|
|
+ .multiply(new BigDecimal("100.00")).setScale(NumberConstant.TWO, RoundingMode.HALF_UP);
|
|
|
}
|
|
|
if (chainRatio.compareTo(new BigDecimal("0.00")) == -1) {
|
|
|
flag = 2;
|
|
|
@@ -3031,13 +3031,13 @@ public class AcceptCarriageOrderService {
|
|
|
|
|
|
List<LogisticsOrderStatisticsVO> list = logisticsOrderMapper.workbenchLogisticsOrderStatisticsByMonth(id, statusList,
|
|
|
OrderTypeEnum.ACCEPT_CARRIAGE_ORDER.getType(), dateStart, dateEnd, logisticsOrderStatistics.getTypeOne(), logisticsOrderStatistics.getTypeTwo());
|
|
|
- if (logisticsOrderStatistics.getTypeOne().equals("2")) {
|
|
|
+ if ("2".equals(logisticsOrderStatistics.getTypeOne())) {
|
|
|
list.forEach(vo -> {
|
|
|
vo.setTypeTwo(vo.getTypeTwo().setScale(2, RoundingMode.HALF_UP));
|
|
|
vo.setTypeOne(vo.getTypeOne().divide(new BigDecimal("10000")).setScale(2, RoundingMode.HALF_UP));
|
|
|
});
|
|
|
}
|
|
|
- if (logisticsOrderStatistics.getTypeTwo().equals("2")) {
|
|
|
+ if ("2".equals(logisticsOrderStatistics.getTypeTwo())) {
|
|
|
list.forEach(vo -> {
|
|
|
vo.setTypeOne(vo.getTypeOne().setScale(2, RoundingMode.HALF_UP));
|
|
|
vo.setTypeTwo(vo.getTypeTwo().divide(new BigDecimal("10000")).setScale(2, RoundingMode.HALF_UP));
|
|
|
@@ -3057,13 +3057,13 @@ public class AcceptCarriageOrderService {
|
|
|
String dateEnd = DateUtil.getLastWeekDateEndToString(0);
|
|
|
List<LogisticsOrderStatisticsVO> list = logisticsOrderMapper.workbenchLogisticsOrderStatisticsByDays(id, statusList,
|
|
|
OrderTypeEnum.ACCEPT_CARRIAGE_ORDER.getType(), dateStart, dateEnd, logisticsOrderStatistics.getTypeOne(), logisticsOrderStatistics.getTypeTwo());
|
|
|
- if (logisticsOrderStatistics.getTypeOne().equals("2")) {
|
|
|
+ if ("2".equals(logisticsOrderStatistics.getTypeOne())) {
|
|
|
list.forEach(vo -> {
|
|
|
vo.setTypeTwo(vo.getTypeTwo().setScale(2, RoundingMode.HALF_UP));
|
|
|
vo.setTypeOne(vo.getTypeOne().divide(new BigDecimal("10000")).setScale(2, RoundingMode.HALF_UP));
|
|
|
});
|
|
|
}
|
|
|
- if (logisticsOrderStatistics.getTypeTwo().equals("2")) {
|
|
|
+ if ("2".equals(logisticsOrderStatistics.getTypeTwo())) {
|
|
|
list.forEach(vo -> {
|
|
|
vo.setTypeOne(vo.getTypeOne().setScale(2, RoundingMode.HALF_UP));
|
|
|
vo.setTypeTwo(vo.getTypeTwo().divide(new BigDecimal("10000")).setScale(2, RoundingMode.HALF_UP));
|