|
@@ -905,7 +905,7 @@ public class KwtWaybillOrderV1Service {
|
|
|
BigDecimal truckEntrustAmount = truckTotalEntrustAmount.get(orderAmount.getLAddressId());
|
|
BigDecimal truckEntrustAmount = truckTotalEntrustAmount.get(orderAmount.getLAddressId());
|
|
|
//剩余可运量 = 当前上游委派量 - 历史下游司机委派量 - 分包量
|
|
//剩余可运量 = 当前上游委派量 - 历史下游司机委派量 - 分包量
|
|
|
BigDecimal surplusAmount = orderAmount.getAmount().subtract(orderAmount.getEntrustAmount()).subtract(orderAmount.getSubcontractAmount());
|
|
BigDecimal surplusAmount = orderAmount.getAmount().subtract(orderAmount.getEntrustAmount()).subtract(orderAmount.getSubcontractAmount());
|
|
|
- if (surplusAmount.doubleValue() > orderAmount.getAmount().doubleValue()) {
|
|
|
|
|
|
|
+ if (surplusAmount.doubleValue() < truckEntrustAmount.doubleValue()) {
|
|
|
KwtLogisticsOrderAddress address = logisticsOrderAddressDao.selectById(orderAmount.getLAddressId());
|
|
KwtLogisticsOrderAddress address = logisticsOrderAddressDao.selectById(orderAmount.getLAddressId());
|
|
|
return HttpResult.error(address.getName() + "剩余量为" + surplusAmount.doubleValue()
|
|
return HttpResult.error(address.getName() + "剩余量为" + surplusAmount.doubleValue()
|
|
|
+ ",当前累计派车量为" + truckEntrustAmount.doubleValue() +",可运量小于累计派车量则不能派车!");
|
|
+ ",当前累计派车量为" + truckEntrustAmount.doubleValue() +",可运量小于累计派车量则不能派车!");
|