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);