fix(scripts): read domestic container list payload
This commit is contained in:
@@ -473,8 +473,10 @@ export async function run(context) {
|
||||
`containerBookingId=${containerId}, cabinetNo=${linkedContainer?.cabinetNo || 'missing'}, loadingPlanId=${id(afterLinkPlan?.id) || 'missing'}`, OPTIONS)
|
||||
|
||||
const activeContainersResponse = await context.request('GET',
|
||||
`${CONTAINERS}?page=1&size=50&keyword=${encodeURIComponent(realContainerNo)}`)
|
||||
const activeContainers = context.apiSuccess(MODULE, '关联后按真实柜号回查正常货柜列表', activeContainersResponse, '', OPTIONS)
|
||||
`${CONTAINERS}/domestic?page=1&size=50&keyword=${encodeURIComponent(realContainerNo)}`)
|
||||
const activeWorkbench = context.apiSuccess(MODULE, '关联后按真实柜号回查正常货柜列表', activeContainersResponse, '', OPTIONS)
|
||||
const activeContainers = { ...activeWorkbench,
|
||||
records: records(activeWorkbench).map((item) => item?.container).filter(Boolean) }
|
||||
const activeRealRows = records(activeContainers).filter((item) => item.containerNo === realContainerNo)
|
||||
context.assert(MODULE, '关联后列表仅保留模拟柜原地补全的一条 ACTIVE 操作身份', activeContainersResponse,
|
||||
activeRealRows.length === 1 && id(activeRealRows[0]?.id) === containerId,
|
||||
|
||||
Reference in New Issue
Block a user