测试接单后链路
This commit is contained in:
@@ -455,6 +455,8 @@ export async function createHomeServiceApplication(draft: HomeServiceApplication
|
||||
},
|
||||
recipientName: draft.elderName,
|
||||
recipientPhone: draft.phone,
|
||||
recipientAge: draft.age,
|
||||
recipientGender: draft.gender,
|
||||
contactName: draft.applicantName,
|
||||
contactPhone: draft.phone,
|
||||
appointmentTime: draft.preferredTime,
|
||||
@@ -565,7 +567,7 @@ function mapOrderToCase(order: ServiceOrderType): HomeServiceCaseType {
|
||||
serviceTime: formatServiceAppointmentText(order.appointmentTime),
|
||||
applicantName: order.contactName,
|
||||
elderName: order.recipientName,
|
||||
age: 0,
|
||||
age: order.recipientAge,
|
||||
phone: order.contactPhone,
|
||||
address: order.addressSnapshot.fullAddress,
|
||||
summary: order.remark,
|
||||
|
||||
@@ -21,6 +21,8 @@ export type CreateServiceOrderParams = {
|
||||
address: ServiceOrderAddressSnapshotType
|
||||
recipientName: string
|
||||
recipientPhone: string
|
||||
recipientAge: number
|
||||
recipientGender: string
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
appointmentTime: string
|
||||
@@ -277,6 +279,8 @@ function buildEcServiceRequestPayload(params: CreateServiceOrderParams, userId:
|
||||
service_category: params.service.category,
|
||||
elder_name: params.recipientName,
|
||||
elder_phone: params.recipientPhone,
|
||||
elder_age: params.recipientAge,
|
||||
elder_gender: params.recipientGender,
|
||||
contact_name: params.contactName,
|
||||
contact_phone: params.contactPhone,
|
||||
scheduled_at: appointmentTime,
|
||||
@@ -302,6 +306,8 @@ function buildEcServiceRequestPayloadWithoutAddress(params: CreateServiceOrderPa
|
||||
service_category: params.service.category,
|
||||
elder_name: params.recipientName,
|
||||
elder_phone: params.recipientPhone,
|
||||
elder_age: params.recipientAge,
|
||||
elder_gender: params.recipientGender,
|
||||
contact_name: params.contactName,
|
||||
contact_phone: params.contactPhone,
|
||||
scheduled_at: appointmentTime,
|
||||
@@ -324,6 +330,8 @@ function buildEcCareTaskPayload(params: CreateServiceOrderParams, userId: string
|
||||
service_snapshot_json: params.service as any,
|
||||
elder_name: params.recipientName,
|
||||
elder_phone: params.recipientPhone,
|
||||
elder_age: params.recipientAge,
|
||||
elder_gender: params.recipientGender,
|
||||
contact_name: params.contactName,
|
||||
contact_phone: params.contactPhone,
|
||||
scheduled_at: appointmentTime,
|
||||
@@ -352,6 +360,8 @@ function buildEcCareTaskPayloadWithoutAddress(params: CreateServiceOrderParams,
|
||||
service_snapshot_json: params.service as any,
|
||||
elder_name: params.recipientName,
|
||||
elder_phone: params.recipientPhone,
|
||||
elder_age: params.recipientAge,
|
||||
elder_gender: params.recipientGender,
|
||||
contact_name: params.contactName,
|
||||
contact_phone: params.contactPhone,
|
||||
scheduled_at: appointmentTime,
|
||||
@@ -462,6 +472,8 @@ function parseServiceOrder(item: any, logs: Array<ServiceOrderTimelineItemType>,
|
||||
},
|
||||
recipientName: readString(item, 'recipient_name'),
|
||||
recipientPhone: readString(item, 'recipient_phone'),
|
||||
recipientAge: readFirstNumber(item, ['recipient_age', 'elder_age']),
|
||||
recipientGender: readFirstString(item, ['recipient_gender', 'elder_gender']),
|
||||
contactName: readString(item, 'contact_name'),
|
||||
contactPhone: readString(item, 'contact_phone'),
|
||||
appointmentTime: readString(item, 'appointment_time'),
|
||||
@@ -586,6 +598,8 @@ function mapCareTaskRowToLegacyOrderRow(item: any): any {
|
||||
address_snapshot_json: addressSnapshotValue != null ? addressSnapshotValue : JSON.parse('{}'),
|
||||
recipient_name: readFirstString(item, ['elder_name', 'recipient_name']),
|
||||
recipient_phone: readFirstString(item, ['elder_phone', 'recipient_phone']),
|
||||
recipient_age: readFirstNumber(item, ['elder_age', 'recipient_age']),
|
||||
recipient_gender: readFirstString(item, ['elder_gender', 'recipient_gender']),
|
||||
contact_name: readString(item, 'contact_name'),
|
||||
contact_phone: readString(item, 'contact_phone'),
|
||||
appointment_time: readFirstString(item, ['scheduled_at', 'appointment_time']),
|
||||
@@ -907,6 +921,8 @@ export async function createServiceOrder(params: CreateServiceOrderParams): Prom
|
||||
address_snapshot_json: params.address as any,
|
||||
recipient_name: params.recipientName,
|
||||
recipient_phone: params.recipientPhone,
|
||||
recipient_age: params.recipientAge,
|
||||
recipient_gender: params.recipientGender,
|
||||
contact_name: params.contactName,
|
||||
contact_phone: params.contactPhone,
|
||||
appointment_time: appointmentTime,
|
||||
|
||||
Reference in New Issue
Block a user