diff --git a/src/main/java/com/chint/domain/factoriy/order_record/LYOrderDetailRecordFactory.java b/src/main/java/com/chint/domain/factoriy/order_record/LYOrderDetailRecordFactory.java index f64811e6..c075e9f4 100644 --- a/src/main/java/com/chint/domain/factoriy/order_record/LYOrderDetailRecordFactory.java +++ b/src/main/java/com/chint/domain/factoriy/order_record/LYOrderDetailRecordFactory.java @@ -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 -> "未知类型座位"; }; } diff --git a/src/main/java/com/chint/domain/factoriy/order_record/LyOrderRecordExtensionFactory.java b/src/main/java/com/chint/domain/factoriy/order_record/LyOrderRecordExtensionFactory.java index 89ddb958..0d804781 100644 --- a/src/main/java/com/chint/domain/factoriy/order_record/LyOrderRecordExtensionFactory.java +++ b/src/main/java/com/chint/domain/factoriy/order_record/LyOrderRecordExtensionFactory.java @@ -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()) @@ -418,10 +420,11 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor } else { LyOrderDetailTrainRecord lyOrderDetailTrainRecord = lyOrderDetailRecordFactory.queryTrainDetail(orderSerialNo); orderTrainRecord.setParentOrderNo(lyOrderDetailTrainRecord.getParentOrderNo())//父级订单号 - .setRunTime(lyOrderDetailTrainRecord.getRunTime()) //时长 - .setSeatType(lyOrderDetailTrainRecord.getSeatType())// 座位等级 - .setFromCity(lyOrderDetailTrainRecord.getFromCity()) //出发城市 - .setToCity(lyOrderDetailTrainRecord.getToCity()) //到达城市 + .setRunTime(lyOrderDetailTrainRecord.getRunTime())//时长 + .setSeatType(Optional.ofNullable(orderTrainRecord.getSeatType()) + .orElse(lyOrderDetailTrainRecord.getSeatType()))//座位等级 + .setFromCity(lyOrderDetailTrainRecord.getFromCity())//出发城市 + .setToCity(lyOrderDetailTrainRecord.getToCity())//到达城市 .setFromStationName(Optional.ofNullable(orderTrainRecord.getFromStationName()) .orElse(lyOrderDetailTrainRecord.getFromStationName())) // 出发站 .setToStationName(Optional.ofNullable(orderTrainRecord.getToStationName()) diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 70ba7b84..650c5330 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -77,8 +77,8 @@ feishu: appSecret: fCM2Y15linSjCOeJrIsZQdiW4ufjMFop base-url: https://open.feishu.cn #安能 - ANAppId: cli_a5739e17577d100b - ANAppSecret: sNk8C7tf6wI1PcMNdyqjAcWK3m3Wp7dO + ANAppId: cli_a69d262cb965500b + ANAppSecret: RN2WkwCbANj7joD6NHEeibkCtVIoBZuC bpm: #集团H3 diff --git a/src/test/java/com/chint/LYTest.java b/src/test/java/com/chint/LYTest.java index 5204723b..1a8c8d39 100644 --- a/src/test/java/com/chint/LYTest.java +++ b/src/test/java/com/chint/LYTest.java @@ -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) {