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

This commit is contained in:
dengwc 2024-03-15 00:10:21 +08:00
commit 82e35245c0
4 changed files with 41 additions and 30 deletions

View File

@ -222,7 +222,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
passengerBasic = passengerInfo.getPassengerBasic();
if (passengerInfo.getSequenceInfo() != null && !passengerInfo.getSequenceInfo().isEmpty()) {
sequenceInfo = passengerInfo.getSequenceInfo().get(0);
if (!sequenceInfo.getChangeInfo().isEmpty()) {
if (sequenceInfo.getChangeInfo() != null && !sequenceInfo.getChangeInfo().isEmpty()) {
changeInfo = sequenceInfo.getChangeInfo().get(0);
}
}
@ -232,7 +232,8 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
List<FlightRefundInfo> flightRefundInfoList = flightOrderInfoEntity.getRefundInfo();
FlightRefundInfo flightRefundInfo=new FlightRefundInfo();
if (flightRefundInfoList.size() > 1) {
if (flightRefundInfoList != null && flightRefundInfoList.size() > 1) {
flightRefundInfo = flightRefundInfoList.get(0);
}
FlightOrderFeeDetail flightOrderFeeDetail = null;
@ -394,9 +395,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
Optional<OrderEvent> first1 = orderDetail.getOrderEventList()
.stream()
.findFirst();
if (first1 != null){
flightOrderDetail.setOverStandardReason(first1.get().getExtension());
}
first1.ifPresent(orderEvent -> flightOrderDetail.setOverStandardReason(orderEvent.getExtension()));
// flightOrderDetail.setPostServiceFee();
// flightOrderDetail.setParentOrderNo();
@ -568,9 +567,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
Optional<OrderEvent> first1 = orderDetail.getOrderEventList()
.stream()
.findFirst();
if (first1 != null){
hotelOrderDetail.setOverStandardReason(first1.get().getExtension());
}
first1.ifPresent(orderEvent -> hotelOrderDetail.setOverStandardReason(orderEvent.getExtension()));
return hotelOrderDetail;
}

View File

@ -27,9 +27,7 @@ import com.chint.interfaces.rest.ctrip.dto.search.SearchOrderResponse;
import com.chint.interfaces.rest.ctrip.dto.search.car.CarBasicInfo;
import com.chint.interfaces.rest.ctrip.dto.search.car.CarQuickOrderInfoEntity;
import com.chint.interfaces.rest.ctrip.dto.search.car.OrderFee;
import com.chint.interfaces.rest.ctrip.dto.search.flight.ChangeInfo;
import com.chint.interfaces.rest.ctrip.dto.search.flight.FlightOrderInfoEntity;
import com.chint.interfaces.rest.ctrip.dto.search.flight.FlightRefundInfo;
import com.chint.interfaces.rest.ctrip.dto.search.flight.*;
import com.chint.interfaces.rest.ctrip.dto.search.hotel.HotelOrderInfoEntity;
import com.chint.interfaces.rest.ctrip.dto.search.hotel.RefundInfo;
import com.chint.interfaces.rest.ly.LYSearchRequest;
@ -202,7 +200,7 @@ public class OrderDomainService {
if (orderEventType.equals(ORDER_EVENT_ETA) ||
orderEventType.equals(ORDER_EVENT_CHANGE) ||
orderEventType.equals(ORDER_EVENT_REFUND)) {
orderEventType.equals(ORDER_EVENT_REFUND) ) {
//这里如果发现事件的状态为ORDER_EVENT_ETA
//需要根据发送审批给bpm
//根据订单类型获取不同的订单扩展明细
@ -416,22 +414,39 @@ public class OrderDomainService {
private void generateRefundAndChangeOrder(String orderNo) {
SearchOrderResponse response = cTripOrderSearchRequest.searchOrderResponseByOrderId(orderNo);
FlightOrderInfoEntity flightOrderInfoEntity = response.getItineraryList().get(0).getFlightOrderInfoList().get(0);
// 处理退款信息
List<FlightRefundInfo> refundInfo = flightOrderInfoEntity.getRefundInfo();
if (refundInfo != null && !refundInfo.isEmpty()) {
for (FlightRefundInfo flightRefundInfo : refundInfo) {
if (flightRefundInfo.getRefundStatus().equals("D")) {
Command.of(CTripOrderRefundCommand.class).Info(String.valueOf(flightRefundInfo.getRefundOrderID()),
if ("D".equals(flightRefundInfo.getRefundStatus())) {
Command.of(CTripOrderRefundCommand.class).Info(
String.valueOf(flightRefundInfo.getRefundOrderID()),
flightOrderInfoEntity.getBasicInfo().getOrderID(),
"-" + flightRefundInfo.getPayCustomerAmount(),
"4",
flightRefundInfo.getRefundAplyTime()).sendToQueue();
flightRefundInfo.getRefundAplyTime()
).sendToQueue();
}
}
}
List<ChangeInfo> changeInfo = flightOrderInfoEntity.getPassengerInfo().get(0).getSequenceInfo().get(0).getChangeInfo();
// 处理乘客信息
List<PassengerInfo> passengerInfo = flightOrderInfoEntity.getPassengerInfo();
if (passengerInfo == null || passengerInfo.isEmpty()) {
return;
}
List<SequenceInfo> sequenceInfo = passengerInfo.get(0).getSequenceInfo();
if (sequenceInfo == null || sequenceInfo.isEmpty()) {
return;
}
// 处理改签信息
List<ChangeInfo> changeInfo = sequenceInfo.get(0).getChangeInfo();
if (changeInfo != null && !changeInfo.isEmpty()) {
for (ChangeInfo info : changeInfo) {
if (info.getCStatus().equals("改签成功")) {
if ("改签成功".equals(info.getCStatus())) {
Command.of(CTripOrderRefundCommand.class).Info(
String.valueOf(info.getRebookId()),
flightOrderInfoEntity.getBasicInfo().getOrderID(),
@ -447,8 +462,6 @@ public class OrderDomainService {
private void generateHotelRefundAndChangeOrder(String orderNo) {
SearchOrderResponse response = cTripOrderSearchRequest.searchOrderResponseByOrderId(orderNo);
HotelOrderInfoEntity flightOrderInfoEntity = response.getItineraryList().get(0).getHotelOrderInfoList().get(0);
List<RefundInfo> refundInfo = flightOrderInfoEntity.getRefundInfo();
if (refundInfo != null && !refundInfo.isEmpty()) {
for (RefundInfo flightRefundInfo : refundInfo) {

View File

@ -164,7 +164,8 @@ public class CTripNoteController {
return switch (status) {
case "Submitted" -> OrderConstant.ORDER_EVENT_PREPARE; // "已提交"映射到准备状态
case "Confirmed" -> OrderConstant.ORDER_EVENT_ORDERED; // "已客户确认"映射到已下单
case "Cancelled" -> OrderConstant.ORDER_EVENT_CANCEL; // "已取消"映射到取消
case "Cancelled" -> OrderConstant.ORDER_EVENT_REFUND; // "已取消"映射到取消
case "Refunded" -> OrderConstant.ORDER_EVENT_REFUND; // "已取消"映射到取消
case "Wait" ->
// "确认中"可能表示订单正在处理中但没有直接映射可能需要新的状态常量
OrderConstant.ORDER_EVENT_ORDERED;

View File

@ -4,19 +4,19 @@ server:
chint:
loginSecretKey: ZhengTaiRoute
datasource:
# driver-class-name: com.mysql.cj.jdbc.Driver
# host: 10.10.68.67
# port: 6603
# database: itinerary_booking
# username: tripbookpro
# password: W@Xbf25d&lG5k*L01X#
driver-class-name: com.mysql.cj.jdbc.Driver
host: 10.10.24.44
# host: 10.9.56.48
host: 10.10.68.67
port: 6603
database: itinerary_booking
username: tripbook
password: W@Xgf25d&lRk*L0X#
username: tripbookpro
password: W@Xbf25d&lG5k*L01X#
# driver-class-name: com.mysql.cj.jdbc.Driver
# host: 10.10.24.44
# # host: 10.9.56.48
# port: 6603
# database: itinerary_booking
# username: tripbook
# password: W@Xgf25d&lRk*L0X#
url: https://trip.chint.com/
redis:
host: 10.10.68.66