修复消费明细的部分问题

This commit is contained in:
lulz1 2024-03-18 23:00:38 +08:00
parent 3cad10498d
commit 089d1de603
4 changed files with 26 additions and 21 deletions

View File

@ -123,14 +123,11 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
carOrderDetail.setPaymentType("0");
} else {
carOrderDetail.setPaymentType("1");
}
if (!carQuickOrderInfoEntity.getOrderFeeList().isEmpty()) {
OrderFee orderFee = carQuickOrderInfoEntity.getOrderFeeList().get(0);
if (orderFee.getFeeName().equals("取消费")) {
carOrderDetail.setCancellationFee(orderFee.getAmount().toString());
} else {
}
}
OrderProduct orderProduct = carQuickOrderInfoEntity.getOrderProduct();
@ -145,8 +142,9 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
carOrderDetail.setToStationName(arrAddress.getAddressDetail());
carOrderDetail.setFromCity(depAddress.getCityName());
carOrderDetail.setToCity(arrAddress.getCityName());
Driver driver = orderProduct.getDriver();
carOrderDetail.setCarModel(driver.getDriverVehicleName());
// Driver driver = orderProduct.getDriver();
Vehicle vehicle = orderProduct.getVehicle();
carOrderDetail.setCarModel(vehicle.getVehicleName());
}
ApproveOrderNo approveOrderNo = routeOrder.getApproveOrderNo();
if (approveOrderNo != null) {
@ -286,7 +284,9 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
flightOrderDetail.setCreateTime(flightOrderBasicInfo.getCreateTime());
flightOrderDetail.setUserCode(flightOrderBasicInfo.getEmployeeID());
flightOrderDetail.setOrderAmount(String.valueOf(flightOrderBasicInfo.getAmount()));
flightOrderDetail.setPostServiceFee(String.valueOf(flightOrderBasicInfo.getPostBasicServiceFee()));
flightOrderDetail.setChangeFee(String.valueOf(flightOrderBasicInfo.getChangeAmount()));
flightOrderDetail.setRefundFee(String.valueOf(flightOrderBasicInfo.getRefundAmount()));
if (flightOrderBasicInfo.getPrepayType().equals("ACCNT")) {
flightOrderDetail.setPaymentType("0");
} else {
@ -301,8 +301,6 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
}
if (flightInfo != null) {
flightOrderDetail.setStartTime(flightInfo.getTakeoffTime());
flightOrderDetail.setArriveTime(flightInfo.getArrivalTime());
flightOrderDetail.setStartCityName(flightInfo.getDCityName());
@ -339,7 +337,6 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
}
if (tripRecordInfo != null) {
flightOrderDetail.setUserName(tripRecordInfo.getPassengerName());
flightOrderDetail.setStartTerminal(tripRecordInfo.getDPortBuilding());
flightOrderDetail.setEndTerminal(tripRecordInfo.getAPortBuilding());
flightOrderDetail.setTicketNo(tripRecordInfo.getTicketNo());
@ -367,13 +364,14 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
// flightOrderDetail.setScheduleNum(it.getLegNo()));
if (flightOrderFeeDetail != null) {
flightOrderDetail.setRefundAmount(String.valueOf(flightOrderFeeDetail.getTransactionAmount()));
}
// if (flightOrderFeeDetail != null) {
// flightOrderDetail.setRefundAmount(String.valueOf(flightOrderFeeDetail.getTransactionAmount()));
// }
if (flightRefundInfo != null) {
if (flightRefundInfo.getRefundDetail() != null && !flightRefundInfo.getRefundDetail().isEmpty()) {
FlightRefundDetail refundDetail = flightRefundInfo.getRefundDetail().get(0);
flightOrderDetail.setRefundFee(String.valueOf(refundDetail.getRefundFee()));
flightOrderDetail.setRefundAmount(String.valueOf(flightRefundInfo.getPayCustomerAmount()));
}
}

View File

@ -147,7 +147,8 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
if (orderDetail.getOrderNo().contains("C") && orderDetails.getIsChangeOrder()) {
//如果发现同程的订单号里面还有C就能够判断出 它是改签订单
flightOrderDetail.setOrderStatus(FSSC_FLIGHT_STATUS_CHANGE);
} else if (lastEvent != null) {
}
if (lastEvent != null) {
flightOrderDetail.setOrderStatus(lastEvent.mapToFlightOrderDetailStatus());
} else {
//如果订单事件为空那么就需要重新根据查询到的订单信息重新进行映射
@ -458,7 +459,8 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
OrderEvent lastEvent = it.getLastEvent();
if (trainDetailData.getIsChangedOrder().equals(1)) {
trainOrderDetail.setOrderStatus(FSSC_TRAIN_STATUS_CHANGE);
} else if (lastEvent != null) {
}
if (lastEvent != null) {
trainOrderDetail.setOrderStatus(lastEvent.mapToTrainOrderDetailStatus());
} else {
//如果订单事件为空那么就需要重新根据查询到的订单信息重新进行映射
@ -658,9 +660,9 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
carOrderDetail.setPersonalPaymentAmount(String.valueOf(carOrderDetailInfo.getPersonalPrice()));
carOrderDetail.setCompanyPaymentAmount(String.valueOf(carOrderDetailInfo.getCompanyPrice()));
if (Double.valueOf(carOrderDetail.getCompanyPaymentAmount()) > 0){
if (Double.valueOf(carOrderDetail.getCompanyPaymentAmount()) > 0) {
carOrderDetail.setPaymentType("0"); //
}else {
} else {
carOrderDetail.setPaymentType("1"); //
}
}
@ -682,12 +684,13 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
String mileage = orderExtendInfo.getMileage();
String mileageNumbers = mileage.replaceAll("\\D+", "");
carOrderDetail.setMileage(mileageNumbers);
carOrderDetail.setCarModel(orderExtendInfo.getCarTypeName());
}
if (orderDriverInfo != null) {
carOrderDetail.setCarModel(String.valueOf(orderDriverInfo.getCarType()));
}
// if (orderDriverInfo != null) {
// carOrderDetail.setCarModel(String.valueOf(orderDriverInfo.getCarType()));
// }
List<CarDetailResponse.SubmitItem> submitItemList =
data.getTravelDataInfo().getSubmitItemList();

View File

@ -142,12 +142,14 @@ public class CarOrderDetailDto implements Serializable {
private String applicantId;
private String carType;
public static CarOrderDetailDto copyFrom(CarOrderDetail carOrderDetail) {
if (carOrderDetail == null) {
return null;
}
CarOrderDetailDto carOrderDetailDto = BeanUtil.copyProperties(carOrderDetail, CarOrderDetailDto.class);
carOrderDetailDto.setCarType(carOrderDetail.getCarModel());
return carOrderDetailDto;
}
}

View File

@ -176,7 +176,9 @@ public class TrainOrderDetailDto implements Serializable {
return null;
}
TrainOrderDetailDto trainOrderDetailDto = BeanUtil.copyProperties(trainOrderDetail, TrainOrderDetailDto.class);
if(Double.parseDouble(trainOrderDetail.getRefundCost()) > 0) {
trainOrderDetailDto.setChangeCost(trainOrderDetail.getRefundCost());
}
return trainOrderDetailDto;
}
}