同步机票退款代码
This commit is contained in:
parent
c65f245406
commit
46bbad30b7
|
@ -27,10 +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.PassengerInfo;
|
||||
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;
|
||||
|
@ -417,32 +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) {
|
||||
return;
|
||||
}
|
||||
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<PassengerInfo> passengerInfo = flightOrderInfoEntity.getPassengerInfo();
|
||||
if (passengerInfo == null) {
|
||||
if (passengerInfo == null || passengerInfo.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
if (passengerInfo.get(0).getSequenceInfo() == null) {
|
||||
|
||||
List<SequenceInfo> sequenceInfo = passengerInfo.get(0).getSequenceInfo();
|
||||
if (sequenceInfo == null || sequenceInfo.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
List<ChangeInfo> changeInfo = passengerInfo.get(0).getSequenceInfo().get(0).getChangeInfo();
|
||||
|
||||
// 处理改签信息
|
||||
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(),
|
||||
|
|
Loading…
Reference in New Issue