Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
lulz1 2024-04-12 08:30:55 +08:00
commit af8a7d7a03
4 changed files with 26 additions and 19 deletions

View File

@ -160,16 +160,20 @@ public class LYOrderDetailRecordFactory {
private String translateEnSeatToCnSeat(String seatEnName) { private String translateEnSeatToCnSeat(String seatEnName) {
return switch (seatEnName) { return switch (seatEnName) {
case "secondseat" -> "二等座";
case "businessseat" -> "商务座"; case "businessseat" -> "商务座";
case "hardseat" -> "二等座"; case "firstseat" -> "一等座";
case "secondseat" -> "二等座";
case "softsleeperup" -> "软卧上铺"; case "softsleeperup" -> "软卧上铺";
case "hardsleeperup" -> "硬卧上铺"; case "hardsleeperup" -> "硬卧上铺";
case "firstseat" -> "一等座"; case "dsleeperup" -> "动卧上铺";
case "softsleeperdown" -> "软卧下铺";
case "hardsleeperdown" -> "硬卧下铺";
case "softsleepermid" -> "软卧中铺"; case "softsleepermid" -> "软卧中铺";
case "hardsleepermid" -> "硬卧中铺"; case "hardsleepermid" -> "硬卧中铺";
case "dsleepermid" -> "动卧中铺";
case "softsleeperdown" -> "软卧下铺";
case "hardsleeperdown" -> "硬卧下铺";
case "dsleeperdown" -> "动卧下铺";
case "hardseat" -> "硬座";
case "noseat" -> "无座";
default -> "未知类型座位"; default -> "未知类型座位";
}; };
} }

View File

@ -371,6 +371,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
//设置出发地和到达地 //设置出发地和到达地
roadTripName(orderTrainRecord, lyOrderTrainRecord.getTripName()); roadTripName(orderTrainRecord, lyOrderTrainRecord.getTripName());
orderTrainRecord.setIssueTicketTime(lyOrderTrainRecord.getEnterAccount()) //出票时间 yyyy-MM-dd HH:mm:ss orderTrainRecord.setIssueTicketTime(lyOrderTrainRecord.getEnterAccount()) //出票时间 yyyy-MM-dd HH:mm:ss
.setSeatType(lyOrderTrainRecord.getSeatClass())//座位等级
.setTrainNo(lyOrderTrainRecord.getTrainNo()) //车次 .setTrainNo(lyOrderTrainRecord.getTrainNo()) //车次
.setUserCode(lyOrderTrainRecord.getPassengerNo())//出行人编码 .setUserCode(lyOrderTrainRecord.getPassengerNo())//出行人编码
.setUserName(lyOrderTrainRecord.getPassengerName())//出行人姓名 .setUserName(lyOrderTrainRecord.getPassengerName())//出行人姓名
@ -407,7 +408,8 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
if (!Objects.isNull(trainOrderDetail)) { if (!Objects.isNull(trainOrderDetail)) {
orderTrainRecord.setParentOrderNo(trainOrderDetail.getParentOrderNo())//父级订单号 orderTrainRecord.setParentOrderNo(trainOrderDetail.getParentOrderNo())//父级订单号
.setRunTime(lyOrderDetailRecordFactory.getRunTime(trainOrderDetail.getStartTime(), trainOrderDetail.getArriveTime()))//时长 .setRunTime(lyOrderDetailRecordFactory.getRunTime(trainOrderDetail.getStartTime(), trainOrderDetail.getArriveTime()))//时长
.setSeatType(trainOrderDetail.getSeatType())// 座位等级 .setSeatType(Optional.ofNullable(orderTrainRecord.getSeatType())
.orElse(trainOrderDetail.getSeatType()))//座位等级
.setFromCity(trainOrderDetail.getFromCity()) //出发城市 .setFromCity(trainOrderDetail.getFromCity()) //出发城市
.setToCity(trainOrderDetail.getToCity()) //到达城市 .setToCity(trainOrderDetail.getToCity()) //到达城市
.setFromStationName(Optional.ofNullable(orderTrainRecord.getFromStationName()) .setFromStationName(Optional.ofNullable(orderTrainRecord.getFromStationName())
@ -419,7 +421,8 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
LyOrderDetailTrainRecord lyOrderDetailTrainRecord = lyOrderDetailRecordFactory.queryTrainDetail(orderSerialNo); LyOrderDetailTrainRecord lyOrderDetailTrainRecord = lyOrderDetailRecordFactory.queryTrainDetail(orderSerialNo);
orderTrainRecord.setParentOrderNo(lyOrderDetailTrainRecord.getParentOrderNo())//父级订单号 orderTrainRecord.setParentOrderNo(lyOrderDetailTrainRecord.getParentOrderNo())//父级订单号
.setRunTime(lyOrderDetailTrainRecord.getRunTime())//时长 .setRunTime(lyOrderDetailTrainRecord.getRunTime())//时长
.setSeatType(lyOrderDetailTrainRecord.getSeatType())// 座位等级 .setSeatType(Optional.ofNullable(orderTrainRecord.getSeatType())
.orElse(lyOrderDetailTrainRecord.getSeatType()))//座位等级
.setFromCity(lyOrderDetailTrainRecord.getFromCity())//出发城市 .setFromCity(lyOrderDetailTrainRecord.getFromCity())//出发城市
.setToCity(lyOrderDetailTrainRecord.getToCity())//到达城市 .setToCity(lyOrderDetailTrainRecord.getToCity())//到达城市
.setFromStationName(Optional.ofNullable(orderTrainRecord.getFromStationName()) .setFromStationName(Optional.ofNullable(orderTrainRecord.getFromStationName())

View File

@ -77,8 +77,8 @@ feishu:
appSecret: fCM2Y15linSjCOeJrIsZQdiW4ufjMFop appSecret: fCM2Y15linSjCOeJrIsZQdiW4ufjMFop
base-url: https://open.feishu.cn base-url: https://open.feishu.cn
#安能 #安能
ANAppId: cli_a5739e17577d100b ANAppId: cli_a69d262cb965500b
ANAppSecret: sNk8C7tf6wI1PcMNdyqjAcWK3m3Wp7dO ANAppSecret: RN2WkwCbANj7joD6NHEeibkCtVIoBZuC
bpm: bpm:
#集团H3 #集团H3

View File

@ -945,7 +945,7 @@ public class LYTest {
} }
@Test // @Test
void queryFlightDetail() { void queryFlightDetail() {
LyOrderDetailFlightRecord lyOrderDetailFlightRecord = new LyOrderDetailFlightRecord();//创建对象 LyOrderDetailFlightRecord lyOrderDetailFlightRecord = new LyOrderDetailFlightRecord();//创建对象
//订单明细数据 //订单明细数据
@ -974,7 +974,7 @@ public class LYTest {
} }
@Test // @Test
void queryHotelDetail() { void queryHotelDetail() {
LyOrderDetailHotelRecord lyOrderDetailHotelRecord = new LyOrderDetailHotelRecord(); LyOrderDetailHotelRecord lyOrderDetailHotelRecord = new LyOrderDetailHotelRecord();
HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail("HO20240308154500794121"); HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail("HO20240308154500794121");
@ -995,10 +995,10 @@ public class LYTest {
System.out.println(gson.toJson(lyOrderDetailHotelRecord)); System.out.println(gson.toJson(lyOrderDetailHotelRecord));
} }
@Test // @Test
void queryTrainDetail() { void queryTrainDetail() {
LyOrderDetailTrainRecord lyOrderDetailTrainRecord = new LyOrderDetailTrainRecord(); LyOrderDetailTrainRecord lyOrderDetailTrainRecord = new LyOrderDetailTrainRecord();
TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24031266448572670"); TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24032768242432787");//DT24032768242432787
TrainDetailResponse.TrainDetailData trainDetailData = trainOrderDetail.getData(); TrainDetailResponse.TrainDetailData trainDetailData = trainOrderDetail.getData();
if (trainDetailData == null) { if (trainDetailData == null) {
return; return;
@ -1024,7 +1024,7 @@ public class LYTest {
return switch (seatEnName) { return switch (seatEnName) {
case "secondseat" -> "二等座"; case "secondseat" -> "二等座";
case "businessseat" -> "商务座"; case "businessseat" -> "商务座";
case "hardseat" -> "二等"; case "hardseat" -> "";
case "softsleeperup" -> "软卧上铺"; case "softsleeperup" -> "软卧上铺";
case "hardsleeperup" -> "硬卧上铺"; case "hardsleeperup" -> "硬卧上铺";
case "firstseat" -> "一等座"; case "firstseat" -> "一等座";
@ -1037,7 +1037,7 @@ public class LYTest {
} }
@Test // @Test
void queryCarDetail() { void queryCarDetail() {
LyOrderDetailCarRecord lyOrderDetailCarRecord = new LyOrderDetailCarRecord(); LyOrderDetailCarRecord lyOrderDetailCarRecord = new LyOrderDetailCarRecord();
CarDetailResponse carDetailResponse = lySearchRequest.getCarDetailResponse("DC24031466726324898"); CarDetailResponse carDetailResponse = lySearchRequest.getCarDetailResponse("DC24031466726324898");
@ -1078,7 +1078,7 @@ public class LYTest {
@Autowired @Autowired
private JdbcLyOrderDetailFlightRecord jdbcLyOrderDetailFlightRecord; private JdbcLyOrderDetailFlightRecord jdbcLyOrderDetailFlightRecord;
@Test // @Test
public void dasfag() { public void dasfag() {
LyOrderDetailFlightRecord orderDetail = jdbcLyOrderDetailFlightRecord.findByOrderNo("123"); LyOrderDetailFlightRecord orderDetail = jdbcLyOrderDetailFlightRecord.findByOrderNo("123");
if (orderDetail != null) { if (orderDetail != null) {