fix: complete development acceptance paths
This commit is contained in:
+9
-7
@@ -24,9 +24,9 @@ function fixture() {
|
||||
const fees = new Map()
|
||||
let sequence = 7000
|
||||
const businessRows = {
|
||||
'/api/platform/v1/last-leg/overseas-procurements': { id: '3001', orderNo: 'PO-1', customerId: '1001' },
|
||||
'/api/platform/v1/last-leg/us-truck-orders': { id: '3002', orderNo: 'TK-1', customerId: '1001' },
|
||||
'/api/platform/v1/last-leg/local-looseboard-orders': { id: '3003', orderNo: 'LB-1', customerId: '1001' },
|
||||
'/api/platform/v1/last-leg/overseas-procurements': { id: '3001', orderNo: 'PO-1', customerId: '1101' },
|
||||
'/api/platform/v1/last-leg/us-truck-orders': { id: '3002', orderNo: 'TK-1', customerId: '1201' },
|
||||
'/api/platform/v1/last-leg/local-looseboard-orders': { id: '3003', orderNo: 'LB-1', customerId: '1301' },
|
||||
}
|
||||
const context = {
|
||||
marker,
|
||||
@@ -36,9 +36,9 @@ function fixture() {
|
||||
createdResources: {
|
||||
merchantQualificationFixture: { tenantId: '1001' },
|
||||
phase4OverseasBusiness: {
|
||||
purchase: { orderNo: 'PO-1', customerId: '1001' },
|
||||
truck: { orderNo: 'TK-1', customerId: '1001' },
|
||||
looseboard: { orderNo: 'LB-1', customerId: '1001' },
|
||||
purchase: { orderNo: 'PO-1', customerId: '1101' },
|
||||
truck: { orderNo: 'TK-1', customerId: '1201' },
|
||||
looseboard: { orderNo: 'LB-1', customerId: '1301' },
|
||||
},
|
||||
phase4OverseasPda: { customerId: '2001', overseasWarehouseId: '9001' },
|
||||
},
|
||||
@@ -77,7 +77,9 @@ function fixture() {
|
||||
const existing = commands.get(`CREATE:${key}`)
|
||||
if (existing) return existing.hash === hash ? response(existing.fee) : response(null, 'A0409')
|
||||
const expectedCustomer = body.businessId === '4001' ? '2001'
|
||||
: ['3001', '3002', '3003'].includes(String(body.businessId)) ? '1001' : body.customerId
|
||||
: body.businessId === '3001' ? '1101'
|
||||
: body.businessId === '3002' ? '1201'
|
||||
: body.businessId === '3003' ? '1301' : body.customerId
|
||||
if (body.businessId && body.customerId !== expectedCustomer) return response(null, 'A0400')
|
||||
const fee = { ...structuredClone(body), sourceFeeId: String(++sequence), sourceVersion: 1,
|
||||
reviewStatus: 'DRAFT', publicationStatus: 'UNPUBLISHED', sourceStatus: 'ACTIVE' }
|
||||
|
||||
Reference in New Issue
Block a user