fix(lastleg): complete generated pallet receiving flow

This commit is contained in:
2026-09-09 02:54:09 +08:00
parent 86646ccd69
commit c5862db98d
20 changed files with 367 additions and 225 deletions
@@ -9,19 +9,18 @@ const read = (name) => readFileSync(resolve(here, name), 'utf8')
const readFirstlegTest = (name) => readFileSync(resolve(here,
'../../firstleg/src/test/java/com/baiyue/firstleg/portschedule/service', name), 'utf8')
test('current-marker departure batch proves operational documents photos customs and container-level confirm', () => {
test('current-marker departure batch separates domestic customs evidence from post-departure destination documents', () => {
const customs = read('phase3-customs.mjs')
const documents = read('phase3-container-documents.mjs')
const outbound = read('phase3-outbound-dispatch.mjs')
for (const type of ['DESTINATION_CLEARANCE', 'DELIVERY_ORDER', 'PICKUP_ORDER']) {
assert.match(customs, new RegExp(type))
}
assert.doesNotMatch(customs, /DESTINATION_CLEARANCE|DELIVERY_ORDER|PICKUP_ORDER/)
for (const type of ['DESTINATION_CLEARANCE', 'DELIVERY_ORDER', 'PICKUP_ORDER']) assert.match(documents, new RegExp(type))
for (const evidence of ['上传', '回读', '完成']) assert.match(documents, new RegExp(evidence))
assert.match(customs, /整柜聚合回显四类当前资料与真实PDA照片证据/)
assert.match(customs, /整柜聚合回显国内报关资料与真实PDA照片证据/)
assert.match(customs, /photos\.length >= 5/)
assert.match(customs, /\/customs\/loading-plans/)
assert.match(customs, /complete-all-buy/)
assert.match(customs, /四类整柜资料必须完成后才允许进入出仓确认/)
assert.match(customs, /国内报关资料与PDA证据必须完成后才允许进入出仓确认/)
assert.match(outbound, /CUSTOMS_CLEARANCE/)
assert.match(outbound, /拖车与独立船期仅作聚合参考且不参与出仓门禁/)
assert.match(outbound, /\$\{BASE\}\/\$\{encodeURIComponent\(containerBookingId\)\}\/confirm/)