test: align container flow acceptance identities
This commit is contained in:
@@ -49,8 +49,11 @@ export async function run(context) {
|
||||
const oceanResponse = await context.request('GET', `${OCEAN}/${ocean.id}`)
|
||||
const oceanDetail = context.apiSuccess(MODULE, '读取跨服务链路订舱真实客户归属', oceanResponse, `oceanBookingId=${ocean.id}`, OPTIONS)
|
||||
const customerId = id(oceanDetail?.oceanBooking?.customerId)
|
||||
context.assert(MODULE, '跨服务链路订舱客户归属有效', oceanResponse, Boolean(customerId), `customerId=${customerId || 'missing'}`, OPTIONS)
|
||||
if (!customerId) return
|
||||
const customerName = String(oceanDetail?.oceanBooking?.customerName || '').trim()
|
||||
context.assert(MODULE, '跨服务链路订舱客户归属有效', oceanResponse,
|
||||
Boolean(customerId) && Boolean(customerName),
|
||||
`customerId=${customerId || 'missing'}, customerName=${customerName || 'missing'}`, OPTIONS)
|
||||
if (!customerId || !customerName) return
|
||||
const linkContainer = (containerFlow?.finalStatus === 'COMPLETED' || containerFlow?.finalStatus === 'LOADED')
|
||||
&& id(containerFlow?.tenantId) === customerId
|
||||
&& Boolean(containerFlow?.containerBookingId)
|
||||
@@ -75,7 +78,7 @@ export async function run(context) {
|
||||
warehouseId: linkContainer
|
||||
? id(containerFlow.warehouseId)
|
||||
: id(context.createdResources?.warehouse?.id || context.context?.warehouseId || '193000000000000001'),
|
||||
customerId, customerName: `服务中心链路客户-${suffix}`, carrierId: null, carrierName: `链路承运商-${suffix}`,
|
||||
customerId, customerName, carrierId: null, carrierName: `链路承运商-${suffix}`,
|
||||
fleetContact: '链路车队联系人', fleetPhone: '13800000007', driverName: '链路司机', driverPhone: '13800000008',
|
||||
driverIdCard: null, vehicleNo: `粤D-${suffix.slice(-6)}`, storeName: `链路门店-${suffix}`, storeContact: '链路联系人',
|
||||
storePhone: '13800000009', storeAddress: '深圳市南山区链路地址', storeCity: '深圳市', storeZipcode: '518000',
|
||||
|
||||
Reference in New Issue
Block a user