优化
This commit is contained in:
@@ -69,14 +69,11 @@ export async function run(context) {
|
||||
if (before?.summary?.processStatus !== 'LOADING' || !Number.isInteger(version)) return
|
||||
|
||||
const base = `/api/platform/v1/inbounds/${inboundId}`
|
||||
const truck = context.createdResources?.serviceCenterFlow
|
||||
const customs = context.createdResources?.phase3Customs
|
||||
context.assert(MODULE, '最终完成前拖车与报关清关门禁属于同一稳定柜次', beforeResponse,
|
||||
truck?.marker === context.marker && truck?.finalStatus === 'COMPLETED'
|
||||
&& id(truck?.containerBookingId) === containerBookingId
|
||||
&& customs?.marker === context.marker && customs?.finalStatus === 'CLEARANCE_COMPLETED'
|
||||
&& id(customs?.containerBookingId) === containerBookingId,
|
||||
`truck=${truck?.finalStatus || 'missing'}, customs=${customs?.finalStatus || 'missing'}, containerBookingId=${containerBookingId}`, OPTIONS)
|
||||
context.addCoverageGap(MODULE, OPTIONS.scenario, 'PDA complete 联动拖车并原子推进 LOADED',
|
||||
'BLOCKED_CONTRACT:用户已确认拖车缺失或未完成不再阻断;等待后端冻结 complete 响应中的拖车投影、LOADING→COMPLETED 历史动作、错柜隔离、重放与失败回滚字段后再执行写 HTTP。当前脚本主动停止,禁止沿用“拖车必须预先 COMPLETED”的旧门禁。',
|
||||
'contract')
|
||||
return
|
||||
|
||||
const taskPath = `/api/platform/v1/first-leg/pda-loading/tasks/${encodeURIComponent(taskId)}`
|
||||
const taskBeforeResponse = await context.request('GET', taskPath)
|
||||
const taskBefore = context.apiSuccess(MODULE, '读取最终完成前 PDA 任务即时版本', taskBeforeResponse, '', OPTIONS)
|
||||
|
||||
Reference in New Issue
Block a user