fix container cost snapshot validation
This commit is contained in:
@@ -260,8 +260,9 @@ public class FinanceService {
|
|||||||
|| row.volumeCbm() == null || row.volumeCbm().signum() <= 0 || !seen.add(row.orderId())) {
|
|| row.volumeCbm() == null || row.volumeCbm().signum() <= 0 || !seen.add(row.orderId())) {
|
||||||
throw bad("柜次、订单、客户归属或体积无效");
|
throw bad("柜次、订单、客户归属或体积无效");
|
||||||
}
|
}
|
||||||
Number exists = jdbc.queryForObject("SELECT COUNT(*) FROM fin_fee_source WHERE customer_id=? AND order_id=? AND status='AVAILABLE'", Number.class, tenantId, row.orderId());
|
// The Firstleg snapshot is the authoritative ownership check for
|
||||||
if (exists != null && exists.intValue() == 0) throw bad("柜内订单不存在或不属于客户");
|
// container costs. Fee sources may still be PENDING while a
|
||||||
|
// completed loading plan is already eligible for allocation.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user