结算明细字段映射调整
This commit is contained in:
parent
1ce0b7a4d7
commit
eea3524793
|
@ -160,16 +160,20 @@ public class LYOrderDetailRecordFactory {
|
|||
|
||||
private String translateEnSeatToCnSeat(String seatEnName) {
|
||||
return switch (seatEnName) {
|
||||
case "secondseat" -> "二等座";
|
||||
case "businessseat" -> "商务座";
|
||||
case "hardseat" -> "二等座";
|
||||
case "firstseat" -> "一等座";
|
||||
case "secondseat" -> "二等座";
|
||||
case "softsleeperup" -> "软卧上铺";
|
||||
case "hardsleeperup" -> "硬卧上铺";
|
||||
case "firstseat" -> "一等座";
|
||||
case "softsleeperdown" -> "软卧下铺";
|
||||
case "hardsleeperdown" -> "硬卧下铺";
|
||||
case "dsleeperup" -> "动卧上铺";
|
||||
case "softsleepermid" -> "软卧中铺";
|
||||
case "hardsleepermid" -> "硬卧中铺";
|
||||
case "dsleepermid" -> "动卧中铺";
|
||||
case "softsleeperdown" -> "软卧下铺";
|
||||
case "hardsleeperdown" -> "硬卧下铺";
|
||||
case "dsleeperdown" -> "动卧下铺";
|
||||
case "hardseat" -> "硬座";
|
||||
case "noseat" -> "无座";
|
||||
default -> "未知类型座位";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -371,6 +371,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
|||
//设置出发地和到达地
|
||||
roadTripName(orderTrainRecord, lyOrderTrainRecord.getTripName());
|
||||
orderTrainRecord.setIssueTicketTime(lyOrderTrainRecord.getEnterAccount()) //出票时间 yyyy-MM-dd HH:mm:ss
|
||||
.setSeatType(lyOrderTrainRecord.getSeatClass())//座位等级
|
||||
.setTrainNo(lyOrderTrainRecord.getTrainNo()) //车次
|
||||
.setUserCode(lyOrderTrainRecord.getPassengerNo())//出行人编码
|
||||
.setUserName(lyOrderTrainRecord.getPassengerName())//出行人姓名
|
||||
|
@ -407,7 +408,8 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
|||
if (!Objects.isNull(trainOrderDetail)) {
|
||||
orderTrainRecord.setParentOrderNo(trainOrderDetail.getParentOrderNo())//父级订单号
|
||||
.setRunTime(lyOrderDetailRecordFactory.getRunTime(trainOrderDetail.getStartTime(), trainOrderDetail.getArriveTime()))//时长
|
||||
.setSeatType(trainOrderDetail.getSeatType())// 座位等级
|
||||
.setSeatType(Optional.ofNullable(orderTrainRecord.getSeatType())
|
||||
.orElse(trainOrderDetail.getSeatType()))//座位等级
|
||||
.setFromCity(trainOrderDetail.getFromCity()) //出发城市
|
||||
.setToCity(trainOrderDetail.getToCity()) //到达城市
|
||||
.setFromStationName(Optional.ofNullable(orderTrainRecord.getFromStationName())
|
||||
|
@ -419,7 +421,8 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
|||
LyOrderDetailTrainRecord lyOrderDetailTrainRecord = lyOrderDetailRecordFactory.queryTrainDetail(orderSerialNo);
|
||||
orderTrainRecord.setParentOrderNo(lyOrderDetailTrainRecord.getParentOrderNo())//父级订单号
|
||||
.setRunTime(lyOrderDetailTrainRecord.getRunTime())//时长
|
||||
.setSeatType(lyOrderDetailTrainRecord.getSeatType())// 座位等级
|
||||
.setSeatType(Optional.ofNullable(orderTrainRecord.getSeatType())
|
||||
.orElse(lyOrderDetailTrainRecord.getSeatType()))//座位等级
|
||||
.setFromCity(lyOrderDetailTrainRecord.getFromCity())//出发城市
|
||||
.setToCity(lyOrderDetailTrainRecord.getToCity())//到达城市
|
||||
.setFromStationName(Optional.ofNullable(orderTrainRecord.getFromStationName())
|
||||
|
|
|
@ -945,7 +945,7 @@ public class LYTest {
|
|||
}
|
||||
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void queryFlightDetail() {
|
||||
LyOrderDetailFlightRecord lyOrderDetailFlightRecord = new LyOrderDetailFlightRecord();//创建对象
|
||||
//订单明细数据
|
||||
|
@ -974,7 +974,7 @@ public class LYTest {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void queryHotelDetail() {
|
||||
LyOrderDetailHotelRecord lyOrderDetailHotelRecord = new LyOrderDetailHotelRecord();
|
||||
HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail("HO20240308154500794121");
|
||||
|
@ -995,10 +995,10 @@ public class LYTest {
|
|||
System.out.println(gson.toJson(lyOrderDetailHotelRecord));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void queryTrainDetail() {
|
||||
LyOrderDetailTrainRecord lyOrderDetailTrainRecord = new LyOrderDetailTrainRecord();
|
||||
TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24031266448572670");
|
||||
TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24032768242432787");//DT24032768242432787
|
||||
TrainDetailResponse.TrainDetailData trainDetailData = trainOrderDetail.getData();
|
||||
if (trainDetailData == null) {
|
||||
return;
|
||||
|
@ -1024,7 +1024,7 @@ public class LYTest {
|
|||
return switch (seatEnName) {
|
||||
case "secondseat" -> "二等座";
|
||||
case "businessseat" -> "商务座";
|
||||
case "hardseat" -> "二等座";
|
||||
case "hardseat" -> "硬座";
|
||||
case "softsleeperup" -> "软卧上铺";
|
||||
case "hardsleeperup" -> "硬卧上铺";
|
||||
case "firstseat" -> "一等座";
|
||||
|
@ -1037,7 +1037,7 @@ public class LYTest {
|
|||
}
|
||||
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
void queryCarDetail() {
|
||||
LyOrderDetailCarRecord lyOrderDetailCarRecord = new LyOrderDetailCarRecord();
|
||||
CarDetailResponse carDetailResponse = lySearchRequest.getCarDetailResponse("DC24031466726324898");
|
||||
|
@ -1078,7 +1078,7 @@ public class LYTest {
|
|||
|
||||
@Autowired
|
||||
private JdbcLyOrderDetailFlightRecord jdbcLyOrderDetailFlightRecord;
|
||||
@Test
|
||||
// @Test
|
||||
public void dasfag() {
|
||||
LyOrderDetailFlightRecord orderDetail = jdbcLyOrderDetailFlightRecord.findByOrderNo("123");
|
||||
if (orderDetail != null) {
|
||||
|
|
Loading…
Reference in New Issue