优化
This commit is contained in:
@@ -75,6 +75,12 @@ export interface UnifiedOrderRelationSummary {
|
||||
childCount: number
|
||||
}
|
||||
|
||||
export interface UnifiedOrderCoLoadGroupSummary {
|
||||
status: string
|
||||
memberCount: number
|
||||
memberInboundCodes: string[]
|
||||
}
|
||||
|
||||
export interface UnifiedOrderResource {
|
||||
orderId: number | string
|
||||
tenantId: number | string
|
||||
@@ -103,6 +109,7 @@ export interface UnifiedOrderResource {
|
||||
loading: UnifiedOrderLoadingSummary | null
|
||||
delivery: UnifiedOrderDeliverySummary | null
|
||||
transport: UnifiedOrderTransportSummary | null
|
||||
coLoadGroup: UnifiedOrderCoLoadGroupSummary | null
|
||||
createdAt: string | null
|
||||
updatedAt: string | null
|
||||
expectedArrivalAt: string | null
|
||||
@@ -368,6 +375,13 @@ function normalizeRow(raw: UnifiedOrderResource): UnifiedOrderResource {
|
||||
evidenceCount: nullableInteger(raw.loading.evidenceCount),
|
||||
} : null,
|
||||
transport: raw.transport ? { ...raw.transport } : null,
|
||||
coLoadGroup: raw.coLoadGroup ? {
|
||||
status: String(raw.coLoadGroup.status || ''),
|
||||
memberCount: integer(raw.coLoadGroup.memberCount, 0),
|
||||
memberInboundCodes: (raw.coLoadGroup.memberInboundCodes || [])
|
||||
.map((value) => typeof value === 'string' ? value.trim() : '')
|
||||
.filter(Boolean),
|
||||
} : null,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user