fix: complete pallet code cross-region flow
This commit is contained in:
@@ -171,14 +171,20 @@ async function verifyDestinationMergeFeeAndExport(context, details, producer) {
|
||||
const feeItem = `${context.marker}-TAIL-FEE`.slice(0, 128)
|
||||
const fee = await api(context, 'POST', '新增本轮尾程订单费用',
|
||||
query(`${ORDERS}/${encodeURIComponent(id(representative.id))}/fees`, { customerId: id(representative.customerId) }),
|
||||
{ feeItem, currency: 'USD', amount: 0.01, status: 'PENDING_REVIEW', supplierDescription: context.marker })
|
||||
{ feeItemCode: feeItem.slice(0, 64), feeItemName: feeItem, direction: 'RECEIVABLE',
|
||||
currency: 'USD', amount: 0.01, businessDate: new Date().toISOString().slice(0, 10) },
|
||||
{ 'Idempotency-Key': `${context.marker}-tail-fee`.slice(0, 128) })
|
||||
context.assert(MODULE, '尾程费用冻结币种金额和审核状态', fee.response,
|
||||
id(fee.data?.orderId) === id(representative.id) && fee.data?.feeItem === feeItem
|
||||
&& fee.data?.currency === 'USD' && Number(fee.data?.amount) === 0.01 && fee.data?.status === 'PENDING_REVIEW',
|
||||
id(fee.data?.orderId) === id(representative.id) && fee.data?.feeItemName === feeItem
|
||||
&& fee.data?.originalCurrency === 'USD' && Number(fee.data?.originalAmount) === 0.01
|
||||
&& fee.data?.currency === 'CNY' && Number(fee.data?.amount) > 0
|
||||
&& fee.data?.reviewStatus === 'PENDING',
|
||||
trace(fee.response), OPTIONS)
|
||||
const feeRead = await detail(context, representative, '回查尾程订单费用明细')
|
||||
context.assert(MODULE, '尾程费用详情可追溯', feeRead.response,
|
||||
feeRead.data?.fees?.some((row) => row?.feeItem === feeItem && Number(row?.amount) === 0.01), trace(feeRead.response), OPTIONS)
|
||||
feeRead.data?.fees?.some((row) => row?.feeItemName === feeItem
|
||||
&& row?.originalCurrency === 'USD' && Number(row?.originalAmount) === 0.01
|
||||
&& row?.currency === 'CNY' && Number(row?.amount) > 0), trace(feeRead.response), OPTIONS)
|
||||
|
||||
const exported = await context.requestOverseasBinary('GET', query(`${ORDERS}/export`, {
|
||||
customerId: id(representative.customerId), containerNo: producer.containerNo,
|
||||
|
||||
Reference in New Issue
Block a user