This commit is contained in:
2026-08-12 10:59:39 +08:00
parent 91c6ebca5c
commit 4d0c245b60
16 changed files with 1368 additions and 12 deletions
@@ -251,6 +251,17 @@ export async function run(context) {
&& pickReplay?.items?.every?.((item) => Number(item.pickedPackageCount) === Number(item.plannedPackageCount)),
`taskStatus=${pickReplay?.taskStatus || 'missing'}`, OPTIONS)
const operationsResponse = await request(context, 'GET', `${PDA}/tasks/${taskId}/operations`)
const operations = context.apiSuccess(MODULE, '回查完成后的 PDA 操作审计', operationsResponse, '', OPTIONS)
context.assert(MODULE, 'PDA 完成审计保留领取和原子批次操作者记录', operationsResponse,
Array.isArray(operations)
&& operations.some((item) => item.actionType === 'CLAIM'
&& Boolean(item.operatorId) && Boolean(item.createdAt))
&& operations.some((item) => item.actionType === 'BATCH'
&& Boolean(item.operatorId) && Boolean(item.createdAt))
&& !operations.some((item) => item.actionType === 'REVIEW'),
`actions=${Array.isArray(operations) ? operations.map((item) => item.actionType).join(',') : 'missing'}`, OPTIONS)
const reviewResponse = await request(context, 'POST', `${PDA}/tasks/${taskId}/review`, {
expectedTaskVersion: Number(picked?.version), operationId: `${context.marker}-pda-review`.slice(0, 128),
remark: context.marker,