|
|
@@ -153,18 +153,18 @@ public class LogisticsConsignmentService {
|
|
|
OrderDetailRes tradeOrder = tradeOrderInfoService.getOrderDetailById(Long.parseLong(bo.getTOrderId()));
|
|
|
if (tradeOrder == null) {
|
|
|
log.error("订单id查找失败:{}", bo.getTOrderId());
|
|
|
- throw new RuntimeException("单据错误,数据不存在");
|
|
|
+ throw new BusinessException("单据错误,数据不存在");
|
|
|
}
|
|
|
KwtLogisticsOrder order = new KwtLogisticsOrder();
|
|
|
if (!bo.getIsFullDose()) {
|
|
|
BigDecimal amount = bo.getAmount();
|
|
|
BigDecimal carryingCapacity = bo.getCarryingCapacity();
|
|
|
- if (carryingCapacity.compareTo(amount) < 0) {
|
|
|
+ if (amount.compareTo(carryingCapacity) < 0) {
|
|
|
log.error("可分配量分配错误:{}", bo.getTOrderId());
|
|
|
- throw new RuntimeException("可分配量分配错误");
|
|
|
+ throw new BusinessException("可分配量分配错误");
|
|
|
}
|
|
|
if (ArrayUtil.isEmpty(bo.getCarryingCapacity())) {
|
|
|
- throw new RuntimeException("不是全量分配时,分配量不能为空!");
|
|
|
+ throw new BusinessException("不是全量分配时,分配量不能为空!");
|
|
|
}
|
|
|
order.setAmount(bo.getCarryingCapacity());
|
|
|
} else {
|