test: cover partial and concurrent pda completion

This commit is contained in:
2026-08-25 09:58:59 +08:00
parent b67217332a
commit cb78bc6b41
4 changed files with 81 additions and 7 deletions
@@ -1133,6 +1133,15 @@ export async function run(context) {
&& Number(partialTaskItem?.pickedPackageCount) === 1
&& partialTask?.workflowStatus === 'AWAITING_REVIEW' && partialTask?.taskStatus === 'LOADING',
`itemStatus=${partialTaskItem?.itemStatus || 'missing'}, planned=${partialTaskItem?.plannedPackageCount ?? 'missing'}, picked=${partialTaskItem?.pickedPackageCount ?? 'missing'}, workflow=${partialTask?.workflowStatus || 'missing'}`, OPTIONS)
const exceptionOverviewResponse = await context.request('GET',
`/api/platform/v1/containers/${encodeURIComponent(containerBookingId)}/overview`)
const exceptionOverview = context.apiSuccess(MODULE,
'回查柜次 PDA 异常原因与已解决进度', exceptionOverviewResponse, '', OPTIONS)
context.assert(MODULE, 'SKIP 异常原因持久化且 PARTIAL 后无未解决明细', exceptionOverviewResponse,
exceptionOverview?.pda?.exceptionReasons?.includes?.(skipReason)
&& Number(exceptionOverview?.pda?.unresolvedItemCount) === 0
&& exceptionOverview?.pda?.workflowStatus === 'AWAITING_REVIEW',
`exceptionReasons=${JSON.stringify(exceptionOverview?.pda?.exceptionReasons || [])}, unresolved=${exceptionOverview?.pda?.unresolvedItemCount ?? 'missing'}, workflow=${exceptionOverview?.pda?.workflowStatus || 'missing'}`, OPTIONS)
}
if (dynamicCandidate?.inboundDetailId) {
const planBeforeIncrementResponse = await context.request('GET', `${smartLoadingBase}/plans/${loadingPlanId}`)