test: cover partial and concurrent pda completion
This commit is contained in:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user