fix(pda): 修复海外作业兼容性并完善扫码与装车收尾

This commit is contained in:
2026-11-06 21:02:54 +08:00
parent fd6c1511ce
commit 31f2ba0c85
14 changed files with 227 additions and 30 deletions
+9
View File
@@ -104,6 +104,15 @@ test('domestic loading photos remain cabinet-level read-only references without
assert.equal('fileId' in session.domesticLoadingPhotos[0], false)
})
test('receiving cabinet numbers use only the formal business field and normalize missing values', () => {
for (const normalize of [normalizeReceivingCandidate, normalizeReceivingSession]) {
assert.equal(normalize({ cabinetNo: ' GC202611060001 ' }).cabinetNo, 'GC202611060001')
for (const cabinetNo of [undefined, null, 2093166483653849089, ' ']) {
assert.equal(normalize({ cabinetNo, sourceContainerBookingId: '2093166483653849089', containerNo: 'C10000000' }).cabinetNo, '')
}
}
})
test('receiving adapter exposes calculable candidate facts and workflow errors', () => {
const candidate = normalizeReceivingCandidate({ containerNo: ' C10000000 ', status: 'WAIT_SIGN', planCount: 15, inboundCodeCount: 15, destinationCodes: ['ONT8', 'LAX'], plannedPalletCount: 4, currentAccount: true })
assert.equal(candidate.containerNo, 'C10000000')