优化
This commit is contained in:
@@ -42,7 +42,6 @@ async function request(context, method, path, body, headers = {}) {
|
||||
function oceanDraft(context, suffix, master) {
|
||||
return {
|
||||
...oceanBookingDraft(context, suffix, master),
|
||||
shippingCompanyName: `船期船司-${suffix}`, bookingAgentName: `船期代理-${suffix}`,
|
||||
departurePortCode: 'CNSZX',
|
||||
departurePortName: '深圳', destinationPortCode: 'USLAX', destinationPortName: '洛杉矶',
|
||||
placeOfDelivery: 'LAX', serviceTerm: 'CY-CY', freightTerm: 'NINGBO',
|
||||
@@ -52,7 +51,6 @@ function oceanDraft(context, suffix, master) {
|
||||
{ partyType: 'CONSIGNEE', partyName: `收货方-${suffix}` },
|
||||
{ partyType: 'NOTIFY_PARTY', partyName: `通知方-${suffix}` },
|
||||
],
|
||||
containerRequirements: [{ containerType: '40HQ', containerKind: 'FCL', capacityCbm: 68, maxWeightKg: 28000, quantity: 1 }],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +63,7 @@ async function ensureOceanBooking(context, suffix, master) {
|
||||
return detail?.oceanBooking ? {
|
||||
id: existingId,
|
||||
customerId: id(detail.oceanBooking.customerId),
|
||||
allocatedContainerBookingIds: (detail.containerAllocations || [])
|
||||
allocatedContainerBookingIds: (detail.containers || [])
|
||||
.map((item) => id(item?.containerBookingId)).filter(Boolean),
|
||||
} : null
|
||||
}
|
||||
@@ -78,7 +76,7 @@ async function ensureOceanBooking(context, suffix, master) {
|
||||
`oceanBookingId=${oceanBookingId || 'missing'}, customerId=${id(detail?.oceanBooking?.customerId) || 'missing'}`, OPTIONS)
|
||||
return oceanBookingId ? {
|
||||
id: oceanBookingId, customerId: id(detail.oceanBooking.customerId),
|
||||
allocatedContainerBookingIds: (detail.containerAllocations || [])
|
||||
allocatedContainerBookingIds: (detail.containers || [])
|
||||
.map((item) => id(item?.containerBookingId)).filter(Boolean),
|
||||
} : null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user