修改携程飞机订单明细的生成逻辑

This commit is contained in:
lulz1 2024-03-19 16:27:45 +08:00
parent 7a4bbc1852
commit 596d0fbf1d
1 changed files with 13 additions and 10 deletions

View File

@ -218,7 +218,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
}
@Override
public FlightOrderDetail updateFlightOrderDetailData(FlightOrderDetail flightOrderDetail,Object flightOrderInfo) {
public FlightOrderDetail updateFlightOrderDetailData(FlightOrderDetail flightOrderDetail, Object flightOrderInfo) {
FlightOrderInfoEntity flightOrderInfoEntity = (FlightOrderInfoEntity) flightOrderInfo;
BasicInfo flightOrderBasicInfo = flightOrderInfoEntity.getBasicInfo();
//对基础信息的录入OrderBasicInfo
@ -286,13 +286,13 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
List<SequenceInfo> sequenceInfoList = passengerInfo.getSequenceInfo();
if (sequenceInfoList != null && !sequenceInfoList.isEmpty()) {
SequenceInfo sequenceInfo = sequenceInfoList.get(0);
if (sequenceInfo.getChangeInfo() != null && !sequenceInfo.getChangeInfo().isEmpty()) {
if (sequenceInfo.getChangeInfo() != null && !sequenceInfo.getChangeInfo().isEmpty() &&
flightOrderDetail.getOrderStatus().equals(FSSC_FLIGHT_STATUS_CHANGE)) {
ChangeInfo changeInfo = sequenceInfo.getChangeInfo().get(0);
flightOrderDetail.setUpFee(String.valueOf(changeInfo.getPriceDifferential()));
//如果是改签的要加入改签费
if (flightOrderDetail.getOrderStatus().equals(FSSC_FLIGHT_STATUS_CHANGE)) {
flightOrderDetail.setChangeFee(String.valueOf(changeInfo.getCFee()));
}
flightOrderDetail.setChangeFee(String.valueOf(changeInfo.getCFee()));
flightOrderDetail.setOrderAmount(String.valueOf(changeInfo.getCFee()));
}
}
PassengerBasic passengerBasic = passengerInfo.getPassengerBasic();
@ -309,14 +309,17 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
List<FlightRefundInfo> flightRefundInfoList = flightOrderInfoEntity.getRefundInfo();
if (flightRefundInfoList != null && !flightRefundInfoList.isEmpty()) {
FlightRefundInfo flightRefundInfo = flightRefundInfoList.get(0);
flightOrderDetail.setRefundAmount(String.valueOf(flightRefundInfo.getPayCustomerAmount()));
List<FlightRefundDetail> refundDetailList = flightRefundInfo.getRefundDetail();
if (refundDetailList != null && !refundDetailList.isEmpty()) {
if (refundDetailList != null && !refundDetailList.isEmpty() &&
flightOrderDetail.getOrderStatus().equals(FSSC_FLIGHT_STATUS_REFUND)) {
FlightRefundDetail refundDetail = refundDetailList.get(0);
//这里加一个判断 只有退票状态的机票加入 退票手续费
if (flightOrderDetail.getOrderStatus().equals(FSSC_FLIGHT_STATUS_REFUND)) {
flightOrderDetail.setRefundFee(String.valueOf(refundDetail.getRefundFee()));
}
flightOrderDetail.setRefundFee(String.valueOf(refundDetail.getRefundFee()));
flightOrderDetail.setChangeFee(String.valueOf(refundDetail.getRefundFee()));
flightOrderDetail.setRefundAmount(String.valueOf(flightRefundInfo.getPayCustomerAmount()));
flightOrderDetail.setOrderAmount("-" + flightRefundInfo.getPayCustomerAmount());
} else {
flightOrderDetail.setRefundAmount(KEEP_TWO_DECIMAL_ZERO);
}
}
return flightOrderDetail;