From e2bac14f3fc66027ea0a802a2778e93464219fe4 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Wed, 3 Apr 2024 15:55:59 +0800 Subject: [PATCH] =?UTF-8?q?h3bpm=E5=AE=9E=E7=94=A8=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E5=8D=95=E5=8F=B7=E6=9D=A5=E6=9B=B4=E6=96=B0=E8=A1=8C=E7=A8=8B?= =?UTF-8?q?=E8=A7=84=E5=88=92=E5=8D=95=E5=8F=B7=20=EF=BC=8C=20=E6=90=BA?= =?UTF-8?q?=E7=A8=8B=E6=9C=BA=E7=A5=A8=E7=BB=93=E7=AE=97=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=94=B9=E7=AD=BE=E8=B4=B9=E5=92=8C=E6=94=B9=E7=AD=BE=E5=B7=AE?= =?UTF-8?q?=E4=BB=B7=E8=B4=B9=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ctrip_order_record/CTripFlightRecord.java | 1 + .../CTripOrderRecordExtensionFactory.java | 10 +++++----- .../service/leg_event/LegEventHandler.java | 16 ++++++++++++++++ .../ctrip/order/CTripOrderRecordAutoSave.java | 4 ++++ 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripFlightRecord.java b/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripFlightRecord.java index 77175a55..8fe8346c 100644 --- a/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripFlightRecord.java +++ b/src/main/java/com/chint/domain/aggregates/order/order_record/ctrip_order_record/CTripFlightRecord.java @@ -20,6 +20,7 @@ public class CTripFlightRecord implements Serializable { private String recordId; public LocalDateTime createTime; private String routeOrderNo; + private String ticketNo; @MappedCollection(idColumn = "c_trip_flight_record_id") private CTripFlightRecordBase cTripFlightRecordBase; @MappedCollection(idColumn = "c_trip_flight_record_id") diff --git a/src/main/java/com/chint/domain/factoriy/order_record/CTripOrderRecordExtensionFactory.java b/src/main/java/com/chint/domain/factoriy/order_record/CTripOrderRecordExtensionFactory.java index 3d2897b2..c1c44246 100644 --- a/src/main/java/com/chint/domain/factoriy/order_record/CTripOrderRecordExtensionFactory.java +++ b/src/main/java/com/chint/domain/factoriy/order_record/CTripOrderRecordExtensionFactory.java @@ -288,12 +288,12 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac // 加载机票信息 if (cTripFlightTripInfo != null) { - orderFlightRecord.loadTicketInfo(cTripFlightTripInfo.getTicketNo(), + orderFlightRecord.loadTicketInfo(cTripFlightRecord.getTicketNo(), String.valueOf(cTripFlightRecordBase.getPrice()), cTripFlightTripInfo.getTicketNoStatusName()); } else { - orderFlightRecord.loadTicketInfo(String.valueOf(cTripFlightRecordBase.getPrice()), - "", + orderFlightRecord.loadTicketInfo(cTripFlightRecord.getTicketNo(), + String.valueOf(cTripFlightRecordBase.getPrice()), "无机票信息"); } @@ -317,9 +317,9 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac // 加载费用信息, 服务费, 改签费, 退票费 , 升舱费 orderFlightRecord.loadExtraFeeInfo(String.valueOf(cTripFlightRecordBase.getPostServiceFee()), - String.valueOf(cTripFlightRecordBase.getRebookQueryFee()), + String.valueOf(cTripFlightRecordBase.getDateChangeFee()), String.valueOf(cTripFlightRecordBase.getRefund()), - cTripFlightRecordBase.getOrderDetailType().equals("改签") ? String.valueOf(cTripFlightRecordBase.getAmount()) : KEEP_TWO_DECIMAL_ZERO, + String.valueOf(cTripFlightRecordBase.getPriceDifferential()), String.valueOf(cTripFlightRecordBase.getSettItineraryFee())); // 加载来源 diff --git a/src/main/java/com/chint/domain/service/leg_event/LegEventHandler.java b/src/main/java/com/chint/domain/service/leg_event/LegEventHandler.java index 53539e4d..f6b272b6 100644 --- a/src/main/java/com/chint/domain/service/leg_event/LegEventHandler.java +++ b/src/main/java/com/chint/domain/service/leg_event/LegEventHandler.java @@ -23,11 +23,13 @@ import com.chint.infrastructure.constant.LegConstant; import com.chint.infrastructure.constant.RouteConstant; import com.chint.infrastructure.echo_framework.dispatch.ResultContainer; import com.chint.infrastructure.util.BaseContext; +import com.chint.infrastructure.util.OrderNo; import com.chint.interfaces.rest.bpm.BPMRequest; import com.chint.interfaces.rest.bpm.dto.JTH3ChangeDto; import com.chint.interfaces.rest.bpm.dto.XNChangeDto; import com.chint.interfaces.rest.bpm.dto.ZWChangeDto; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -86,6 +88,10 @@ public class LegEventHandler implements LegEventService { @Autowired private OrderDomainService orderDomainService; + @Value("${chint.envMark}") + private String envMark; + + private DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); private DateTimeFormatter formatterWithT = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'hh:mm"); @@ -130,6 +136,16 @@ public class LegEventHandler implements LegEventService { String startTime = data.getStartTime(); String endTime = data.getEndTime(); + //当sysCode为H3BPM的时候 ,实用单号更新行程规划单的单号 + if (data.getSysCode().equals(H3_BPM)) { + String generate = OrderNo.generate(H3_BPM, data.getActualOrderNo()); + if (!envMark.equals("prod")) { + routeOrder.setRouteOrderNo(generate + envMark); + } else { + routeOrder.setRouteOrderNo(generate); + } + } + if (startTime != null && endTime != null) { if (startTime.contains("T") && endTime.contains("T")) { //如果包含T,就截取时间信息前10位 diff --git a/src/main/java/com/chint/interfaces/rest/ctrip/order/CTripOrderRecordAutoSave.java b/src/main/java/com/chint/interfaces/rest/ctrip/order/CTripOrderRecordAutoSave.java index 29e8a489..ece19103 100644 --- a/src/main/java/com/chint/interfaces/rest/ctrip/order/CTripOrderRecordAutoSave.java +++ b/src/main/java/com/chint/interfaces/rest/ctrip/order/CTripOrderRecordAutoSave.java @@ -80,6 +80,10 @@ public class CTripOrderRecordAutoSave { //补充额外的字段 OrderFlightResponse.FlightOrderBaseInfo orderBaseInfo = it.getOrderBaseInfo(); record.setRouteOrderNo(orderBaseInfo.getJourneyID()); + OrderFlightResponse.FlightOrderPassenger orderPassengerInfo = it.getOrderPassengerInfo(); + if(orderPassengerInfo != null){ + record.setTicketNo(orderPassengerInfo.getTicketNo()); + } return record; }).toList(); cTripOrderDetailRepository.saveAllCTripFlightRecord(cTripFlightRecords);