1.修改 携程飞机字段 大小写对应的问题

This commit is contained in:
wanglf3 2024-03-14 14:43:19 +08:00
parent ad7c367d00
commit 870a8ee038
9 changed files with 123 additions and 116 deletions

View File

@ -155,27 +155,20 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
carOrderDetail.setOverStandard(""); //
}
// carOrderDetail.setOverStandardReason(overStandardReason); contactName
// carOrderDetail.setParentOrderNo(parentOrderNo); //
// carOrderDetail.setOriginalOrderNo(originalOrderNo); //
// carOrderDetail.setCancellationFee(cancellationFee); //
// carOrderDetail.setStandardItems(standardItems); //
// carOrderDetail.setTollFee(tollFee); //
// derDetail.setTollFee(tollFee);//
return carOrderDetail;
}
@Override
public TrainOrderDetail createTrainOrderDetail(Object trainOrderDetailData) {
public TrainOrderDetail createTrainOrderDetail(Object trainOrderDetailData) {
return null;
}
return null;
}
@Override
public FlightOrderDetail createFlightOrderDetail(Object flightOrderDetailData) {
FlightOrderInfoEntity flightOrderInfoEntity = (FlightOrderInfoEntity) flightOrderDetailData;
BasicInfo flightOrderBasicInfo = flightOrderInfoEntity.getBasicInfo();
FlightInfo flightInfo = null;
@ -203,7 +196,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
}
}
FlightRefundInfo flightRefundInfo = flightOrderInfoEntity.getRefundInfo();
FlightRefundInfo flightRefundInfo = flightOrderInfoEntity.getRefundInfo().get(0);
FlightOrderFeeDetail flightOrderFeeDetail = null;
if (!flightOrderInfoEntity.getFlightOrderFeeDetailList().isEmpty()) {
@ -238,6 +231,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
flightOrderDetail.setOrderNo(orderNo);
flightOrderDetail.setDetailId(orderNo);
first.ifPresent(orderDetail -> {
OrderEvent lastEvent = orderDetail.getLastEvent();
if (lastEvent != null) {
@ -272,6 +266,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
if (flightInfo != null) {
// flightOrderDetail.setUserName(flightInfo.());
flightOrderDetail.setStartTime(flightInfo.getTakeoffTime());
flightOrderDetail.setArriveTime(flightInfo.getArrivalTime());
@ -299,12 +294,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
flightOrderDetail.setNotBookedLowestPriceReason(flightInfo.getReasonDesc());
}
if (tripRecordInfo != null) {
flightOrderDetail.setStartTerminal(tripRecordInfo.getDPortBuilding());
flightOrderDetail.setEndTerminal(tripRecordInfo.getAPortBuilding());
flightOrderDetail.setTicketNo(tripRecordInfo.getTicketNo());
flightOrderDetail.setChangedTicketNo(tripRecordInfo.getTicketNo());
}
if (passengerBasic != null) {
flightOrderDetail.setUserName(passengerBasic.getPassengerName());
flightOrderDetail.setPhone(passengerBasic.getMobilePhone());
@ -312,6 +302,16 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
flightOrderDetail.setBOOK_ORG_STRUCT_2(passengerBasic.getDept2());
flightOrderDetail.setBOOK_ORG_STRUCT_3(passengerBasic.getDept3());
}
if (tripRecordInfo != null) {
flightOrderDetail.setUserName(tripRecordInfo.getPassengerName());
flightOrderDetail.setStartTerminal(tripRecordInfo.getDPortBuilding());
flightOrderDetail.setEndTerminal(tripRecordInfo.getAPortBuilding());
flightOrderDetail.setTicketNo(tripRecordInfo.getTicketNo());
flightOrderDetail.setChangedTicketNo(tripRecordInfo.getTicketNo());
}
if (changeInfo != null) {
flightOrderDetail.setChangeFee(String.valueOf(changeInfo.getDateChangeFee()));
flightOrderDetail.setUpFee(String.valueOf(changeInfo.getPriceDifferential()));
@ -526,7 +526,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
} else {
hotelOrderDetail.setOverStandard(""); //
}
// hotelOrderDetail.setOverStandardReason(hotelOrderInfoEntity.getLowPriceRCInfo());
hotelOrderDetail.setOverStandardReason(hotelOrderInfoEntity.getLowPriceRCInfo());
return hotelOrderDetail;
}

View File

@ -5,72 +5,72 @@ import lombok.Data;
@Data
public class ChangeInfo {
private int sequence;
private int rebookId;
private String cPrepayType;
private String passengerName;
private String cStatus;
private double cFee;
private double rebookServiceFee;
private String rebookingTime;
private String rebookedTime;
private String oriTicketNo;
private String preTicketNo;
private String cTicketNo;
private String cTicketNoSignCode;
private String cAirline;
private String cAirlineName;
private String cAirType;
private String cFlight;
private double cPrintPrice;
private double oilFee;
private double tax;
private int subsidy;
private String subClass;
private String cClass;
private String cClassName;
private String cTakeOffTime;
private String cArrivalTime;
private String cdCityName;
private String cdPortName;
private String cdTerminal;
private String caCityName;
private String caPortName;
private String caTerminal;
private String rebookStatus;
private double priceDifferential;
private double dateChangeFee;
private double sendTicketFee;
private String oriAirLineCode;
private String cAirLineCode;
private String rebookResonDesc;
private String flightTime;
private Object flightStopInfoList;
private double oilFeeDifferential;
private String specialClassName;
private String specialClassDesc;
private String jounaryNo;
private String authorizeStatus;
private String cdPortCode;
private String caPortCode;
private String rebookReasonDesc;
private String rebookType;
private String caCityCode;
private String cdCityCode;
private int taxDifferential;
private String takeOffTimeUTC;
private String arrivalTimeUTC;
private double priceRate;
private String departureCountryCode;
private String arrivalCountryCode;
private String flightWay;
private String departureDistrictCode;
private String arrivalDistrictCode;
private double checkTicketPrice;
private String shareFlightNo;
private String originalTicketNoSignCode;
private String preTicketNoSignCode;
private String rebookReason;
private int Sequence;
private int RebookId;
private String CPrepayType;
private String PassengerName;
private String CStatus;
private double CFee;
private double RebookServiceFee;
private String RebookingTime;
private String RebookedTime;
private String OriTicketNo;
private String PreTicketNo;
private String CTicketNo;
private String CTicketNoSignCode;
private String CAirline;
private String CAirlineName;
private String CAirType;
private String CFlight;
private double CPrintPrice;
private double OilFee;
private double Tax;
private int Subsidy;
private String SubClass;
private String CClass;
private String CClassName;
private String CTakeOffTime;
private String CArrivalTime;
private String CdCityName;
private String CdPortName;
private String CdTerminal;
private String CaCityName;
private String CaPortName;
private String CaTerminal;
private String RebookStatus;
private double PriceDifferential;
private double DateChangeFee;
private double SendTicketFee;
private String OriAirLineCode;
private String CAirLineCode;
private String RebookResonDesc;
private String FlightTime;
private Object FlightStopInfoList;
private double OilFeeDifferential;
private String SpecialClassName;
private String SpecialClassDesc;
private String JounaryNo;
private String AuthorizeStatus;
private String CdPortCode;
private String CaPortCode;
private String RebookReasonDesc;
private String RebookType;
private String CaCityCode;
private String CdCityCode;
private int TaxDifferential;
private String TakeOffTimeUTC;
private String ArrivalTimeUTC;
private double PriceRate;
private String DepartureCountryCode;
private String ArrivalCountryCode;
private String FlightWay;
private String DepartureDistrictCode;
private String ArrivalDistrictCode;
private double CheckTicketPrice;
private String ShareFlightNo;
private String OriginalTicketNoSignCode;
private String PreTicketNoSignCode;
private String RebookReason;
// Other fields and getters/setters
}

View File

@ -4,9 +4,9 @@ import lombok.Data;
@Data
public class FlightOrderFeeDetail {
private String transactionType;
private String payType;
private int transactionAmount;
private String payCurrency;
private String TransactionType;
private String PayType;
private int TransactionAmount;
private String PayCurrency;
// Other fields and getters/setters
}

View File

@ -20,5 +20,5 @@ public class FlightOrderInfoEntity {
private List<PassengerInfo> PassengerInfo;
private List<FlightOrderFeeDetail> FlightOrderFeeDetailList;
private List<TripRecordInfo> TripRecordInfoList;
private FlightRefundInfo refundInfo;
private List<FlightRefundInfo> RefundInfo;
}

View File

@ -4,22 +4,22 @@ import lombok.Data;
@Data
public class PassengerBasic {
private String corpEid;
private String passengerName;
private String passengerNamePY;
private String nationalityCode;
private String nationalityName;
private String cardTypeName;
private String cardTypeNumber;
private String gender;
private String birthday;
private boolean nonEmployee;
private String mobilePhone;
private String countryCode;
private String email;
private String dept1;
private String dept2;
private String dept3;
private String CorpEid;
private String PassengerName;
private String PassengerNamePY;
private String NationalityCode;
private String NationalityName;
private String CardTypeName;
private String CardTypeNumber;
private String Gender;
private String Birthday;
private boolean NonEmployee;
private String MobilePhone;
private String CountryCode;
private String Email;
private String Dept1;
private String Dept2;
private String Dept3;
// Other fields and getters/setters

View File

@ -7,8 +7,8 @@ import java.util.List;
@Data
public class PassengerInfo {
private PassengerBasic passengerBasic;
private List<SequenceInfo> sequenceInfo;
private PassengerBasic PassengerBasic;
private List<SequenceInfo> SequenceInfo;
// Getters and setters
}

View File

@ -7,8 +7,8 @@ import java.util.List;
@Data
public class SequenceInfo {
private int sequence;
private List<TicketInfo> ticketInfo;
private int Sequence;
private List<TicketInfo> TicketInfo;
// Getters and setters

View File

@ -5,9 +5,9 @@ import lombok.Data;
@Data
class TicketInfo {
private String airLineCode;
private String ticketNo;
private String ticketNoSignCode;
private String status;
private String AirLineCode;
private String TicketNo;
private String TicketNoSignCode;
private String Status;
// Other fields and getters/setters
}

View File

@ -30,7 +30,10 @@ import com.chint.interfaces.rest.ctrip.dto.order.OrderTrainResponse;
import com.chint.interfaces.rest.ctrip.dto.search.SearchOrderResponse;
import com.chint.interfaces.rest.ctrip.in.CTripNoteController;
import com.chint.interfaces.rest.ctrip.order.CTripOrderDetailRequest;
import com.chint.interfaces.rest.ly.LYSearchRequest;
import com.chint.interfaces.rest.ly.dto.search.response.train.TrainDetailResponse;
import com.google.gson.Gson;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@ -90,6 +93,9 @@ public class CTripTest {
@Autowired
private CTripOrderDetailRepository ctripOrderDetailRepository;
@Autowired
private LYSearchRequest lySearchRequest;
private User user = new User(1L, "230615020", 1, "卢麟哲", "1033719135@qq.com", "15857193365", "A30000001");
//@Test
@ -195,10 +201,10 @@ public class CTripTest {
System.out.println(gson.toJson(estimate));
}
// @Test
@Test
void search() {
BaseContext.setCurrentUser(user);
SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("30931823471");
SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("31023558500");
System.out.println(response);
}
@ -426,4 +432,5 @@ public class CTripTest {
}
}
}
}