优化
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user