优化
This commit is contained in:
@@ -152,9 +152,17 @@ try {
|
||||
result.finalStatus = 'BLOCKED'
|
||||
process.exitCode = 1
|
||||
} finally {
|
||||
await disablePicker(context, picker, label === 'MIXED-DROPSHIP' ? 9 : 8)
|
||||
try {
|
||||
await disablePicker(context, picker, label === 'MIXED-DROPSHIP' ? 9 : 8)
|
||||
} catch (error) {
|
||||
result.cleanupError = error.message
|
||||
result.finalStatus = 'CLEANUP_FAILED'
|
||||
}
|
||||
result.checks = context.steps
|
||||
if (context.steps.some(step => step.passed === false)) result.finalStatus = 'CHECK_FAILED'
|
||||
if (result.finalStatus !== 'PASSED') process.exitCode = 1
|
||||
save()
|
||||
console.log(JSON.stringify({ containerNo, inboundCode, finalStatus: result.finalStatus, error: result.error,
|
||||
dispatchNo: result.dispatchNo, outboundNo: result.transfer?.outboundNo, deliveryNos: result.transfer?.deliveries?.map(row => row.deliveryNo), report: output }))
|
||||
dispatchNo: result.dispatchNo, outboundNo: result.transfer?.outboundNo || result.task?.outboundNo,
|
||||
deliveryNos: result.transfer?.deliveries?.map(row => row.deliveryNo), report: output }))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user