This commit is contained in:
2026-10-08 17:07:57 +08:00
parent 16d2d9111a
commit c1ddb658bd
111 changed files with 2914 additions and 941 deletions
@@ -1,3 +1,4 @@
import { verifyDownloadCenterExport } from './download-center.mjs'
const MODULE = 'phase4-tail-order-controls'
const SCENARIO = 'phase4-tail-order-controls-lifecycle'
const OPTIONS = { scenario: SCENARIO, deploymentBlocker: true }
@@ -207,14 +208,9 @@ async function verifyDestinationMergeFeeAndExport(context, details, producer) {
&& row?.originalCurrency === 'USD' && Number(row?.originalAmount) === 0.01
&& row?.currency === 'CNY' && Number(row?.amount) > 0), trace(feeRead.response), OPTIONS)
const exported = await context.requestBinary('GET', query(`${ORDERS}/export`, {
const exported = await verifyDownloadCenterExport(context, MODULE, 'LAST_MILE_ORDER_LIST', {
customerId: id(representative.customerId), containerNo: producer.containerNo,
}))
const csv = new TextDecoder().decode(exported.bytes || new Uint8Array())
context.addStep(MODULE, '导出本轮尾程订单CSV', exported,
exported?.http === 200 && String(exported?.contentType || '').toLowerCase().includes('csv')
&& csv.includes(producer.containerNo) && csv.includes('尾程单号'),
`bytes=${exported?.bytes?.length ?? 0}, containerNo=${producer.containerNo}; ${trace(exported)}`, OPTIONS)
}, ['尾程单号', '集装箱号'], [producer.containerNo])
return success(batchCleared.response) && success(fee.response) && exported?.http === 200
}
function manualPlanBody(order, version, marker) {