feat: enforce canonical container identity across regions
This commit is contained in:
@@ -7,6 +7,7 @@ const PDA = '/api/platform/v1/first-leg/pda-loading'
|
||||
|
||||
import { oceanBookingDraft } from './ocean-booking-fixture.mjs'
|
||||
import { ensureMatsonCarrierPartner } from './carrier-partner-fixture.mjs'
|
||||
import { iso6346ContainerNumber } from './iso6346-container-number.mjs'
|
||||
|
||||
function id(value) { return value == null ? '' : String(value) }
|
||||
function code(response) { return id(response?.body?.code) || 'missing' }
|
||||
@@ -205,7 +206,7 @@ async function createReleasedBookingAndLink(context, fixture, chains) {
|
||||
const detailResponse = await context.request('GET', `${CONTAINERS}/${chain.containerBookingId}`)
|
||||
const detail = context.apiSuccess(MODULE, `${chain.label} 关联前读取柜版本`, detailResponse,
|
||||
evidence(detailResponse), OPTIONS)
|
||||
const containerNo = `CL${suffix}${index + 1}`.slice(0, 64)
|
||||
const containerNo = iso6346ContainerNumber(`${context.marker}-coload-${index + 1}`)
|
||||
const linkResponse = await context.request('POST', `${CONTAINERS}/${chain.containerBookingId}/ocean-booking-link`, {
|
||||
oceanBookingId, requirementId: id(requirement.id), containerNo,
|
||||
expectedVersion: Number(detail?.version),
|
||||
|
||||
Reference in New Issue
Block a user