test(acceptance): reuse fixed customers and align native fulfillment flows
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const BASE = '/api/platform/v1/last-leg/fleet/capacity-offers'
|
||||
const MODULE = 'phase4-overseas-business'
|
||||
const OPTIONS = { scenario: 'looseboard-pool-binding', deploymentBlocker: true }
|
||||
const version = value => Number.isSafeInteger(value) && value >= 0
|
||||
const version = value => /^(0|[1-9]\d*)$/.test(String(value)) && Number.isSafeInteger(Number(value))
|
||||
|
||||
/** 将本轮散板原单绑定本轮已发布车次余位,禁止无来源另建商业订单。 */
|
||||
export async function bindLooseboardDemand(context, { demand, tripProof, offerNo, destinationKey, unitPrice }) {
|
||||
@@ -38,7 +38,8 @@ export async function bindLooseboardDemand(context, { demand, tripProof, offerNo
|
||||
const original = await request('GET', originalPath)
|
||||
const summary = original?.summary
|
||||
check('散板原单仍可接车且无已有承运', summary?.orderNo === demand.orderNo && String(summary.customerId) === String(demand.customerId)
|
||||
&& summary.status === 'PENDING_ACCEPTANCE' && version(summary.version) && summary.version === demand.version
|
||||
&& summary.status === 'PENDING_ACCEPTANCE' && version(summary.version) && version(demand.version)
|
||||
&& Number(summary.version) === Number(demand.version)
|
||||
&& !summary.fleetArrangement && original.remark?.startsWith(context.marker))
|
||||
const offer = (await request('GET', `${BASE}/${encodeURIComponent(offerNo)}`))?.offer
|
||||
const destination = offer?.destinations?.find(row => row.destinationKey === destinationKey)
|
||||
|
||||
Reference in New Issue
Block a user