From 59ed3cce53abb76d4ec2362a589f2e072bba3450 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Tue, 26 Mar 2024 12:55:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E7=A8=8B=E6=96=B0=E8=B6=85=E6=A0=87?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/aggregates/order/OrderDetail.java | 16 +++++ .../order/order_record/OrderBaseRecord.java | 11 +++ .../order/order_record/OrderCarRecord.java | 53 +++++++++++++++ .../order/order_record/OrderFlightRecord.java | 67 +++++++++++++++++++ .../order/order_record/OrderHotelRecord.java | 64 ++++++++++++++++++ .../order/order_record/OrderTrainRecord.java | 63 +++++++++++++++++ .../order_record/OrderRecordFactory.java | 8 +++ .../rest/ly/in/LYETAController.java | 7 +- src/main/resources/application-test.yml | 8 +-- 9 files changed, 290 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/chint/domain/aggregates/order/order_record/OrderBaseRecord.java create mode 100644 src/main/java/com/chint/domain/aggregates/order/order_record/OrderCarRecord.java create mode 100644 src/main/java/com/chint/domain/aggregates/order/order_record/OrderFlightRecord.java create mode 100644 src/main/java/com/chint/domain/aggregates/order/order_record/OrderHotelRecord.java create mode 100644 src/main/java/com/chint/domain/aggregates/order/order_record/OrderTrainRecord.java create mode 100644 src/main/java/com/chint/domain/factoriy/order_record/OrderRecordFactory.java diff --git a/src/main/java/com/chint/domain/aggregates/order/OrderDetail.java b/src/main/java/com/chint/domain/aggregates/order/OrderDetail.java index 9f08d131..ec380d38 100644 --- a/src/main/java/com/chint/domain/aggregates/order/OrderDetail.java +++ b/src/main/java/com/chint/domain/aggregates/order/OrderDetail.java @@ -1,5 +1,9 @@ package com.chint.domain.aggregates.order; +import com.chint.domain.aggregates.order.order_record.OrderCarRecord; +import com.chint.domain.aggregates.order.order_record.OrderFlightRecord; +import com.chint.domain.aggregates.order.order_record.OrderHotelRecord; +import com.chint.domain.aggregates.order.order_record.OrderTrainRecord; import com.chint.domain.exceptions.NotFoundException; import com.chint.domain.value_object.enums.CurrencyType; import com.chint.infrastructure.constant.LegConstant; @@ -56,15 +60,27 @@ public class OrderDetail implements Serializable { @MappedCollection(idColumn = "order_id") private CarOrderDetail carOrderDetail; + @Transient + private List orderCarRecordList; + @MappedCollection(idColumn = "order_id") private FlightOrderDetail flightOrderDetail; + @Transient + private List orderFlightRecordList; + @MappedCollection(idColumn = "order_id") private HotelOrderDetail hotelOrderDetail; + @Transient + private List orderHotelRecordList; + @MappedCollection(idColumn = "order_id") private TrainOrderDetail trainOrderDetail; + @Transient + private List orderTrainRecordList; + @MappedCollection(idColumn = "order_id") private OtherOrderDetail otherOrderDetail; diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/OrderBaseRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderBaseRecord.java new file mode 100644 index 00000000..f80a7149 --- /dev/null +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderBaseRecord.java @@ -0,0 +1,11 @@ +package com.chint.domain.aggregates.order.order_record; + +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public class OrderBaseRecord { + private LocalDateTime createTime; + private LocalDateTime updateTime; +} diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/OrderCarRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderCarRecord.java new file mode 100644 index 00000000..d038954f --- /dev/null +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderCarRecord.java @@ -0,0 +1,53 @@ +package com.chint.domain.aggregates.order.order_record; + +import lombok.Data; + +@Data +public class OrderCarRecord { + private Long id; + private String trvaleSysType; // 数据来源商旅平台 XC:携程 TC:同程 + private String belongSysType; // 对应所属系统 GF_FK:股份费控 XN_FK:新能费控 AN_FK:安能费控 JT_BPM:集团BPM NOT:无系统标识 + private String detailId; // 结算明细唯一标识 + private String accountCompanyId; // 核算企业code + private String accountCompanyName; // 核算企业名称 + private String ticketClerk; // 票务员 + private String accountPeriod; // 账期号 + private String billNo; // 账单号 + private String receiptsNum; // 关联申请单号 + private String overStandard; // 是否违规(超标): 0否 1是 + private String overStandardReason; // 违规原因(超标原因) + private String orderNo; // 订单号 + private String parentOrderNo; // 父级订单号 + private String originalOrderNo; // 原始订单号 + private String orderStatus; // 订单状态 + private String bookingUserCode; // 预订人Code + private String bookingName; // 预订人姓名 + private String createTime; // 订单创建时间 格式:2023-04-26 13:‌15:17 + private String startTime; // 出发时间 格式:2023-04-26 13:‌15:17 + private String arriveTime; // 到达时间 格式:2023-04-26 13:‌15:17 + private String fromStationName; // 出发地 + private String toStationName; // 到达地 + private String carType; // 车型 + private String fromCity; // 出发城市 + private String toCity; // 到达城市 + private String runTime; // 运行时长 + private String miles; // 里程数 + private String noTaxAmt; // 未税金额 + private String taxAmt; // 税费 + private String orderAmount; // 订单总额(含前收服务费) + private String openCharge; // 开票手续费 + private String highSpeedAmt; // 额外费用 + private String highSpeedName; // 额外费用名称 + private String serviceCost; // 服务费 + private String cancelCost; // 取消费 + private String userName; // 用车人姓名 + private String userCode; // 用车人code + private String comyPayAmt; // 公司统付金额 + private String bookOrgCode1; // 用车人组织架构信息1 + private String bookOrgCode2; // 用车人组织架构信息2 + private String bookOrgCode3; // 用车人组织架构信息3 + private String paymentType; // 付款方式 0:公司统付 1:个人付 2:混付 + private String projectOrderNo; // 项目订单号 + private String offlineCcomyCode; // 成本中心 + private String orderSource; // 预订来源:线上/线下 +} \ No newline at end of file diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/OrderFlightRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderFlightRecord.java new file mode 100644 index 00000000..36657c3e --- /dev/null +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderFlightRecord.java @@ -0,0 +1,67 @@ +package com.chint.domain.aggregates.order.order_record; + +import lombok.Data; + +@Data +public class OrderFlightRecord extends OrderBaseRecord{ + private Long id; + private String trvaleSysType; // 数据来源商旅平台 XC:携程 TC:同程 + private String belongSysType; // 对应所属系统 GF_FK:股份费控 XN_FK:新能费控 AN_FK:安能费控 JT_BPM:集团BPM NOT:无系统标识 + private String detailId; // 结算明细唯一标识 + private String accountCompanyId; // 核算企业code + private String accountCompanyName; // 核算企业名称 + private String ticketClerk; // 票务员 + private String accountPeriod; // 账期号 + private String billNo; // 账单号(结算单号) + private String orderNo; // 订单号 + private String parentOrderNo; // 父级订单号 + private String originalOrderNo; // 原始订单号 + private String ticketNo; // 票号 + private String scheduleNum; // 行程单号 + private String receiptsNum; // 关联申请单号 + private String bookingName; // 预订人姓名 + private String bookingUserCode; // 预订人编码 + private String userName; // 出行人姓名 + private String userCode; // 出行人编码 + private String overStandard; // 是否违规(超标): 0否 1是 + private String overStandardReason; // 违规原因(超标原因) + private String distance; // 航程公里数 + private String startAirportName; // 起飞机场名称 + private String startCityCode; // 起飞城市编码 + private String startCityName; // 起飞城市名称 + private String startTime; // 起飞时间 yyyy-MM-dd HH:‌mm:ss + private String endAirportCode; // 到达机场三字码 + private String endAirportName; // 到达机场名称 + private String endCityCode; // 到达城市编码 + private String endCityName; // 到达城市名称 + private String endTerminal; // 到达航站楼 + private String endTime; // 到达时间 yyyy-MM-dd HH:‌mm:ss + private String flightCompName; // 航空公司名称 + private String flightLowestPrice; // 航班最低价 + private String flightNum; // 航班号 + private String orderAmount; // 订单总额 + private String facePrice; // 票面价 + private String noTaxAmt; // 未税金额 + private String taxAmt; // 税额 + private String preServiceFee; // 服务费 + private String postServiceFee; // 配送服务费 + private String airportTax; // 机建费 + private String changeFee; // 改签手续费 + private String fuelTax; // 燃油费 + private String refundFee; // 退票手续费 + private String upFee; // 改签差价 + private String ycabinFullPrice; // 经济舱全价 + private String issueTicketTime; // 出票时间 yyyy-MM-dd HH:‌mm:ss + private String policyLowestPrice; // 比价范围最低价 + private String seatDiscount; // 折扣率 + private String seatPoint; // 舱位 + private String seatPointName; // 舱位名称 + private String useStatus; // 机票使用情况 + private String orderSource; // 预订来源:线上/线下 + private String notLowReason; // 未预订最低价原因 + private String bookOrgCode1; // 出行人组织架构信息1 + private String bookOrgCode2; // 出行人组织架构信息2 + private String bookOrgCode3; // 出行人组织架构信息3 + private String projectOrderNo; // 项目订单号 + private String offlineCcomyCode; // 成本中心 +} \ No newline at end of file diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/OrderHotelRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderHotelRecord.java new file mode 100644 index 00000000..bcb1d414 --- /dev/null +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderHotelRecord.java @@ -0,0 +1,64 @@ +package com.chint.domain.aggregates.order.order_record; + +import lombok.Data; + +@Data +public class OrderHotelRecord extends OrderBaseRecord{ + private Long id; + private String trvaleSysType; // 数据来源商旅平台 XC:携程 TC:同程 + private String belongSysType; // 对应所属系统 GF_FK:股份费控 XN_FK:新能费控 AN_FK:安能费控 JT_BPM:集团BPM NOT:无系统标识 + private String detailId; // 结算明细唯一标识 + private String accountCompanyId; // 核算企业code + private String accountCompanyName; // 核算企业名称 + private String ticketClerk; // 票务员 + private String accountPeriod; // 账期号 + private String billNo; // 账单号(结算单号) + private String orderNo; // 订单号 + private String parentOrderNo; // 父级订单号 + private String originalOrderNo; // 原始订单号 + private String brandGroup; // 酒店品牌集团 + private String brandName; // 酒店品牌 + private int overStandard; // 是否违规(超标): 0否 1是 + private String overStandardReason; // 违规原因(超标原因) + private String receiptsNum; // 关联申请单号 + private String bookingName; // 预订人姓名 + private String bookingUserCode; // 预订人编码 + private String userName; // 入住人姓名 + private String userCode; // 入住人编码 + private String checkInCity; // 入住城市 + private String checkInDate; // 入住日期yyyy-MM-dd + private String country; // 国家 + private String customerServiceName; // 客服处理人 + private String departureDate; // 离店日期yyyy-MM-dd + private String hotelAddress; // 酒店地址 + private String hotelName; // 酒店名称 + private String includeAmount; // 含早情况:XX份 + private int isAgreement; // 是否协议酒店:0否1是 + private int paymentType; // 付款方式: 0-公司统付 1-个人付 2-混付 + private String orderAmount; // 订单总额 + private String companyAmount; // 企业统付总额 + private String personalAmount; // 个人支付金额 + private String unifiedPayAmt; // 统付服务费 + private String personalPayAmt; // 个人服务费 + private String province; // 省份 + private int roomCount; // 房间数 + private int roomNightCount; // 夜间数 + private int nightCount; // 间夜数 + private String roomPrice; // 房价(房间单价不包含服务费) + private String roomRate; // 房费(订单总额减总服务费) + private String noTaxAmt; // 不含税价 + private String taxAmt; // 税费 + private String invoiceType; // 供应商发票类型 + private String invoiceFee; // 开票手续费 + private String custodayFee; // 托管费 + private String noTaxCusFee; // 托管费不含税 + private String taxCusFee; // 托管费税费 + private String roomTypeName; // 房型 + private String starRate; // 星级 + private String orderSource; // 预订来源:线上/线下 + private String bookOrgCode1; // 入住人组织架构信息1 + private String bookOrgCode2; // 入住人组织架构信息2 + private String bookOrgCode3; // 入住人组织架构信息3 + private String projectOrderNo; // 项目订单号 + private String offlineCcomyCode; // 成本中心 +} \ No newline at end of file diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/OrderTrainRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderTrainRecord.java new file mode 100644 index 00000000..0db6aa8c --- /dev/null +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/OrderTrainRecord.java @@ -0,0 +1,63 @@ +package com.chint.domain.aggregates.order.order_record; + +import lombok.Data; + +@Data +public class OrderTrainRecord extends OrderBaseRecord{ + private Long id; + private String trvaleSysType; // 数据来源商旅平台 XC:携程 TC:同程 + private String belongSysType; // 对应所属系统 GF_FK:股份费控 XN_FK:新能费控 AN_FK:安能费控 JT_BPM:集团BPM NOT:无系统标识 + private String detailId; // 结算明细唯一标识 + private String accountCompanyId; // 核算企业code + private String accountCompanyName; // 核算企业名称 + private String ticketClerk; // 票务员 + private String accountPeriod; // 账期号 + private String billNo; // 账单号 + private String orderNo; // 订单号 + private String parentOrderNo; // 父级订单号 + private String originalOrderNo; // 原始订单号 + private String receiptsNum; // 关联申请单号 + private String startDate; // 出发日期 + private String arriveDate; // 到达日期 + private String overStandard; // 是否违规(超标): 0否 1是 + private String overStandardReason; // 违规原因(超标原因) + private String changeAddAmount; // 改签收款 + private String changeCost; // 改签手续费 + private String changeReturnAmount; // 改签退款 + private String returnCost; // 退款手续费 + private String bookFee; // 订票手续费 + private String collFee; // 取票手续费 + private String noTaxFeeAmt; // 手续费未税金额 + private String taxFeeAmt; // 手续费税费 + private String returnRes; // 退票原因 + private String returnFee; // 退票手续费 + private String noTaxAmt; // 未税金额 + private String taxAmt; // 税额 + private String orderAmount; // 订单总额 + private String fromCity; // 出发城市 + private String fromStationName; // 出发站 + private String toCity; // 到达城市 + private String toStationName; // 到达站 + private String issueTicketTime; // 出票时间 yyyy-MM-dd HH:‌mm:ss + private String runTime; // 时长 + private String seatType; // 座位等级 + private String trainNo; // 车次 + private String bookingUserCode; // 预订人编码 + private String bookingName; // 预订人姓名 + private String userCode; // 出行人编码 + private String userName; // 出行人姓名 + private String orderSource; // 预订来源:线上/线下 + private String bookOrgCode1; // 出行人组织架构信息1 + private String bookOrgCode2; // 出行人组织架构信息2 + private String bookOrgCode3; // 出行人组织架构信息3 + private String projectOrderNo; // 项目订单号 + private String offlineCcomyCode; // 成本中心 + private String travelUserBirthday; // 生日 + private String travelUserPhone; // 出行人手机号 + private String travelUserSex; // 性别: 0保密不展示 1男 2女 + private String travelUserType; // 乘客类型: 成人(ADULT) 儿童(CHILDREN) 婴儿(BABY) + private String passportNo; // 乘客证件号 + private String passportType; // 乘客证件类型 + private String trainTime; // 发车时间 yyyy-MM-dd HH:‌mm:ss + private String yxId; // 影像比对ID +} \ No newline at end of file diff --git a/src/main/java/com/chint/domain/factoriy/order_record/OrderRecordFactory.java b/src/main/java/com/chint/domain/factoriy/order_record/OrderRecordFactory.java new file mode 100644 index 00000000..ddf06219 --- /dev/null +++ b/src/main/java/com/chint/domain/factoriy/order_record/OrderRecordFactory.java @@ -0,0 +1,8 @@ +package com.chint.domain.factoriy.order_record; + +import org.springframework.stereotype.Component; + +@Component +public class OrderRecordFactory { + +} diff --git a/src/main/java/com/chint/interfaces/rest/ly/in/LYETAController.java b/src/main/java/com/chint/interfaces/rest/ly/in/LYETAController.java index dc7dcc65..8c86ac1b 100644 --- a/src/main/java/com/chint/interfaces/rest/ly/in/LYETAController.java +++ b/src/main/java/com/chint/interfaces/rest/ly/in/LYETAController.java @@ -29,6 +29,7 @@ import java.util.List; import java.util.concurrent.CompletableFuture; import static com.chint.infrastructure.constant.CommonMessageConstant.NOT_FOUND; +import static com.chint.infrastructure.constant.LYConstant.*; import static com.chint.infrastructure.constant.LegConstant.*; import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_CHANGE; import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_ETA; @@ -150,7 +151,7 @@ public class LYETAController { LyETAPush.FlightOrderInfo flightOrderInfo = flightOrderInfos.get(0); FlightOrderResponse.Data data = lySearchRequest .getFlightOrderDetail(flightOrderInfo.getOrderNo()).getData(); - supplierCallbackData.data(data).extension(getETAReason(flightOrderInfo)).productType(LEG_TYPE_AIRPLANE); + supplierCallbackData.data(data).extension(getETAReason(flightOrderInfo)).productType(L_Y_PRODUCT_TYPE_FLY); } } case LEG_TYPE_TRAIN -> { @@ -159,7 +160,7 @@ public class LYETAController { LyETAPush.TrainOrderInfo trainOrderInfo = trainOrderInfos.get(0); TrainDetailResponse.TrainDetailData data = lySearchRequest .getTrainOrderDetail(trainOrderInfo.getOrderNo()).getData(); - supplierCallbackData.data(data).extension(getETAReason(trainOrderInfo)).productType(LEG_TYPE_TRAIN); + supplierCallbackData.data(data).extension(getETAReason(trainOrderInfo)).productType(L_Y_PRODUCT_TYPE_TRAIN); } } case LEG_TYPE_HOTEL -> { @@ -168,7 +169,7 @@ public class LYETAController { LyETAPush.HotelOrderInfo hotelOrderInfo = hotelOrderInfos.get(0); HotelDetailResponse.Data data = lySearchRequest .getHotelOrderDetail(hotelOrderInfo.getOrderNo()).getData(); - supplierCallbackData.data(data).extension(getETAReason(hotelOrderInfo)).productType(LEG_TYPE_HOTEL); + supplierCallbackData.data(data).extension(getETAReason(hotelOrderInfo)).productType(L_Y_PRODUCT_TYPE_HOTEL); } } default -> throw new NotFoundException(NOT_FOUND); diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 0e552aab..f4381294 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -48,10 +48,10 @@ logging: #正式 ly: appId: zhengtai - account: ab9fe0c19dd64a99b936fded72c3bb94 - password: glHRJJ9JMUwNfQ8OwAQi - secret: MnghmYJpM1U2RaLx - baseUrl: https://api.dttrip.cn/openapi + account: 4f9cb1080b564dd0a94aa95f7a19c8b5 + password: 1fD3SutgzfS48qznYQiq + secret: WOHzCMvHd823iHgH + baseUrl: https://api.qa.dttrip.cn/openapi ifForwardRequest: false forwardRequestBaseUrl: https://secureqrdev-t.chint.com/llz