|
|
@@ -423,8 +423,8 @@ public class KwTransportService {
|
|
|
vo.setDeficitAmount(String.valueOf(deficitAmount));
|
|
|
// 存在装卸货差时 计算扣亏量
|
|
|
BigDecimal lossAmount = BigDecimal.valueOf(0);
|
|
|
- BigDecimal loss = waybillOrder.getLoss() == null ? BigDecimal.valueOf(0) : waybillOrder.getLoss();
|
|
|
- if(deficitAmount.compareTo(BigDecimal.valueOf(0)) > 0 && loss.compareTo(BigDecimal.valueOf(0)) > 0) {
|
|
|
+ BigDecimal loss = waybillOrder.getLoss() == null ? new BigDecimal("0.00") : waybillOrder.getLoss();
|
|
|
+ if(deficitAmount.compareTo(new BigDecimal("0.00")) > 0 && loss.compareTo(new BigDecimal("0.00")) > 0) {
|
|
|
String lossUnit = waybillOrder.getLossUnit();
|
|
|
Map<String, SysDictResDto> LossUnitType = remoteSystemService.queryDictMapByType(DictTypeEnum.TAX_RATE_TYPE.getType());
|
|
|
SysDictResDto sysDictRes = LossUnitType.get(lossUnit);
|
|
|
@@ -437,8 +437,8 @@ public class KwTransportService {
|
|
|
lossAmount = loss.multiply(waybillOrder.getLoadAmount()).divide(BigDecimal.valueOf(1000));
|
|
|
}
|
|
|
lossAmount = deficitAmount.subtract(lossAmount);
|
|
|
- if(lossAmount.compareTo(BigDecimal.valueOf(0)) < 0) {
|
|
|
- lossAmount = BigDecimal.valueOf(0);
|
|
|
+ if(lossAmount.compareTo(new BigDecimal("0.00")) < 0) {
|
|
|
+ lossAmount = new BigDecimal("0.00");
|
|
|
}
|
|
|
}
|
|
|
// 实际扣亏量
|