test: prepare isolated gray domestic PDA H5 tasks without auto-picking

This commit is contained in:
2026-10-09 17:21:56 +08:00
parent 023b28e31f
commit 74bf0e73c5
7 changed files with 53 additions and 2 deletions
@@ -392,6 +392,14 @@ export async function loadOneFragment(context, state) {
`HTTP=${labelResponse.http}, contentType=${labelResponse.contentType || 'missing'}, bytes=${labelResponse.bytes?.length ?? 0}`, OPTIONS)
if (labelResponse.http !== 200 || !Number(labelResponse.bytes?.length)) return null
if (context.context?.prepareDomesticPdaH5) {
if (task?.taskStatus === 'COMPLETED' || !task.items?.length || task.items.some(row => Number(row.pickedPackageCount) !== 0))
throw new Error('H5准备只允许尚未拣货的新任务')
return { preparedForH5: true, taskId, planId, containerId, oceanBookingId,
warehouseId, sourceInboundId: id(candidate.inboundId), sourceOrderId,
containerNo: realContainerNo, taskNo: task.taskNo, items: task.items }
}
const claim = await request(context, 'POST', `${PDA}/tasks/${taskId}/claim`, {
expectedAssignmentVersion: 0, operationId: `${operationBase}-claim`,
})