同步代码
This commit is contained in:
parent
962c1c448f
commit
a2e9018143
|
@ -1,14 +1,11 @@
|
||||||
package com.chint.application.out;
|
package com.chint.application.out;
|
||||||
|
|
||||||
|
|
||||||
import com.chint.application.dtos.response.LegRes;
|
|
||||||
import com.chint.application.dtos.response.OrderDetailRes;
|
|
||||||
import com.chint.application.dtos.response.RouteOrderPageRes;
|
import com.chint.application.dtos.response.RouteOrderPageRes;
|
||||||
import com.chint.application.dtos.response.RouteOrderRes;
|
import com.chint.application.dtos.response.RouteOrderRes;
|
||||||
import com.chint.application.dtos.trip.TripCallback;
|
import com.chint.application.dtos.trip.TripCallback;
|
||||||
import com.chint.application.queryies.OrderQuery;
|
import com.chint.application.queryies.OrderQuery;
|
||||||
import com.chint.domain.aggregates.order.RouteOrder;
|
import com.chint.domain.aggregates.order.RouteOrder;
|
||||||
import com.chint.domain.aggregates.user.User;
|
|
||||||
import com.chint.domain.repository.UserRepository;
|
import com.chint.domain.repository.UserRepository;
|
||||||
import com.chint.domain.value_object.*;
|
import com.chint.domain.value_object.*;
|
||||||
import com.chint.infrastructure.util.PageResult;
|
import com.chint.infrastructure.util.PageResult;
|
||||||
|
@ -21,10 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS;
|
import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS;
|
||||||
import static com.chint.infrastructure.constant.OrderConstant.*;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/order")
|
@RequestMapping("/order")
|
||||||
|
@ -40,9 +34,10 @@ public class OrderOutController {
|
||||||
|
|
||||||
@ApiOperation("根据临时单号和系统编码查询订单")
|
@ApiOperation("根据临时单号和系统编码查询订单")
|
||||||
@PostMapping("/query/billcode")
|
@PostMapping("/query/billcode")
|
||||||
public Result<RouteOrder> queryOrderByBillCodeAndSysCode(@RequestBody OrderQueryData queryData) {
|
public Result<RouteOrderRes> queryOrderByBillCodeAndSysCode(@RequestBody OrderQueryData queryData) {
|
||||||
return Result.Success(SUCCESS, orderQuery.queryByBillCodeAndSysCode(queryData.getBillcode(), queryData.getSysCode())
|
RouteOrder routeOrder = orderQuery.queryByBillCodeAndSysCode(queryData.getBillcode(), queryData.getSysCode())
|
||||||
.reloadStatus());
|
.reloadStatus();
|
||||||
|
return Result.Success(SUCCESS, orderQuery.queryRouteDetail(routeOrder));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,22 +45,7 @@ public class OrderOutController {
|
||||||
@PostMapping("/query")
|
@PostMapping("/query")
|
||||||
public Result<RouteOrderRes> queryOrder(@RequestBody OrderQueryData queryData) {
|
public Result<RouteOrderRes> queryOrder(@RequestBody OrderQueryData queryData) {
|
||||||
RouteOrder routeOrder = orderQuery.queryById(queryData.getRouteId()).reloadStatus();
|
RouteOrder routeOrder = orderQuery.queryById(queryData.getRouteId()).reloadStatus();
|
||||||
RouteOrderRes routeOrderRes = RouteOrderRes.copyFrom(routeOrder);
|
RouteOrderRes routeOrderRes = orderQuery.queryRouteDetail(routeOrder);
|
||||||
List<LegRes> list = routeOrder.getLegItems().stream().map(LegRes::copyFrom).toList();
|
|
||||||
routeOrderRes.setLegResList(list);
|
|
||||||
List<OrderDetailRes> orderDetailResList = routeOrder
|
|
||||||
.getOrderDetails()
|
|
||||||
.stream()
|
|
||||||
.map(OrderDetailRes::copyFrom)
|
|
||||||
.toList();
|
|
||||||
User user = userRepository.findByUserEmployeeNo(routeOrder.getUserId());
|
|
||||||
routeOrderRes.setUserName(user.getName());
|
|
||||||
routeOrderRes.setOrderDetailRes(orderDetailResList);
|
|
||||||
routeOrderRes.setOrderDetailRes(routeOrderRes
|
|
||||||
.getOrderDetailRes()
|
|
||||||
.stream()
|
|
||||||
.filter(it -> !it.getOrderStatus().equals(ORDER_EVENT_CANCEL_NAME) && !it.getOrderStatus().equals(ORDER_EVENT_PREPARE_NAME))
|
|
||||||
.toList());
|
|
||||||
return Result.Success(SUCCESS, routeOrderRes);
|
return Result.Success(SUCCESS, routeOrderRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +74,6 @@ public class OrderOutController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("根据Id查询行程规划单-元年数据")
|
@ApiOperation("根据Id查询行程规划单-元年数据")
|
||||||
@PostMapping("/query/tripCallback")
|
@PostMapping("/query/tripCallback")
|
||||||
public Result<TripCallback> queryTripCallbackData(@RequestBody OrderQueryData queryData) {
|
public Result<TripCallback> queryTripCallbackData(@RequestBody OrderQueryData queryData) {
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package com.chint.application.queryies;
|
package com.chint.application.queryies;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.chint.application.dtos.response.LocationRes;
|
import com.chint.application.dtos.response.*;
|
||||||
import com.chint.application.dtos.response.RouteOrderPageRes;
|
|
||||||
import com.chint.application.dtos.trip.*;
|
import com.chint.application.dtos.trip.*;
|
||||||
import com.chint.application.queryies.estimate.EstimatePrice;
|
import com.chint.application.queryies.estimate.EstimatePrice;
|
||||||
import com.chint.domain.aggregates.location.CityEntity;
|
import com.chint.domain.aggregates.location.CityEntity;
|
||||||
|
@ -32,6 +31,8 @@ import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_CANCEL_NAME;
|
||||||
|
import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_PREPARE_NAME;
|
||||||
import static com.chint.infrastructure.constant.SupplierNameConstant.SUPPLIER_C_TRIP;
|
import static com.chint.infrastructure.constant.SupplierNameConstant.SUPPLIER_C_TRIP;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -295,4 +296,24 @@ public class OrderQuery {
|
||||||
default -> FSSCConstant.TRIP_CALLBACK_OTHER_TYPE;
|
default -> FSSCConstant.TRIP_CALLBACK_OTHER_TYPE;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RouteOrderRes queryRouteDetail(RouteOrder routeOrder){
|
||||||
|
RouteOrderRes routeOrderRes = RouteOrderRes.copyFrom(routeOrder);
|
||||||
|
List<LegRes> list = routeOrder.getLegItems().stream().map(LegRes::copyFrom).toList();
|
||||||
|
routeOrderRes.setLegResList(list);
|
||||||
|
List<OrderDetailRes> orderDetailResList = routeOrder
|
||||||
|
.getOrderDetails()
|
||||||
|
.stream()
|
||||||
|
.map(OrderDetailRes::copyFrom)
|
||||||
|
.toList();
|
||||||
|
User user = userRepository.findByUserEmployeeNo(routeOrder.getUserId());
|
||||||
|
routeOrderRes.setUserName(user.getName());
|
||||||
|
routeOrderRes.setOrderDetailRes(orderDetailResList);
|
||||||
|
routeOrderRes.setOrderDetailRes(routeOrderRes
|
||||||
|
.getOrderDetailRes()
|
||||||
|
.stream()
|
||||||
|
.filter(it -> !it.getOrderStatus().equals(ORDER_EVENT_CANCEL_NAME) && !it.getOrderStatus().equals(ORDER_EVENT_PREPARE_NAME))
|
||||||
|
.toList());
|
||||||
|
return routeOrderRes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
||||||
flightOrderDetail.setBookingUserPhone(user.getPhoneNumber());
|
flightOrderDetail.setBookingUserPhone(user.getPhoneNumber());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,80 @@ package com.chint.interfaces.rest.ctrip.dto.search.flight;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class BasicInfo {
|
public class BasicInfo {
|
||||||
private String orderID;
|
private String OrderID;
|
||||||
private String tripID;
|
private String TripID;
|
||||||
private String orderStatus;
|
private String OrderStatus;
|
||||||
private String orderStatusCode;
|
private String OrderStatusCode;
|
||||||
private String UID;
|
private String UID;
|
||||||
|
private String PreEmployName;
|
||||||
|
private String EmployeeID;
|
||||||
|
private int AccountID;
|
||||||
|
private int SubAccountID;
|
||||||
|
private String CorpPayType;
|
||||||
|
private String CreateTime;
|
||||||
|
private String FinishDate;
|
||||||
|
private String PrintTicketTime;
|
||||||
|
private String FlightClass;
|
||||||
|
private String FlightWay;
|
||||||
|
private String Remarks;
|
||||||
|
private int PreBookDays;
|
||||||
|
private ServiceDetailInfo ServiceDetailInfo;
|
||||||
|
private String NBillingType;
|
||||||
|
private String TicketStatus;
|
||||||
|
private String RebookOrderID;
|
||||||
|
private String ServerFrom;
|
||||||
|
private String IsOfficialCard;
|
||||||
|
private String BookingChannel;
|
||||||
|
private String PlatformOrderID;
|
||||||
|
private double PayExchangeRate;
|
||||||
|
private int OperationCode;
|
||||||
|
private double Amount;
|
||||||
|
private double TravelMoney;
|
||||||
|
private double ChangeAmount;
|
||||||
|
private double RefundAmount;
|
||||||
|
private double CCardPayFee;
|
||||||
|
private double SendTicketFee;
|
||||||
|
private double InsuranceFee;
|
||||||
|
private String PrepayType;
|
||||||
|
private double TotalServiceFee;
|
||||||
|
private String Currency;
|
||||||
|
private double ForeignAmount;
|
||||||
|
private boolean Refundable;
|
||||||
|
private boolean Rebookable;
|
||||||
private String JourneyID;
|
private String JourneyID;
|
||||||
// Other fields and getters/setters
|
private String CostCenter;
|
||||||
|
private String CostCenter2;
|
||||||
|
private String CostCenter3;
|
||||||
|
private String CostCenter4;
|
||||||
|
private String CostCenter5;
|
||||||
|
private String CostCenter6;
|
||||||
|
private String DefineFlag;
|
||||||
|
private String DefineFlag2;
|
||||||
|
private String JourneyReason;
|
||||||
|
private String Project;
|
||||||
|
private String AuditStatus;
|
||||||
|
private String ConfirmPerson;
|
||||||
|
private String ConfirmPerson2;
|
||||||
|
private Object ConfirmPersonCC;
|
||||||
|
private Object ConfirmPersonCC2;
|
||||||
|
private String ConfirmType;
|
||||||
|
private String ConfirmType2;
|
||||||
|
private boolean PayMixed;
|
||||||
|
private List<PaymentItem> PaymentItemList;
|
||||||
|
private String IsOnline;
|
||||||
|
private String CorporationId;
|
||||||
|
private int DockingVendorPlatform;
|
||||||
|
private Object DockingVendorPlatformAccount;
|
||||||
|
private Object CorpDockingInfoList;
|
||||||
|
private Object AirlineCountryIdEqualAccount;
|
||||||
|
private String PreEmployNamePinYin;
|
||||||
|
private boolean CancelAble;
|
||||||
|
private double NewTotalServiceFee;
|
||||||
|
private double PostBasicServiceFee;
|
||||||
|
private double PostItineraryFee;
|
||||||
|
private Object NewOrderIdList;
|
||||||
}
|
}
|
|
@ -1,12 +1,17 @@
|
||||||
package com.chint.interfaces.rest.ctrip.dto.search.flight;
|
package com.chint.interfaces.rest.ctrip.dto.search.flight;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
class DeliveryInfo {
|
public class DeliveryInfo {
|
||||||
private String deliveryInfo;
|
private String DeliveryInfo;
|
||||||
private String contactPhone;
|
private String ContactPhone;
|
||||||
private String contactMobile;
|
private String ContactMobile;
|
||||||
private String contactName;
|
private String ContactName;
|
||||||
// Other fields and getters/setters
|
private String DeliveryAddress;
|
||||||
|
private String ContactEmail;
|
||||||
|
private String ProvideBillType;
|
||||||
|
|
||||||
|
// getters and setters
|
||||||
}
|
}
|
|
@ -7,9 +7,9 @@ import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class FlightOrderInfoEntity {
|
public class FlightOrderInfoEntity {
|
||||||
private BasicInfo basicInfo;
|
private BasicInfo BasicInfo;
|
||||||
private DeliveryInfo deliveryInfo;
|
private DeliveryInfo DeliveryInfo;
|
||||||
private List<FlightInfo> flightInfo;
|
private List<FlightInfo> FlightInfo;
|
||||||
private List<PassengerInfo> passengerInfo;
|
private List<PassengerInfo> PassengerInfo;
|
||||||
private List<FlightOrderFeeDetail> flightOrderFeeDetailList;
|
private List<FlightOrderFeeDetail> FlightOrderFeeDetailList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.chint.interfaces.rest.ctrip.dto.search.flight;
|
||||||
|
|
||||||
|
class ItemDetail {
|
||||||
|
private int Sequence;
|
||||||
|
private long PassengerId;
|
||||||
|
private String PassengerName;
|
||||||
|
private String FeeCode;
|
||||||
|
private double FeeAmount;
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.chint.interfaces.rest.ctrip.dto.search.flight;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
class PaymentItem {
|
||||||
|
private String PayType;
|
||||||
|
private double PayAmount;
|
||||||
|
private List<ItemDetail> ItemDetailList;
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.chint.interfaces.rest.ctrip.dto.search.flight;
|
||||||
|
|
||||||
|
class ServiceDetailInfo {
|
||||||
|
private double BaseServiceFee;
|
||||||
|
private double BindServiceFee;
|
||||||
|
private double SpecialServiceFee;
|
||||||
|
private double UnWorkTimeServiceFee;
|
||||||
|
private double VIPServiceFee;
|
||||||
|
private double ItineraryFeeForRMB;
|
||||||
|
private double ItineraryFeeForForeign;
|
||||||
|
private double TechnicalServiceFee;
|
||||||
|
private double PresentInsuranceServiceFee;
|
||||||
|
}
|
|
@ -53,11 +53,11 @@ class RouteApplicationTests {
|
||||||
LocalDateTime parse = LocalDateTime.parse("2024-04-15 23:59:00", dateTimeFormatter);
|
LocalDateTime parse = LocalDateTime.parse("2024-04-15 23:59:00", dateTimeFormatter);
|
||||||
System.out.println(parse);
|
System.out.println(parse);
|
||||||
}
|
}
|
||||||
// @Test
|
@Test
|
||||||
void loginSign() {
|
void loginSign() {
|
||||||
String sfno = "170717012";
|
String sfno = "230615020";
|
||||||
String syscode = "FSSC";
|
String syscode = "FSSC";
|
||||||
String billcode = "CLSQ240225000099";
|
String billcode = "CLSQ240226000100";
|
||||||
String companycode = "正泰集团股份有限公司";
|
String companycode = "正泰集团股份有限公司";
|
||||||
String sec = "Superdandan";
|
String sec = "Superdandan";
|
||||||
String timespan = "1708908662738";
|
String timespan = "1708908662738";
|
||||||
|
|
Loading…
Reference in New Issue