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())) {
|
||||
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());
|
||||
if (exists != null && exists.intValue() == 0) throw bad("柜内订单不存在或不属于客户");
|
||||
// The Firstleg snapshot is the authoritative ownership check for
|
||||
// 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