test: prepare isolated gray domestic PDA H5 tasks without auto-picking
This commit is contained in:
@@ -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`,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user