fix(scripts): use domestic container detail route

This commit is contained in:
2026-09-08 23:06:07 +08:00
parent f7f4c80806
commit 00990fedcc
6 changed files with 32 additions and 5 deletions
@@ -258,7 +258,7 @@ export async function run(context) {
}
}
const containerDetailResponse = await context.request('GET', `${CONTAINERS}/${containerId}`)
const containerDetailResponse = await context.request('GET', `${CONTAINERS}/domestic/${containerId}`)
const containerDetail = context.apiSuccess(MODULE, '回查货柜详情', containerDetailResponse, '', OPTIONS)
context.assert(MODULE, '货柜详情保留候选货物路线约束', containerDetailResponse,
(!containerDetail?.destinationWarehouseCode || !candidate.destinationWarehouseCode
@@ -398,7 +398,7 @@ export async function run(context) {
unlinkedTaskAbsent, responseEvidence(unlinkedTaskResponse), OPTIONS)
if (!unlinkedTaskAbsent) return
const simulationBeforeLinkResponse = await context.request('GET', `${CONTAINERS}/${containerId}`)
const simulationBeforeLinkResponse = await context.request('GET', `${CONTAINERS}/domestic/${containerId}`)
const simulationBeforeLink = context.apiSuccess(MODULE, '预装确认前读取模拟柜最新版本', simulationBeforeLinkResponse, '', OPTIONS)
if (!Number.isInteger(Number(simulationBeforeLink?.version))) return
@@ -589,7 +589,7 @@ export async function run(context) {
`taskId=${taskId || 'missing'}, itemId=${id(pickItem?.id) || 'missing'}`, OPTIONS)
if (!taskId || !pickItem?.id) return
const releasedContainerResponse = await context.request('GET', `${CONTAINERS}/${containerId}`)
const releasedContainerResponse = await context.request('GET', `${CONTAINERS}/domestic/${containerId}`)
const releasedContainer = context.apiSuccess(MODULE, '任务生成后回查货柜运输版本', releasedContainerResponse, '', OPTIONS)
const stableIdentity = {