1.修改携程打车数据赋值

This commit is contained in:
wanglf3 2024-03-14 17:20:22 +08:00
parent af95a7e13a
commit 514d03efe5
3 changed files with 57 additions and 16 deletions

View File

@ -96,7 +96,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
if (passengerInfo != null) {
carOrderDetail.setUserName(passengerInfo.getPassengerName());
carOrderDetail.setUserCode(passengerInfo.getIntlCode());
carOrderDetail.setUserCode(passengerInfo.getEmployeeId());
carOrderDetail.setPhone(passengerInfo.getPassengerPhone());
carOrderDetail.setBOOK_ORG_STRUCT_1(passengerInfo.getDept1());
carOrderDetail.setBOOK_ORG_STRUCT_2(passengerInfo.getDept2());
@ -105,9 +105,32 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
carOrderDetail.setReceiptsNum(routeOrder.getRouteOrderNo());
carOrderDetail.setCreateTime(carBasicInfo.getCreateTime());
carOrderDetail.setOrderAmount(String.valueOf(carBasicInfo.getOrderAmount()));
carOrderDetail.setPersonalPaymentAmount(String.valueOf(carBasicInfo.getAccntAmount()));
carOrderDetail.setCompanyPaymentAmount(String.valueOf(carBasicInfo.getPersonAmount()));
carOrderDetail.setPaymentType(String.valueOf(carBasicInfo.getPaymentType())); //
if (!carQuickOrderInfoEntity.getOrderFeeList().isEmpty()){
OrderFee orderFee = carQuickOrderInfoEntity.getOrderFeeList().get(0);
if (carOrderDetail.getPaymentType().equals("ACCNT")) {
carOrderDetail.setPaymentType("0");
} else {
carOrderDetail.setPaymentType("1");
}
carOrderDetail.setPersonalPaymentAmount(String.valueOf(orderFee.getAccntAmount()));
carOrderDetail.setCompanyPaymentAmount(String.valueOf(orderFee.getPersonAmount()));
if (orderFee.getFeeName().equals("取消费")){
carOrderDetail.setCancellationFee(orderFee.getAmount().toString());
}else{
}
}
OrderProduct orderProduct = carQuickOrderInfoEntity.getOrderProduct();
if (orderProduct != null) {
@ -198,7 +221,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
}
}
FlightRefundInfo flightRefundInfo = flightOrderInfoEntity.getRefundInfo().get(0);
// FlightRefundInfo flightRefundInfo = flightOrderInfoEntity.getRefundInfo().get(0);
List<FlightRefundInfo> flightRefundInfoList = flightOrderInfoEntity.getRefundInfo();
FlightRefundInfo flightRefundInfo=new FlightRefundInfo();
@ -347,7 +370,6 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
}
}
OrderDetail orderDetail = orderDetailRepository.findByOrderNo(flightOrderBasicInfo.getOrderID())
.orElseThrow(() -> new NotFoundException(NOT_FOUND));
Optional<Integer> firstOrderEvent = orderDetail.getOrderEventList()

View File

@ -204,7 +204,26 @@ public class CTripTest {
@Test
void search() {
BaseContext.setCurrentUser(user);
SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("31023558500");
SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("31022448436");
System.out.println(response);
response = orderSearchRequest.searchOrderResponseByOrderId("31018642992");
System.out.println(response);
response = orderSearchRequest.searchOrderResponseByOrderId("31021935860");
System.out.println(response);
response = orderSearchRequest.searchOrderResponseByOrderId("31022442484");
System.out.println(response);
response = orderSearchRequest.searchOrderResponseByOrderId("31024617012");
System.out.println(response);
response = orderSearchRequest.searchOrderResponseByOrderId("31025266484");
System.out.println(response);
response = orderSearchRequest.searchOrderResponseByOrderId("31025198037");
System.out.println(response);
}

View File

@ -788,16 +788,16 @@ public class LYTest {
@Test
void search(){
// FlightOrderResponse t1 = lySearchRequest
// .getFlightOrderDetail("DT24031366640776789");
// Gson gson = new Gson();
// String json = gson.toJson(t1);
// System.out.println(json);
TrainDetailResponse trainDetailResponse = lySearchRequest.getTrainOrderDetail("DT24031366640776789");
FlightOrderResponse t1 = lySearchRequest
.getFlightOrderDetail("DFR24031466691835702");
Gson gson = new Gson();
String json = gson.toJson(trainDetailResponse);
String json = gson.toJson(t1);
System.out.println(json);
// TrainDetailResponse trainDetailResponse = lySearchRequest.getTrainOrderDetail("DFR24031466691835702");
// Gson gson = new Gson();
// String json = gson.toJson(trainDetailResponse);
// System.out.println(json);
}
}