Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
c8101a9d50
|
@ -1,6 +1,8 @@
|
|||
package com.chint.application.in;
|
||||
|
||||
|
||||
import com.chint.domain.factoriy.order_record.LyStatementOrder;
|
||||
import com.chint.infrastructure.echo_framework.command.Command;
|
||||
import com.chint.application.commands.OrderRecordGenerateCommand;
|
||||
import com.chint.domain.factoriy.order_record.LyStatementOrder;
|
||||
import com.chint.infrastructure.echo_framework.command.Command;
|
||||
|
@ -12,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.chint.application.commands.OrderRecordGenerateCommand;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
@ -38,7 +41,7 @@ public class AutoWorkController {
|
|||
public Result<String> autoSaveCTripRecord() {
|
||||
cTripOrderRecordAutoSave.saveAll();
|
||||
//将昨天的结算数据生成为财务共享需要的数据
|
||||
Command.of(OrderRecordGenerateCommand.class).sendToQueue();
|
||||
// Command.of(OrderRecordGenerateCommand.class).sendToQueue();
|
||||
return Result.Success(SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
package com.chint.domain.aggregates.order.ctrip;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.MappedCollection;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
@Table("c_trip_car_record")
|
||||
public class CTripCarRecord {
|
||||
|
||||
@Id
|
||||
private Long id;
|
||||
@MappedCollection(idColumn = "id")
|
||||
private CTripCarRecordBase cTripCarRecordBase;
|
||||
|
||||
|
||||
}
|
|
@ -1,127 +0,0 @@
|
|||
package com.chint.domain.aggregates.order.ctrip;
|
||||
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderHotelResponse;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author wanglf3
|
||||
* @date 2024-03-09
|
||||
* @vsrsion 1.0
|
||||
**/
|
||||
@Data
|
||||
@Table("c_trip_order_hotel_settlement_base_info")
|
||||
public class CTripHotelRecordBase implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3087333171110684513L;
|
||||
@Id
|
||||
private Long id;
|
||||
private Long recordId;
|
||||
private Long orderId;
|
||||
private Integer accountId;
|
||||
private String uid;
|
||||
private String detailType;
|
||||
private String payType;
|
||||
private String hotelType;
|
||||
private Double price;
|
||||
private Integer quantity;
|
||||
private Double amount;
|
||||
private Double serviceFee;
|
||||
private Double extraCharge;
|
||||
private String accCheckBatchNo;
|
||||
private String createTime;
|
||||
private String datachangeLasttime;
|
||||
private Integer orderType;
|
||||
private String subAccCheckBatchNo;
|
||||
private Long tripId;
|
||||
private String settlementCurrency;
|
||||
private Boolean isChecked;
|
||||
private String dailyAvgPriceInfo;
|
||||
private String invoiceIds;
|
||||
private String batchStartDate;
|
||||
private String batchEndDate;
|
||||
private Double frontendServiceFee;
|
||||
private Double coupon;
|
||||
private Long relatedCostsId;
|
||||
private String apportionMode;
|
||||
private String orderRoomMode;
|
||||
private String clientApprovalNo;
|
||||
private String fellowApprovalNo;
|
||||
private Double loanServiceFee;
|
||||
private String clientName;
|
||||
private String employeeId;
|
||||
private Double insuranceAmount;
|
||||
private Double personAmount;
|
||||
private BigDecimal channelFee;
|
||||
private BigDecimal personalChannelFee;
|
||||
private BigDecimal paidAmount;
|
||||
private BigDecimal personalTotalAmount;
|
||||
private BigDecimal personalRemittedTax;
|
||||
private BigDecimal bookServiceFee;
|
||||
private BigDecimal modifyServiceFee;
|
||||
private BigDecimal cancelServiceFee;
|
||||
private BigDecimal payDiscountAmount;
|
||||
private BigDecimal averageRoomPrice;
|
||||
|
||||
|
||||
|
||||
public static CTripHotelRecordBase changeInfo(OrderHotelResponse.SettlementDetail SettlementDetail) {
|
||||
CTripHotelRecordBase ctripHotelOrderDetail = new CTripHotelRecordBase();
|
||||
if (SettlementDetail != null){
|
||||
ctripHotelOrderDetail.setRecordId(SettlementDetail.getRecordId());
|
||||
ctripHotelOrderDetail.setOrderId(SettlementDetail.getOrderID());
|
||||
ctripHotelOrderDetail.setAccountId(SettlementDetail.getAccountId());
|
||||
ctripHotelOrderDetail.setUid(SettlementDetail.getUid());
|
||||
ctripHotelOrderDetail.setDetailType(SettlementDetail.getDetailType());
|
||||
ctripHotelOrderDetail.setPayType(SettlementDetail.getPayType());
|
||||
ctripHotelOrderDetail.setHotelType(SettlementDetail.getHotelType());
|
||||
ctripHotelOrderDetail.setPrice(SettlementDetail.getPrice());
|
||||
ctripHotelOrderDetail.setQuantity(SettlementDetail.getQuantity());
|
||||
ctripHotelOrderDetail.setAmount(SettlementDetail.getAmount());
|
||||
ctripHotelOrderDetail.setServiceFee(SettlementDetail.getServicefee());
|
||||
ctripHotelOrderDetail.setExtraCharge(SettlementDetail.getExtraCharge());
|
||||
ctripHotelOrderDetail.setAccCheckBatchNo(SettlementDetail.getAccCheckBatchNo());
|
||||
ctripHotelOrderDetail.setCreateTime(SettlementDetail.getCreatetime());
|
||||
ctripHotelOrderDetail.setDatachangeLasttime(SettlementDetail.getDatachange_Lasttime());
|
||||
ctripHotelOrderDetail.setOrderType(SettlementDetail.getOrderType());
|
||||
ctripHotelOrderDetail.setSubAccCheckBatchNo(SettlementDetail.getSubAccCheckBatchNo());
|
||||
ctripHotelOrderDetail.setTripId(SettlementDetail.getTripID());
|
||||
ctripHotelOrderDetail.setSettlementCurrency(SettlementDetail.getSettlementCurrency());
|
||||
ctripHotelOrderDetail.setIsChecked(SettlementDetail.isIsChecked());
|
||||
// ctripHotelOrderDetailis.setDailyAvgPriceInfo(SettlementDetail.getDailyAvgPriceInfo());
|
||||
// ctripHotelOrderDetailis.setInvoiceIds(SettlementDetail.getInvoiceIds());
|
||||
ctripHotelOrderDetail.setBatchStartDate(SettlementDetail.getBatchStartDate());
|
||||
ctripHotelOrderDetail.setBatchEndDate(SettlementDetail.getBatchEndDate());
|
||||
ctripHotelOrderDetail.setFrontendServiceFee(SettlementDetail.getFrontendServiceFee());
|
||||
ctripHotelOrderDetail.setCoupon(SettlementDetail.getCoupon());
|
||||
ctripHotelOrderDetail.setRelatedCostsId(SettlementDetail.getRelatedCostsID());
|
||||
ctripHotelOrderDetail.setApportionMode(SettlementDetail.getApportionMode());
|
||||
ctripHotelOrderDetail.setOrderRoomMode(SettlementDetail.getOrderRoomMode());
|
||||
ctripHotelOrderDetail.setClientApprovalNo(SettlementDetail.getClientApprovalNo());
|
||||
ctripHotelOrderDetail.setFellowApprovalNo(SettlementDetail.getFellowApprovalNo());
|
||||
ctripHotelOrderDetail.setLoanServiceFee(SettlementDetail.getLoanServiceFee());
|
||||
ctripHotelOrderDetail.setClientName(SettlementDetail.getClientName());
|
||||
ctripHotelOrderDetail.setEmployeeId(SettlementDetail.getEmployeeID());
|
||||
ctripHotelOrderDetail.setInsuranceAmount(SettlementDetail.getInsuranceAmount());
|
||||
ctripHotelOrderDetail.setPersonAmount(SettlementDetail.getPersonAmount());
|
||||
ctripHotelOrderDetail.setChannelFee(SettlementDetail.getChannelFee());
|
||||
ctripHotelOrderDetail.setPersonalChannelFee(SettlementDetail.getPersonalChannelFee());
|
||||
ctripHotelOrderDetail.setPaidAmount(SettlementDetail.getPaidAmount());
|
||||
ctripHotelOrderDetail.setPersonalTotalAmount(SettlementDetail.getPersonalTotalAmount());
|
||||
ctripHotelOrderDetail.setPersonalRemittedTax(SettlementDetail.getPersonalRemittedTax());
|
||||
ctripHotelOrderDetail.setBookServiceFee(SettlementDetail.getBookServiceFee());
|
||||
ctripHotelOrderDetail.setModifyServiceFee(SettlementDetail.getModifyServiceFee());
|
||||
ctripHotelOrderDetail.setCancelServiceFee(SettlementDetail.getCancelServiceFee());
|
||||
ctripHotelOrderDetail.setPayDiscountAmount(SettlementDetail.getPayDiscountAmount());
|
||||
ctripHotelOrderDetail.setAverageRoomPrice(SettlementDetail.getAverageRoomPrice());
|
||||
return ctripHotelOrderDetail;
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
package com.chint.domain.aggregates.order.ctrip;
|
||||
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderTrainResponse;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @author wanglf3
|
||||
* @date 2024-03-09
|
||||
* @vsrsion 1.0
|
||||
**/
|
||||
@Data
|
||||
@Table("c_trip_order_train_settlement_base_info")
|
||||
public class CTripTrainRecordBase implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1642492804808714974L;
|
||||
@Id
|
||||
private Long id;
|
||||
private Long recordId;
|
||||
private Long orderId;
|
||||
private String corpId;
|
||||
private Integer accountId;
|
||||
private String uid;
|
||||
private String detailType;
|
||||
private String passengerName;
|
||||
private Double price;
|
||||
private Double serverFee;
|
||||
private Double cancelFee;
|
||||
private Double insureFee;
|
||||
private Double paperTicketFee;
|
||||
private Double deliverFee;
|
||||
private Double reBookingServiceFee;
|
||||
private Double realAmount;
|
||||
private String batchNo;
|
||||
private String settlementType;
|
||||
private String createTime;
|
||||
private String changeLastTime;
|
||||
private Integer orderType;
|
||||
private String subAccCheckBatchNo;
|
||||
private Long tripId;
|
||||
private String settlementCurrency;
|
||||
private Double grabServiceFee;
|
||||
private Double postServiceFee;
|
||||
private Double realAmountHasPost;
|
||||
private Boolean isChecked;
|
||||
private String subDetailType;
|
||||
private String invoiceIds;
|
||||
private String batchStartDate;
|
||||
private String batchEndDate;
|
||||
private Double afterTakeTicketFee;
|
||||
private Double estimatePrice;
|
||||
private Double estimaAmount;
|
||||
private Double purchaseFee;
|
||||
private Boolean payMixFlag;
|
||||
private Double personalPayTicketFee;
|
||||
private Double personalPayServiceFee;
|
||||
private Double personalPayOtherFee;
|
||||
private Double trainChangePrice;
|
||||
private Double trainOtherFee;
|
||||
private String dealTime;
|
||||
private String productType;
|
||||
private String departureCountry;
|
||||
private String arrivalCountry;
|
||||
private Integer sequence;
|
||||
private Double loanServiceFee;
|
||||
private Double intlIssueTicketFee;
|
||||
private Double deductibleTax;
|
||||
private Double notIncludeTaxPrice;
|
||||
private Boolean onsiteRefundFlag;
|
||||
private Double ticketPrice;
|
||||
private Double refundTicketServiceFee;
|
||||
|
||||
public static CTripTrainRecordBase changeInfo(OrderTrainResponse.CorpTrainSettlementDetail trainSettlementDetail) {
|
||||
|
||||
CTripTrainRecordBase ctripTrainOrderDetail = new CTripTrainRecordBase();
|
||||
if (trainSettlementDetail != null){
|
||||
ctripTrainOrderDetail.setRecordId(trainSettlementDetail.getRecordID());
|
||||
ctripTrainOrderDetail.setOrderId(trainSettlementDetail.getOrderID());
|
||||
ctripTrainOrderDetail.setCorpId(trainSettlementDetail.getCorpId());
|
||||
ctripTrainOrderDetail.setAccountId(trainSettlementDetail.getAccountID());
|
||||
ctripTrainOrderDetail.setUid(trainSettlementDetail.getUID());
|
||||
ctripTrainOrderDetail.setDetailType(trainSettlementDetail.getDetailType());
|
||||
ctripTrainOrderDetail.setPassengerName(trainSettlementDetail.getPassengerName());
|
||||
ctripTrainOrderDetail.setPrice(trainSettlementDetail.getPrice());
|
||||
ctripTrainOrderDetail.setServerFee(trainSettlementDetail.getServerFee());
|
||||
ctripTrainOrderDetail.setCancelFee(trainSettlementDetail.getCancelFee());
|
||||
ctripTrainOrderDetail.setInsureFee(trainSettlementDetail.getInsureFee());
|
||||
ctripTrainOrderDetail.setPaperTicketFee(trainSettlementDetail.getPaperTicketFee());
|
||||
ctripTrainOrderDetail.setDeliverFee(trainSettlementDetail.getDeliverFee());
|
||||
ctripTrainOrderDetail.setReBookingServiceFee(trainSettlementDetail.getReBookingServiceFee());
|
||||
ctripTrainOrderDetail.setRealAmount(trainSettlementDetail.getRealAmount());
|
||||
ctripTrainOrderDetail.setBatchNo(trainSettlementDetail.getBatchNo());
|
||||
ctripTrainOrderDetail.setSettlementType(trainSettlementDetail.getSettlementType());
|
||||
ctripTrainOrderDetail.setCreateTime(trainSettlementDetail.getCreatetime());
|
||||
ctripTrainOrderDetail.setChangeLastTime(trainSettlementDetail.getChangeLasttime());
|
||||
ctripTrainOrderDetail.setOrderType(trainSettlementDetail.getOrderType());
|
||||
ctripTrainOrderDetail.setSubAccCheckBatchNo(trainSettlementDetail.getSubAccCheckBatchNo());
|
||||
ctripTrainOrderDetail.setTripId(trainSettlementDetail.getTripID());
|
||||
ctripTrainOrderDetail.setSettlementCurrency(trainSettlementDetail.getSettlementCurrency());
|
||||
ctripTrainOrderDetail.setGrabServiceFee(trainSettlementDetail.getGrabServiceFee());
|
||||
ctripTrainOrderDetail.setPostServiceFee(trainSettlementDetail.getPostServiceFee());
|
||||
ctripTrainOrderDetail.setRealAmountHasPost(trainSettlementDetail.getRealAmountHasPost());
|
||||
ctripTrainOrderDetail.setIsChecked(trainSettlementDetail.isIsChecked());
|
||||
ctripTrainOrderDetail.setSubDetailType(trainSettlementDetail.getSubDetailType());
|
||||
// ctripTrainOrderDetailis.setInvoiceIds(trainSettlementDetail.getInvoiceIds());
|
||||
ctripTrainOrderDetail.setBatchStartDate(trainSettlementDetail.getBatchStartDate());
|
||||
ctripTrainOrderDetail.setBatchEndDate(trainSettlementDetail.getBatchEndDate());
|
||||
ctripTrainOrderDetail.setAfterTakeTicketFee(trainSettlementDetail.getAfterTakeTicketFee());
|
||||
ctripTrainOrderDetail.setEstimatePrice(trainSettlementDetail.getEstimatePrice());
|
||||
ctripTrainOrderDetail.setEstimaAmount(trainSettlementDetail.getEstimaAmount());
|
||||
ctripTrainOrderDetail.setPurchaseFee(trainSettlementDetail.getPurchaseFee());
|
||||
ctripTrainOrderDetail.setPayMixFlag(trainSettlementDetail.isPayMixFlag());
|
||||
ctripTrainOrderDetail.setPersonalPayTicketFee(trainSettlementDetail.getPersonalPayTicketFee());
|
||||
ctripTrainOrderDetail.setPersonalPayServiceFee(trainSettlementDetail.getPersonalPayServiceFee());
|
||||
ctripTrainOrderDetail.setPersonalPayOtherFee(trainSettlementDetail.getPersonalPayOtherFee());
|
||||
ctripTrainOrderDetail.setTrainChangePrice(trainSettlementDetail.getTrainChangePrice());
|
||||
ctripTrainOrderDetail.setTrainOtherFee(trainSettlementDetail.getTrainOtherFee());
|
||||
ctripTrainOrderDetail.setDealTime(trainSettlementDetail.getDealTime());
|
||||
ctripTrainOrderDetail.setProductType(trainSettlementDetail.getProductType());
|
||||
ctripTrainOrderDetail.setDepartureCountry(trainSettlementDetail.getDepartureCountry());
|
||||
ctripTrainOrderDetail.setArrivalCountry(trainSettlementDetail.getArrivalCountry());
|
||||
ctripTrainOrderDetail.setSequence(trainSettlementDetail.getSequence());
|
||||
ctripTrainOrderDetail.setLoanServiceFee(trainSettlementDetail.getLoanServiceFee());
|
||||
ctripTrainOrderDetail.setIntlIssueTicketFee(trainSettlementDetail.getIntlIssueTicketFee());
|
||||
ctripTrainOrderDetail.setDeductibleTax(trainSettlementDetail.getDeductibleTax());
|
||||
ctripTrainOrderDetail.setNotIncludeTaxPrice(trainSettlementDetail.getNotIncludeTaxPrice());
|
||||
ctripTrainOrderDetail.setOnsiteRefundFlag(trainSettlementDetail.isOnsiteRefundFlag());
|
||||
ctripTrainOrderDetail.setTicketPrice(trainSettlementDetail.getTicketPrice());
|
||||
ctripTrainOrderDetail.setRefundTicketServiceFee(trainSettlementDetail.getRefundTicketServiceFee());
|
||||
|
||||
return ctripTrainOrderDetail;
|
||||
// return BeanUtil.copyProperties(flightOrderSettlementBaseInfo,CtripFlightOrderDetail.class);
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderCarResponse;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Table("c_trip_car_quick_info")
|
||||
public class CTripCarQuickInfo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2343214623512376645L;
|
||||
@Id
|
||||
private Long id;
|
||||
private Long cTripCarRecordId;
|
||||
private int BookingType;
|
||||
private String UseTime;
|
||||
private String DepartureCityId;
|
||||
private String DepartureDistrictCode;
|
||||
private String DepartureCityName;
|
||||
private String DepartureAddressDetail;
|
||||
private String ArrivalCityId;
|
||||
private String ArrivalDistrictCode;
|
||||
private String ArrivalCityName;
|
||||
private String ArrivalAddressDetail;
|
||||
private int VehicleId;
|
||||
private String VehicleName;
|
||||
private String NormalDistance;
|
||||
private String NormalTime;
|
||||
private String ServiceBeginTime;
|
||||
private String ServiceEndTime;
|
||||
private String SceneName;
|
||||
private String StandardName;
|
||||
// private List<OrderCarResponse.DestinationChangeInfoApi> DestinationChangeList;
|
||||
private String VendorName;
|
||||
// 如果StandardGeoInfo是标准地理信息类
|
||||
// private OrderCarResponse.StandardGeoInfo StandardGeoInfo;
|
||||
private String CancelTime;
|
||||
|
||||
public static CTripCarQuickInfo of(OrderCarResponse.CarOrderQuickProductInfo data) {
|
||||
return BeanUtil.copyProperties(data, CTripCarQuickInfo.class);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import com.chint.infrastructure.util.DateTimeUtil;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.MappedCollection;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Table("c_trip_car_record")
|
||||
public class CTripCarRecord implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5553214622358970145L;
|
||||
@Id
|
||||
private Long id;
|
||||
private String recordId;
|
||||
private LocalDateTime createTime;
|
||||
private String routeOrderNo;
|
||||
@MappedCollection(idColumn = "c_trip_car_record_id")
|
||||
private CTripCarRecordBase cTripCarRecordBase;
|
||||
@MappedCollection(idColumn = "c_trip_car_record_id")
|
||||
private CTripCarQuickInfo cTripCarQuickInfo;
|
||||
|
||||
public static CTripCarRecord of(CTripCarRecordBase cTripCarRecordBase, CTripCarQuickInfo cTripCarQuickInfo) {
|
||||
CTripCarRecord cTripCarRecord = new CTripCarRecord();
|
||||
cTripCarRecord.setCTripCarQuickInfo(cTripCarQuickInfo);
|
||||
cTripCarRecord.setCTripCarRecordBase(cTripCarRecordBase);
|
||||
cTripCarRecord.setRecordId(String.valueOf(cTripCarRecordBase.getRecordId()));
|
||||
cTripCarRecord.setCreateTime(DateTimeUtil.strToTime(cTripCarRecordBase.getCreateTime()));
|
||||
return cTripCarRecord;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.chint.domain.aggregates.order.ctrip;
|
||||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderCarResponse;
|
||||
import lombok.Data;
|
||||
|
@ -17,11 +17,11 @@ import java.io.Serializable;
|
|||
@Data
|
||||
@Table("c_trip_order_car_settlement_base_info")
|
||||
public class CTripCarRecordBase implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 4583214623558870145L;
|
||||
@Id
|
||||
private Long id;
|
||||
private Long cTripCarRecordId;
|
||||
private Long recordId;
|
||||
private String batchNo;
|
||||
private String createTime;
|
||||
|
@ -43,7 +43,7 @@ public class CTripCarRecordBase implements Serializable {
|
|||
private Double expressFee;
|
||||
private Integer orderType;
|
||||
private String subAccCheckBatchNo;
|
||||
private Long tripId;
|
||||
private String tripId;
|
||||
private String settlementCurrency;
|
||||
private Double postServiceFee;
|
||||
private Double realAmountHasPost;
|
||||
|
@ -94,7 +94,7 @@ public class CTripCarRecordBase implements Serializable {
|
|||
ctripCarOrderDetail.setExpressFee(carOrderSettlementBaseInfo.getExpressFee());
|
||||
ctripCarOrderDetail.setOrderType(carOrderSettlementBaseInfo.getOrderType());
|
||||
ctripCarOrderDetail.setSubAccCheckBatchNo(carOrderSettlementBaseInfo.getSubAccCheckBatchNo());
|
||||
ctripCarOrderDetail.setTripId(carOrderSettlementBaseInfo.getTripID());
|
||||
ctripCarOrderDetail.setTripId( carOrderSettlementBaseInfo.getTripID());
|
||||
ctripCarOrderDetail.setSettlementCurrency(carOrderSettlementBaseInfo.getSettlementCurrency());
|
||||
ctripCarOrderDetail.setPostServiceFee(carOrderSettlementBaseInfo.getPostServiceFee());
|
||||
ctripCarOrderDetail.setRealAmountHasPost(carOrderSettlementBaseInfo.getRealAmountHasPost());
|
|
@ -1,4 +1,4 @@
|
|||
package com.chint.domain.aggregates.order.ctrip;
|
||||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderFlightResponse;
|
|
@ -1,15 +1,21 @@
|
|||
package com.chint.domain.aggregates.order.ctrip;
|
||||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import com.chint.infrastructure.util.DateTimeUtil;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.MappedCollection;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Table("c_trip_flight_record")
|
||||
public class CTripFlightRecord {
|
||||
@Id
|
||||
private Long id;
|
||||
private String recordId;
|
||||
public LocalDateTime createTime;
|
||||
private String routeOrderNo;
|
||||
@MappedCollection(idColumn = "c_trip_flight_record_id")
|
||||
private CTripFlightRecordBase cTripFlightRecordBase;
|
||||
@MappedCollection(idColumn = "c_trip_flight_record_id")
|
||||
|
@ -19,6 +25,8 @@ public class CTripFlightRecord {
|
|||
CTripFlightRecord cTripFlightRecord = new CTripFlightRecord();
|
||||
cTripFlightRecord.setCTripFlightRecordBase(cTripFlightRecordBase);
|
||||
cTripFlightRecord.setCTripFlightInfo(cTripFlightInfo);
|
||||
cTripFlightRecord.setRecordId(String.valueOf(cTripFlightRecordBase.getRecordId()));
|
||||
cTripFlightRecord.setCreateTime(DateTimeUtil.strToTimeMM(cTripFlightRecordBase.getCreateTime()));
|
||||
return cTripFlightRecord;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.chint.domain.aggregates.order.ctrip;
|
||||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderFlightResponse;
|
||||
import lombok.Data;
|
|
@ -0,0 +1,43 @@
|
|||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderHotelResponse;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Table("c_trip_hotel_info")
|
||||
public class CTripHotelInfo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 4027343172340686513L;
|
||||
@Id
|
||||
private Long id;
|
||||
private Long cTripHotelRecordId;
|
||||
private String HotelName;
|
||||
private String HotelNameEN;
|
||||
private String CityName;
|
||||
private String CityNameEN;
|
||||
private Integer Star;
|
||||
private Integer IsDomestic;
|
||||
private String ISCU;
|
||||
private Integer CityID;
|
||||
private String DistrictCode;
|
||||
private Integer DistrictID;
|
||||
private String DistrictName;
|
||||
private String BrandName;
|
||||
private Integer ParentCityID;
|
||||
private String ParentCityName;
|
||||
private String ParentCityEnName;
|
||||
private Integer HotelGroupId;
|
||||
private String HotelGroupName;
|
||||
|
||||
public static CTripHotelInfo of(OrderHotelResponse.SettlementHotelDetail data) {
|
||||
CTripHotelInfo cTripHotelInfo = BeanUtil.copyProperties(data, CTripHotelInfo.class);
|
||||
cTripHotelInfo.setIsDomestic(data.isIsDomestic() ? 1 : 0);
|
||||
return cTripHotelInfo;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import com.chint.infrastructure.util.DateTimeUtil;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.MappedCollection;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Table("c_trip_hotel_record")
|
||||
public class CTripHotelRecord {
|
||||
@Id
|
||||
private Long id;
|
||||
private String recordId;
|
||||
private LocalDateTime createTime;
|
||||
private String routeOrderNo;
|
||||
@MappedCollection(idColumn = "c_trip_hotel_record_id")
|
||||
private CTripHotelRecordBase cTripHotelRecordBase;
|
||||
@MappedCollection(idColumn = "c_trip_hotel_record_id")
|
||||
private CTripHotelInfo cTripHotelInfo;
|
||||
|
||||
public static CTripHotelRecord of(CTripHotelRecordBase cTripHotelRecordBase, CTripHotelInfo cTripHotelInfo) {
|
||||
CTripHotelRecord cTripHotelRecord = new CTripHotelRecord();
|
||||
cTripHotelRecord.setRecordId(String.valueOf(cTripHotelRecordBase.getRecordId()));
|
||||
cTripHotelRecord.setCTripHotelRecordBase(cTripHotelRecordBase);
|
||||
cTripHotelRecord.setCTripHotelInfo(cTripHotelInfo);
|
||||
cTripHotelRecord.setCreateTime(DateTimeUtil.strToTimeMM(cTripHotelRecordBase.getCreateTime()));
|
||||
return cTripHotelRecord;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderHotelResponse;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author wanglf3
|
||||
* @date 2024-03-09
|
||||
* @vsrsion 1.0
|
||||
**/
|
||||
@Data
|
||||
@Table("c_trip_order_hotel_settlement_base_info")
|
||||
public class CTripHotelRecordBase implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3087333171110684513L;
|
||||
@Id
|
||||
private Long id;
|
||||
private Long cTripHotelRecordId;
|
||||
private Long recordId;
|
||||
private Long orderId;
|
||||
private Integer accountId;
|
||||
private String uid;
|
||||
private String detailType;
|
||||
private String payType;
|
||||
private String hotelType;
|
||||
private Double price;
|
||||
private Integer quantity;
|
||||
private Double amount;
|
||||
private Double serviceFee;
|
||||
private Double extraCharge;
|
||||
private String accCheckBatchNo;
|
||||
private String createTime;
|
||||
private String datachangeLasttime;
|
||||
private Integer orderType;
|
||||
private String subAccCheckBatchNo;
|
||||
private Long tripId;
|
||||
private String settlementCurrency;
|
||||
private Integer isChecked;
|
||||
private String dailyAvgPriceInfo;
|
||||
private String invoiceIds;
|
||||
private String batchStartDate;
|
||||
private String batchEndDate;
|
||||
private Double frontendServiceFee;
|
||||
private Double coupon;
|
||||
private Long relatedCostsId;
|
||||
private String apportionMode;
|
||||
private String orderRoomMode;
|
||||
private String clientApprovalNo;
|
||||
private String fellowApprovalNo;
|
||||
private Double loanServiceFee;
|
||||
private String clientName;
|
||||
private String employeeId;
|
||||
private Double insuranceAmount;
|
||||
private Double personAmount;
|
||||
private String channelFee;
|
||||
private String personalChannelFee;
|
||||
private String paidAmount;
|
||||
private String personalTotalAmount;
|
||||
private String personalRemittedTax;
|
||||
private String bookServiceFee;
|
||||
private String modifyServiceFee;
|
||||
private String cancelServiceFee;
|
||||
private String payDiscountAmount;
|
||||
private String averageRoomPrice;
|
||||
|
||||
|
||||
public static CTripHotelRecordBase changeInfo(OrderHotelResponse.SettlementDetail SettlementDetail) {
|
||||
CTripHotelRecordBase ctripHotelOrderDetail = new CTripHotelRecordBase();
|
||||
ctripHotelOrderDetail.setRecordId(SettlementDetail.getRecordId());
|
||||
ctripHotelOrderDetail.setOrderId(SettlementDetail.getOrderID());
|
||||
ctripHotelOrderDetail.setAccountId(SettlementDetail.getAccountId());
|
||||
ctripHotelOrderDetail.setUid(SettlementDetail.getUid());
|
||||
ctripHotelOrderDetail.setDetailType(SettlementDetail.getDetailType());
|
||||
ctripHotelOrderDetail.setPayType(SettlementDetail.getPayType());
|
||||
ctripHotelOrderDetail.setHotelType(SettlementDetail.getHotelType());
|
||||
ctripHotelOrderDetail.setPrice(SettlementDetail.getPrice());
|
||||
ctripHotelOrderDetail.setQuantity(SettlementDetail.getQuantity());
|
||||
ctripHotelOrderDetail.setAmount(SettlementDetail.getAmount());
|
||||
ctripHotelOrderDetail.setServiceFee(SettlementDetail.getServicefee());
|
||||
ctripHotelOrderDetail.setExtraCharge(SettlementDetail.getExtraCharge());
|
||||
ctripHotelOrderDetail.setAccCheckBatchNo(SettlementDetail.getAccCheckBatchNo());
|
||||
ctripHotelOrderDetail.setCreateTime(SettlementDetail.getCreatetime());
|
||||
ctripHotelOrderDetail.setDatachangeLasttime(SettlementDetail.getDatachange_Lasttime());
|
||||
ctripHotelOrderDetail.setOrderType(SettlementDetail.getOrderType());
|
||||
ctripHotelOrderDetail.setSubAccCheckBatchNo(SettlementDetail.getSubAccCheckBatchNo());
|
||||
ctripHotelOrderDetail.setTripId(SettlementDetail.getTripID());
|
||||
ctripHotelOrderDetail.setSettlementCurrency(SettlementDetail.getSettlementCurrency());
|
||||
ctripHotelOrderDetail.setIsChecked(SettlementDetail.isIsChecked() ? 1 : 0);
|
||||
// ctripHotelOrderDetailis.setDailyAvgPriceInfo(SettlementDetail.getDailyAvgPriceInfo());
|
||||
// ctripHotelOrderDetailis.setInvoiceIds(SettlementDetail.getInvoiceIds());
|
||||
ctripHotelOrderDetail.setBatchStartDate(SettlementDetail.getBatchStartDate());
|
||||
ctripHotelOrderDetail.setBatchEndDate(SettlementDetail.getBatchEndDate());
|
||||
ctripHotelOrderDetail.setFrontendServiceFee(SettlementDetail.getFrontendServiceFee());
|
||||
ctripHotelOrderDetail.setCoupon(SettlementDetail.getCoupon());
|
||||
ctripHotelOrderDetail.setRelatedCostsId(SettlementDetail.getRelatedCostsID());
|
||||
ctripHotelOrderDetail.setApportionMode(SettlementDetail.getApportionMode());
|
||||
ctripHotelOrderDetail.setOrderRoomMode(SettlementDetail.getOrderRoomMode());
|
||||
ctripHotelOrderDetail.setClientApprovalNo(SettlementDetail.getClientApprovalNo());
|
||||
ctripHotelOrderDetail.setFellowApprovalNo(SettlementDetail.getFellowApprovalNo());
|
||||
ctripHotelOrderDetail.setLoanServiceFee(SettlementDetail.getLoanServiceFee());
|
||||
ctripHotelOrderDetail.setClientName(SettlementDetail.getClientName());
|
||||
ctripHotelOrderDetail.setEmployeeId(SettlementDetail.getEmployeeID());
|
||||
ctripHotelOrderDetail.setInsuranceAmount(SettlementDetail.getInsuranceAmount());
|
||||
ctripHotelOrderDetail.setPersonAmount(SettlementDetail.getPersonAmount());
|
||||
ctripHotelOrderDetail.setChannelFee(String.valueOf(SettlementDetail.getChannelFee()));
|
||||
ctripHotelOrderDetail.setPersonalChannelFee(String.valueOf(SettlementDetail.getPersonalChannelFee()));
|
||||
ctripHotelOrderDetail.setPaidAmount(String.valueOf(SettlementDetail.getPaidAmount()));
|
||||
ctripHotelOrderDetail.setPersonalTotalAmount(String.valueOf(SettlementDetail.getPersonalTotalAmount()));
|
||||
ctripHotelOrderDetail.setPersonalRemittedTax(String.valueOf(SettlementDetail.getPersonalRemittedTax()));
|
||||
ctripHotelOrderDetail.setBookServiceFee(String.valueOf(SettlementDetail.getBookServiceFee()));
|
||||
ctripHotelOrderDetail.setModifyServiceFee(String.valueOf(SettlementDetail.getModifyServiceFee()));
|
||||
ctripHotelOrderDetail.setCancelServiceFee(String.valueOf(SettlementDetail.getCancelServiceFee()));
|
||||
ctripHotelOrderDetail.setPayDiscountAmount(String.valueOf(SettlementDetail.getPayDiscountAmount()));
|
||||
ctripHotelOrderDetail.setAverageRoomPrice(String.valueOf(SettlementDetail.getAverageRoomPrice()));
|
||||
return ctripHotelOrderDetail;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderHotelResponse;
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderTrainResponse;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Table("c_trip_train_info")
|
||||
public class CTripTrainInfo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3282323171110442253L;
|
||||
@Id
|
||||
private Long id;
|
||||
private Long cTripTrainRecordId;
|
||||
private long TicketInfoID;
|
||||
private String TrainName;
|
||||
private String FirstSeatTypeName;
|
||||
private String TrainType;
|
||||
private String DepartureCityName;
|
||||
private String DepartureDate;
|
||||
private String DepartureStationName;
|
||||
private String DepartureStationEn;
|
||||
private String ArrivalCityName;
|
||||
private String ArrivalDate;
|
||||
private String ArrivalStationName;
|
||||
private String ArrivalStationEn;
|
||||
private String ElectronicOrderNo;
|
||||
private int CustomType;
|
||||
private String CustomDetail;
|
||||
private String TrainTicketType;
|
||||
// private List<OrderTrainResponse.TrainData> TrainSeatPriceData;
|
||||
private String ChangeStatus;
|
||||
private double DealTicketPrice;
|
||||
private double RebRefEstimateAmount;
|
||||
private int DepartureCityID;
|
||||
private String DepartureDistrictCode;
|
||||
private int ArrivalCityID;
|
||||
private String ArrivalDistrictCode;
|
||||
private String ChangeCode;
|
||||
private String DealSeatNo;
|
||||
private String DealSeatName;
|
||||
private long DepartureProvinceId;
|
||||
private String DepartureProvinceName;
|
||||
private long DepartureLocationId;
|
||||
private String DepartureLocationName;
|
||||
private int DepartureLocationCategoryId;
|
||||
private long ArrivalProvinceId;
|
||||
private String ArrivalProvinceName;
|
||||
private long ArrivalLocationId;
|
||||
private String ArrivalLocationName;
|
||||
private int ArrivalLocationCategoryId;
|
||||
private int Sequence;
|
||||
private String RefundreasonCode;
|
||||
private String RefundreasonCodeDesc;
|
||||
private String IssueTicketTime;
|
||||
private String RebookTicketSuccessTime;
|
||||
private String RefundTicketSuccessTime;
|
||||
private String ChangePreApprovalId;
|
||||
private String RefundApprovalId;
|
||||
// private OrderTrainResponse.StandardGeoInfo StandardGeoInfo;
|
||||
private String ChangeDescription;
|
||||
|
||||
|
||||
public static CTripTrainInfo of(OrderTrainResponse.CorpTrainSettlementTicketDetail data) {
|
||||
return BeanUtil.copyProperties(data, CTripTrainInfo.class);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import com.chint.infrastructure.util.DateTimeUtil;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.MappedCollection;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Table("c_trip_train_record")
|
||||
public class CTripTrainRecord implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 4087333423450684513L;
|
||||
@Id
|
||||
private Long id;
|
||||
private String recordId;
|
||||
private LocalDateTime createTime;
|
||||
private String routeOrderNo;
|
||||
@MappedCollection(idColumn = "c_trip_train_record_id")
|
||||
private CTripTrainRecordBase cTripTrainRecordBase;
|
||||
@MappedCollection(idColumn = "c_trip_train_record_id")
|
||||
private CTripTrainInfo cTripTrainInfo;
|
||||
|
||||
public static CTripTrainRecord of(CTripTrainRecordBase cTripTrainRecordBase, CTripTrainInfo cTripTrainInfo) {
|
||||
CTripTrainRecord cTripTrainRecord = new CTripTrainRecord();
|
||||
cTripTrainRecord.setRecordId(String.valueOf(cTripTrainRecordBase.getRecordId()));
|
||||
cTripTrainRecord.setCTripTrainRecordBase(cTripTrainRecordBase);
|
||||
cTripTrainRecord.setCTripTrainInfo(cTripTrainInfo);
|
||||
cTripTrainRecord.setCreateTime(DateTimeUtil.strToTimeMM(cTripTrainRecordBase.getCreateTime()));
|
||||
return cTripTrainRecord;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
package com.chint.domain.aggregates.order.order_record.ctrip_order_record;
|
||||
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderTrainResponse;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @author wanglf3
|
||||
* @date 2024-03-09
|
||||
* @vsrsion 1.0
|
||||
**/
|
||||
@Data
|
||||
@Table("c_trip_order_train_settlement_base_info")
|
||||
public class CTripTrainRecordBase implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1642492804808714974L;
|
||||
@Id
|
||||
private Long id;
|
||||
private Long cTripTrainRecordId;
|
||||
private Long recordId;
|
||||
private Long orderId;
|
||||
private String corpId;
|
||||
private Integer accountId;
|
||||
private String uid;
|
||||
private String detailType;
|
||||
private String passengerName;
|
||||
private Double price;
|
||||
private Double serverFee;
|
||||
private Double cancelFee;
|
||||
private Double insureFee;
|
||||
private Double paperTicketFee;
|
||||
private Double deliverFee;
|
||||
private Double reBookingServiceFee;
|
||||
private Double realAmount;
|
||||
private String batchNo;
|
||||
private String settlementType;
|
||||
private String createTime;
|
||||
private String changeLastTime;
|
||||
private Integer orderType;
|
||||
private String subAccCheckBatchNo;
|
||||
private Long tripId;
|
||||
private String settlementCurrency;
|
||||
private Double grabServiceFee;
|
||||
private Double postServiceFee;
|
||||
private Double realAmountHasPost;
|
||||
private Boolean isChecked;
|
||||
private String subDetailType;
|
||||
private String invoiceIds;
|
||||
private String batchStartDate;
|
||||
private String batchEndDate;
|
||||
private Double afterTakeTicketFee;
|
||||
private Double estimatePrice;
|
||||
private Double estimaAmount;
|
||||
private Double purchaseFee;
|
||||
private Boolean payMixFlag;
|
||||
private Double personalPayTicketFee;
|
||||
private Double personalPayServiceFee;
|
||||
private Double personalPayOtherFee;
|
||||
private Double trainChangePrice;
|
||||
private Double trainOtherFee;
|
||||
private String dealTime;
|
||||
private String productType;
|
||||
private String departureCountry;
|
||||
private String arrivalCountry;
|
||||
private Integer sequence;
|
||||
private Double loanServiceFee;
|
||||
private Double intlIssueTicketFee;
|
||||
private Double deductibleTax;
|
||||
private Double notIncludeTaxPrice;
|
||||
private Boolean onsiteRefundFlag;
|
||||
private Double ticketPrice;
|
||||
private Double refundTicketServiceFee;
|
||||
|
||||
public static CTripTrainRecordBase changeInfo(OrderTrainResponse.CorpTrainSettlementDetail trainSettlementDetail) {
|
||||
|
||||
CTripTrainRecordBase ctripTrainOrderDetail = new CTripTrainRecordBase();
|
||||
|
||||
ctripTrainOrderDetail.setRecordId(trainSettlementDetail.getRecordID());
|
||||
ctripTrainOrderDetail.setOrderId(trainSettlementDetail.getOrderID());
|
||||
ctripTrainOrderDetail.setCorpId(trainSettlementDetail.getCorpId());
|
||||
ctripTrainOrderDetail.setAccountId(trainSettlementDetail.getAccountID());
|
||||
ctripTrainOrderDetail.setUid(trainSettlementDetail.getUID());
|
||||
ctripTrainOrderDetail.setDetailType(trainSettlementDetail.getDetailType());
|
||||
ctripTrainOrderDetail.setPassengerName(trainSettlementDetail.getPassengerName());
|
||||
ctripTrainOrderDetail.setPrice(trainSettlementDetail.getPrice());
|
||||
ctripTrainOrderDetail.setServerFee(trainSettlementDetail.getServerFee());
|
||||
ctripTrainOrderDetail.setCancelFee(trainSettlementDetail.getCancelFee());
|
||||
ctripTrainOrderDetail.setInsureFee(trainSettlementDetail.getInsureFee());
|
||||
ctripTrainOrderDetail.setPaperTicketFee(trainSettlementDetail.getPaperTicketFee());
|
||||
ctripTrainOrderDetail.setDeliverFee(trainSettlementDetail.getDeliverFee());
|
||||
ctripTrainOrderDetail.setReBookingServiceFee(trainSettlementDetail.getReBookingServiceFee());
|
||||
ctripTrainOrderDetail.setRealAmount(trainSettlementDetail.getRealAmount());
|
||||
ctripTrainOrderDetail.setBatchNo(trainSettlementDetail.getBatchNo());
|
||||
ctripTrainOrderDetail.setSettlementType(trainSettlementDetail.getSettlementType());
|
||||
ctripTrainOrderDetail.setCreateTime(trainSettlementDetail.getCreatetime());
|
||||
ctripTrainOrderDetail.setChangeLastTime(trainSettlementDetail.getChangeLasttime());
|
||||
ctripTrainOrderDetail.setOrderType(trainSettlementDetail.getOrderType());
|
||||
ctripTrainOrderDetail.setSubAccCheckBatchNo(trainSettlementDetail.getSubAccCheckBatchNo());
|
||||
ctripTrainOrderDetail.setTripId(trainSettlementDetail.getTripID());
|
||||
ctripTrainOrderDetail.setSettlementCurrency(trainSettlementDetail.getSettlementCurrency());
|
||||
ctripTrainOrderDetail.setGrabServiceFee(trainSettlementDetail.getGrabServiceFee());
|
||||
ctripTrainOrderDetail.setPostServiceFee(trainSettlementDetail.getPostServiceFee());
|
||||
ctripTrainOrderDetail.setRealAmountHasPost(trainSettlementDetail.getRealAmountHasPost());
|
||||
ctripTrainOrderDetail.setIsChecked(trainSettlementDetail.isIsChecked());
|
||||
ctripTrainOrderDetail.setSubDetailType(trainSettlementDetail.getSubDetailType());
|
||||
// ctripTrainOrderDetailis.setInvoiceIds(trainSettlementDetail.getInvoiceIds());
|
||||
ctripTrainOrderDetail.setBatchStartDate(trainSettlementDetail.getBatchStartDate());
|
||||
ctripTrainOrderDetail.setBatchEndDate(trainSettlementDetail.getBatchEndDate());
|
||||
ctripTrainOrderDetail.setAfterTakeTicketFee(trainSettlementDetail.getAfterTakeTicketFee());
|
||||
ctripTrainOrderDetail.setEstimatePrice(trainSettlementDetail.getEstimatePrice());
|
||||
ctripTrainOrderDetail.setEstimaAmount(trainSettlementDetail.getEstimaAmount());
|
||||
ctripTrainOrderDetail.setPurchaseFee(trainSettlementDetail.getPurchaseFee());
|
||||
ctripTrainOrderDetail.setPayMixFlag(trainSettlementDetail.isPayMixFlag());
|
||||
ctripTrainOrderDetail.setPersonalPayTicketFee(trainSettlementDetail.getPersonalPayTicketFee());
|
||||
ctripTrainOrderDetail.setPersonalPayServiceFee(trainSettlementDetail.getPersonalPayServiceFee());
|
||||
ctripTrainOrderDetail.setPersonalPayOtherFee(trainSettlementDetail.getPersonalPayOtherFee());
|
||||
ctripTrainOrderDetail.setTrainChangePrice(trainSettlementDetail.getTrainChangePrice());
|
||||
ctripTrainOrderDetail.setTrainOtherFee(trainSettlementDetail.getTrainOtherFee());
|
||||
ctripTrainOrderDetail.setDealTime(trainSettlementDetail.getDealTime());
|
||||
ctripTrainOrderDetail.setProductType(trainSettlementDetail.getProductType());
|
||||
ctripTrainOrderDetail.setDepartureCountry(trainSettlementDetail.getDepartureCountry());
|
||||
ctripTrainOrderDetail.setArrivalCountry(trainSettlementDetail.getArrivalCountry());
|
||||
ctripTrainOrderDetail.setSequence(trainSettlementDetail.getSequence());
|
||||
ctripTrainOrderDetail.setLoanServiceFee(trainSettlementDetail.getLoanServiceFee());
|
||||
ctripTrainOrderDetail.setIntlIssueTicketFee(trainSettlementDetail.getIntlIssueTicketFee());
|
||||
ctripTrainOrderDetail.setDeductibleTax(trainSettlementDetail.getDeductibleTax());
|
||||
ctripTrainOrderDetail.setNotIncludeTaxPrice(trainSettlementDetail.getNotIncludeTaxPrice());
|
||||
ctripTrainOrderDetail.setOnsiteRefundFlag(trainSettlementDetail.isOnsiteRefundFlag());
|
||||
ctripTrainOrderDetail.setTicketPrice(trainSettlementDetail.getTicketPrice());
|
||||
ctripTrainOrderDetail.setRefundTicketServiceFee(trainSettlementDetail.getRefundTicketServiceFee());
|
||||
|
||||
return ctripTrainOrderDetail;
|
||||
// return BeanUtil.copyProperties(flightOrderSettlementBaseInfo,CtripFlightOrderDetail.class);
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@ import com.chint.domain.aggregates.order.order_record.OrderCarRecord;
|
|||
import com.chint.domain.aggregates.order.order_record.OrderFlightRecord;
|
||||
import com.chint.domain.aggregates.order.order_record.OrderHotelRecord;
|
||||
import com.chint.domain.aggregates.order.order_record.OrderTrainRecord;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripCarRecord;
|
||||
import com.chint.domain.service.OrderDetailDomainService;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcCtripHotelOrderDetailRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,8 +24,7 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFa
|
|||
|
||||
@Override
|
||||
public OrderCarRecord createCarOrderRecord(Object orderCarRecordData) {
|
||||
|
||||
|
||||
CTripCarRecord orderCarRecord = (CTripCarRecord) orderCarRecordData;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@ public class RanksFactoryImpl implements RanksFactory {
|
|||
Integer level = ranksData.getLevel();
|
||||
ranks.setStandardLevel(
|
||||
switch (level) {
|
||||
case 1 -> prefix + RankConstant.STANDARD_LEVEL_ONE;
|
||||
case 2 -> prefix + RankConstant.STANDARD_LEVEL_TWO;
|
||||
case 3 -> prefix + RankConstant.STANDARD_LEVEL_THREE;
|
||||
case 4 -> prefix + RankConstant.STANDARD_LEVEL_FOUR;
|
||||
case 1 -> prefix + STANDARD_LEVEL_ONE_COMMON;
|
||||
case 2 -> prefix + STANDARD_LEVEL_TWO_COMMON;
|
||||
case 3 -> prefix + STANDARD_LEVEL_THREE_COMMON;
|
||||
case 4 -> prefix + STANDARD_LEVEL_FOUR_COMMON;
|
||||
default -> throw new NotFoundException(CommonMessageConstant.NOT_FOUND);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.chint.domain.repository;
|
||||
|
||||
import com.chint.domain.aggregates.order.ctrip.*;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -17,7 +17,6 @@ public interface CTripOrderDetailRepository {
|
|||
|
||||
CTripFlightRecord save(CTripFlightRecord cTripFlightRecord);
|
||||
|
||||
void saveAll(List<CTripFlightRecord> cTripFlightRecordList);
|
||||
|
||||
CTripFlightRecordBase findFlightByRecordId(Long id);
|
||||
|
||||
|
@ -38,4 +37,14 @@ public interface CTripOrderDetailRepository {
|
|||
void saveAllCarRecord(List<CTripCarRecordBase> ctripCarOrderDetailList);
|
||||
|
||||
CTripCarRecordBase findCarByRecordId(Long id);
|
||||
void saveAllCTripFlightRecord(List<CTripFlightRecord> cTripFlightRecordList);
|
||||
CTripFlightRecord findFlightRecordById(Long id);
|
||||
CTripFlightRecord findFlightRecordByRecordId(String recordId);
|
||||
void saveAllCTripHotelRecord(List<CTripHotelRecord> cTripHotelRecordList);
|
||||
CTripHotelRecord findHotelRecordById(Long id);
|
||||
CTripHotelRecord findHotelRecordByRecordId(String recordId);
|
||||
void saveAllCTripTrainRecord(List<CTripTrainRecord> cTripTrainRecordList);
|
||||
CTripTrainRecord findTrainRecordByRecordId(String recordId);
|
||||
void saveAllCTripCarRecord(List<CTripCarRecord> cTripCarRecordList);
|
||||
CTripCarRecord findCarRecordByRecordId(String recordId);
|
||||
}
|
||||
|
|
|
@ -9,4 +9,6 @@ public interface CompanyBlackListRepository {
|
|||
CompanyBlackList findByCompanyName(String companyName);
|
||||
|
||||
List<CompanyBlackList> findAll();
|
||||
|
||||
Boolean ifInCompanyList(String companyName);
|
||||
}
|
||||
|
|
|
@ -6,4 +6,6 @@ import java.util.List;
|
|||
|
||||
public interface OrderFlightRecordRepository {
|
||||
List<OrderFlightRecord> saveAll(List<OrderFlightRecord> orderFlightRecordList);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -62,12 +62,14 @@ public class LegDomainService {
|
|||
|
||||
List<OrderDetail> details = orderDetailList.stream().filter(orderDetail -> orderDetail.getOrderStatus().equals(ORDER_EVENT_ORDERED_NAME) ||
|
||||
orderDetail.getOrderStatus().equals(ORDER_EVENT_PAYED_NAME)).toList();
|
||||
if (!details.isEmpty() && leg.getLegStatus() < LegConstant.LEG_EVENT_ORDERED) {
|
||||
LegEvent legEvent = legEventFactory.creatLegEvent(LegConstant.LEG_EVENT_ORDERED);
|
||||
if (!details.isEmpty() && leg.getLegStatus() < LEG_EVENT_ORDERED) {
|
||||
LegEvent legEvent = legEventFactory.creatLegEvent(LEG_EVENT_ORDERED);
|
||||
leg.addEvent(legEvent);
|
||||
return legRepository.save(leg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(leg.getLegStatus().equals(LEG_STATUS_CHANGE)){
|
||||
//如果发现该订单
|
||||
LegEvent legEvent = legEventFactory.creatLegEvent(LEG_EVENT_APPROVAL);
|
||||
|
|
|
@ -113,7 +113,6 @@ public class OrderDomainService {
|
|||
@Autowired
|
||||
private JdbcLegRepository jdbcLegRepository;
|
||||
|
||||
|
||||
private Set<String> companyBlackList = new HashSet<>();
|
||||
|
||||
public RouteOrder saveOrder(RouteOrder routeOrder) {
|
||||
|
@ -130,7 +129,7 @@ public class OrderDomainService {
|
|||
}
|
||||
|
||||
public boolean checkCompanyNameIfBlack(String companyName) {
|
||||
if (companyBlackList.contains(companyName)) {
|
||||
if (companyBlackListRepository.ifInCompanyList(companyName)) {
|
||||
throw new OrderException(COMPANY_NAME_IN_BLACK_LIST);
|
||||
} else {
|
||||
return true;
|
||||
|
@ -197,6 +196,16 @@ public class OrderDomainService {
|
|||
ApprovalSimpleData data = command.getData();
|
||||
Optional.ofNullable(routeRepository.findByActualOrderNoAndSysCode(data.getActualOrderNo(), data.getSysCode()))
|
||||
.ifPresentOrElse(route -> {
|
||||
//保存提交审批所提供的资料
|
||||
ApproveOrderNo approveOrderNo = route.getApproveOrderNo();
|
||||
approveOrderNo.setActualOrderNo(data.getActualOrderNo());
|
||||
approveOrderNo.setInstructions(data.getInstructions());
|
||||
approveOrderNo.setCreator(data.getCreator());
|
||||
approveOrderNo.setAccountCompanyName(data.getAccountCompany());
|
||||
approveOrderNo.setAccountCompanyCode(data.getAccountCompanyCode());
|
||||
approveOrderNo.setProjectName(data.getProjectName());
|
||||
approveOrderNo.setCostCenter(data.getCostCenter());
|
||||
|
||||
LegEvent legEvent = legEventFactory.creatLegEvent(command.getLegEventType());
|
||||
route.getLegItems().forEach(leg -> leg.addEvent(legEvent));
|
||||
ApprovalEvent approvalEvent = routeOrderFactory.createApprovalEvent(APPROVAL_EVENT_ING);
|
||||
|
|
|
@ -114,6 +114,7 @@ public class LegEventHandler implements LegEventService {
|
|||
approveOrderNo.setActualOrderNo(data.getActualOrderNo());
|
||||
approveOrderNo.setInstructions(data.getInstructions());
|
||||
approveOrderNo.setCreator(data.getCreator());
|
||||
approveOrderNo.setAccountCompanyName(data.getAccountCompany());
|
||||
approveOrderNo.setAccountCompanyCode(data.getAccountCompanyCode());
|
||||
approveOrderNo.setProjectName(data.getProjectName());
|
||||
approveOrderNo.setCostCenter(data.getCostCenter());
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import static com.chint.infrastructure.constant.LegConstant.*;
|
||||
import static com.chint.infrastructure.constant.LocationConstant.LOCATION_LEVEL_COUNTY;
|
||||
import static com.chint.infrastructure.constant.LocationConstant.LOCATION_TYPE_DISTRICT;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
|
@ -198,7 +199,13 @@ public class CTripOrderSyncAdapter implements SupplierOrderSync {
|
|||
}
|
||||
locationRepository.saveAll(List.of(location));
|
||||
}
|
||||
//这里的逻辑需要修改 ,
|
||||
// 如果是县级市的话 ,取CItyId ,
|
||||
// 如果是区的话 ,要查找地级市, 取地级市的Id ,
|
||||
// 如果是地级市的话 ,直接取地级市的ID
|
||||
if (location.getLocationType().equals(LOCATION_TYPE_DISTRICT)) {
|
||||
return locationRepository.findById(location.getParentLocationId());
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,6 +29,12 @@ public class RankConstant {
|
|||
public static final String ALTER_APPLY = "3";//变更
|
||||
|
||||
|
||||
//集团差标等级
|
||||
public static final String STANDARD_LEVEL_ONE_COMMON = "STANDARD_LEVEL_ONE";//差标1
|
||||
public static final String STANDARD_LEVEL_TWO_COMMON = "STANDARD_LEVEL_TWO";//差标2
|
||||
public static final String STANDARD_LEVEL_THREE_COMMON = "STANDARD_LEVEL_THREE";//差标3
|
||||
public static final String STANDARD_LEVEL_FOUR_COMMON = "STANDARD_LEVEL_FOUR";//差标4
|
||||
|
||||
//集团差标等级
|
||||
public static final String STANDARD_LEVEL_ONE = "JT_STANDARD_LEVEL_ONE";//差标1
|
||||
public static final String STANDARD_LEVEL_TWO = "JT_STANDARD_LEVEL_TWO";//差标2
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.chint.infrastructure.repository;
|
||||
|
||||
import com.chint.domain.aggregates.order.ctrip.*;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.*;
|
||||
import com.chint.domain.repository.CTripOrderDetailRepository;
|
||||
import com.chint.infrastructure.repository.jdbc.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -35,6 +35,16 @@ public class CTripOrderDetailImpl implements CTripOrderDetailRepository {
|
|||
@Autowired
|
||||
private JdbcCTripFlightRecordRepository jdbcCTripFlightRecordRepository;
|
||||
|
||||
@Autowired
|
||||
private JdbcCTripCarRecordRepository jdbcCTripCarRecordRepository;
|
||||
|
||||
@Autowired
|
||||
private JdbcCTripHotelRecordRepository jdbcCTripHotelRecordRepository;
|
||||
|
||||
@Autowired
|
||||
private JdbcCTripTrainRecordRepository jdbcCTripTrainRecordRepository;
|
||||
|
||||
|
||||
@Override
|
||||
public CTripFlightRecordBase save(CTripFlightRecordBase ctripFlightOrderDetail) {
|
||||
return jdbcCtripFlightOrderDetailRepository.save(ctripFlightOrderDetail);
|
||||
|
@ -50,10 +60,6 @@ public class CTripOrderDetailImpl implements CTripOrderDetailRepository {
|
|||
return jdbcCTripFlightRecordRepository.save(cTripFlightRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAll(List<CTripFlightRecord> cTripFlightRecordList) {
|
||||
jdbcCTripFlightRecordRepository.saveAll(cTripFlightRecordList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CTripFlightRecordBase findFlightByRecordId(Long recordId) {
|
||||
|
@ -107,6 +113,56 @@ public class CTripOrderDetailImpl implements CTripOrderDetailRepository {
|
|||
public CTripCarRecordBase findCarByRecordId(Long recordId) {
|
||||
return jdbcCtripCarOrderDetailRepository.findByRecordId(recordId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAllCTripFlightRecord(List<CTripFlightRecord> cTripFlightRecordList) {
|
||||
jdbcCTripFlightRecordRepository.saveAll(cTripFlightRecordList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CTripFlightRecord findFlightRecordById(Long id) {
|
||||
return jdbcCTripFlightRecordRepository.findById(id).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CTripFlightRecord findFlightRecordByRecordId(String recordId) {
|
||||
return jdbcCTripFlightRecordRepository.findByRecordId(recordId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAllCTripHotelRecord(List<CTripHotelRecord> cTripHotelRecordList) {
|
||||
jdbcCTripHotelRecordRepository.saveAll(cTripHotelRecordList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CTripHotelRecord findHotelRecordById(Long id) {
|
||||
return jdbcCTripHotelRecordRepository.findById(id).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CTripHotelRecord findHotelRecordByRecordId(String recordId) {
|
||||
return jdbcCTripHotelRecordRepository.findByRecordId(recordId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAllCTripTrainRecord(List<CTripTrainRecord> cTripTrainRecordList) {
|
||||
jdbcCTripTrainRecordRepository.saveAll(cTripTrainRecordList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CTripTrainRecord findTrainRecordByRecordId(String recordId) {
|
||||
return jdbcCTripTrainRecordRepository.findByRecordId(recordId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAllCTripCarRecord(List<CTripCarRecord> cTripCarRecordList) {
|
||||
jdbcCTripCarRecordRepository.saveAll(cTripCarRecordList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CTripCarRecord findCarRecordByRecordId(String recordId) {
|
||||
return jdbcCTripCarRecordRepository.findByRecordId(recordId);
|
||||
}
|
||||
//
|
||||
// @Override
|
||||
// public Client findByClientId(String clientId){
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.chint.domain.aggregates.system.CompanyBlackList;
|
|||
import com.chint.domain.repository.CompanyBlackListRepository;
|
||||
import com.chint.infrastructure.repository.jdbc.JdbcCompanyBlackListRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -20,6 +21,7 @@ public class CompanyBlackListRepositoryImpl implements CompanyBlackListRepositor
|
|||
return jdbcCompanyBlackListRepository.findByCompanyName(companyName);
|
||||
}
|
||||
|
||||
@Cacheable(value = "CompanyBlack")
|
||||
@Override
|
||||
public List<CompanyBlackList> findAll() {
|
||||
List<CompanyBlackList> all = new ArrayList<>();
|
||||
|
@ -28,4 +30,11 @@ public class CompanyBlackListRepositoryImpl implements CompanyBlackListRepositor
|
|||
);
|
||||
return all;
|
||||
}
|
||||
|
||||
@Cacheable(value = "CompanyBlack", key = "#companyName")
|
||||
@Override
|
||||
public Boolean ifInCompanyList(String companyName) {
|
||||
CompanyBlackList byCompanyName = jdbcCompanyBlackListRepository.findByCompanyName(companyName);
|
||||
return byCompanyName != null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,4 +21,6 @@ public class OrderFlightRecordRepositoryImpl implements OrderFlightRecordReposit
|
|||
jdbcOrderFlightRecordRepository.saveAll(orderFlightRecordList).forEach(res::add);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripCarRecord;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripCarRecordBase;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripFlightRecordBase;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface JdbcCTripCarRecordRepository extends CrudRepository<CTripCarRecord,Long> {
|
||||
CTripCarRecord findByRecordId(String recordId);
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.ctrip.CTripFlightRecord;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripFlightRecord;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface JdbcCTripFlightRecordRepository extends CrudRepository<CTripFlightRecord,Long> {
|
||||
|
||||
CTripFlightRecord findByRecordId(String recordId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecord;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecordBase;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface JdbcCTripHotelRecordRepository extends CrudRepository<CTripHotelRecord,Long> {
|
||||
CTripHotelRecord findByRecordId(String recordId);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecord;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripTrainRecord;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface JdbcCTripTrainRecordRepository extends CrudRepository<CTripTrainRecord,Long> {
|
||||
CTripTrainRecord findByRecordId(String recordId);
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.ctrip.CTripCarRecordBase;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripCarRecordBase;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.ctrip.CTripFlightRecordBase;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripFlightRecordBase;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.ctrip.CTripHotelRecordBase;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripHotelRecordBase;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.chint.infrastructure.repository.jdbc;
|
||||
|
||||
import com.chint.domain.aggregates.order.ctrip.CTripTrainRecordBase;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.CTripTrainRecordBase;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
|
|
@ -5,8 +5,21 @@ import java.time.format.DateTimeFormatter;
|
|||
|
||||
public class DateTimeUtil {
|
||||
|
||||
|
||||
|
||||
private final static DateTimeFormatter formatterMM = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
private final static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
private final static DateTimeFormatter formatterDate = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
public static String timeToStr(LocalDateTime input) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
return input.format(formatter);
|
||||
return input.format(formatterDate);
|
||||
}
|
||||
|
||||
public static LocalDateTime strToTime(String input) {
|
||||
return LocalDateTime.parse(input.substring(0, 19), formatter);
|
||||
}
|
||||
|
||||
public static LocalDateTime strToTimeMM(String input) {
|
||||
return LocalDateTime.parse(input.substring(0, 23), formatterMM);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ public class OrderCarResponse {
|
|||
public static class ResponseStatus {
|
||||
private String Message;
|
||||
private Boolean Success;
|
||||
private Integer ErrorCode;
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,7 +58,7 @@ public class OrderCarResponse {
|
|||
private double ExpressFee;
|
||||
private int OrderType;
|
||||
private String SubAccCheckBatchNo;
|
||||
private long TripID;
|
||||
private String TripID;
|
||||
private String SettlementCurrency;
|
||||
private double PostServiceFee;
|
||||
private double RealAmountHasPost;
|
||||
|
@ -122,7 +123,7 @@ public class OrderCarResponse {
|
|||
private String ReachTravel;
|
||||
private String ServerFrom;
|
||||
private double ServiceFee;
|
||||
private long TripID;
|
||||
private String TripID;
|
||||
private String Uid;
|
||||
private String UserName;
|
||||
private String PreEmployeeID;
|
||||
|
@ -142,7 +143,7 @@ public class OrderCarResponse {
|
|||
}
|
||||
@Data
|
||||
public static class CarOrderCorpInfo {
|
||||
private long CorpId;
|
||||
private String CorpId;
|
||||
private String CorpName;
|
||||
private int AccountId;
|
||||
private int SubAccountId;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.chint.interfaces.rest.ctrip.order;
|
||||
|
||||
import com.chint.domain.aggregates.order.ctrip.*;
|
||||
import com.chint.domain.aggregates.order.order_record.ctrip_order_record.*;
|
||||
import com.chint.domain.repository.CTripOrderDetailRepository;
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderCarResponse;
|
||||
import com.chint.interfaces.rest.ctrip.dto.order.OrderFlightResponse;
|
||||
|
@ -38,13 +38,24 @@ public class CTripOrderRecordAutoSave {
|
|||
List<CTripFlightRecord> cTripFlightRecords = flightOrderAccountSettlementList
|
||||
.stream()
|
||||
.flatMap(it -> it.getOrderSettlementList().stream())
|
||||
.map(it -> CTripFlightRecord.of(
|
||||
CTripFlightRecordBase.changeInfo(
|
||||
it.getOrderSettlementBaseInfo()
|
||||
), CTripFlightInfo.of(it.getOrderFlightInfo())
|
||||
))
|
||||
.toList();
|
||||
cTripOrderDetailRepository.saveAll(cTripFlightRecords);
|
||||
.map(it -> {
|
||||
//对数据库进行查找 ,如果发现已经存在 , 就使用查找出来的
|
||||
OrderFlightResponse.FlightOrderSettlementBaseInfo orderSettlementBaseInfo = it.getOrderSettlementBaseInfo();
|
||||
CTripFlightRecord record = cTripOrderDetailRepository.findFlightRecordByRecordId(
|
||||
String.valueOf(orderSettlementBaseInfo.getRecordID()));
|
||||
if (record == null) {
|
||||
record = CTripFlightRecord.of(
|
||||
CTripFlightRecordBase.changeInfo(
|
||||
orderSettlementBaseInfo
|
||||
), CTripFlightInfo.of(it.getOrderFlightInfo())
|
||||
);
|
||||
}
|
||||
//补充额外的字段
|
||||
OrderFlightResponse.FlightOrderBaseInfo orderBaseInfo = it.getOrderBaseInfo();
|
||||
record.setRouteOrderNo(orderBaseInfo.getJourneyID());
|
||||
return record;
|
||||
}).toList();
|
||||
cTripOrderDetailRepository.saveAllCTripFlightRecord(cTripFlightRecords);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,12 +64,22 @@ public class CTripOrderRecordAutoSave {
|
|||
OrderHotelResponse hotelOrder = cTripOrderDetailRequest.getHotelOrder();
|
||||
List<OrderHotelResponse.HotelAccountSettlementInfo> lstHtlSettlement = hotelOrder.getLstHtlSettlement();
|
||||
if (lstHtlSettlement != null && !lstHtlSettlement.isEmpty()) {
|
||||
List<CTripHotelRecordBase> list = lstHtlSettlement.stream()
|
||||
List<CTripHotelRecord> list = lstHtlSettlement.stream()
|
||||
.flatMap(it -> it.getLstHotelSettlementDetail().stream())
|
||||
.map(OrderHotelResponse.LstHotelSettlementDetail::getSettlementDetail)
|
||||
.map(CTripHotelRecordBase::changeInfo)
|
||||
.toList();
|
||||
cTripOrderDetailRepository.saveAllHotelRecord(list);
|
||||
.map(it -> {
|
||||
OrderHotelResponse.SettlementDetail settlementDetail = it.getSettlementDetail();
|
||||
CTripHotelRecord record = cTripOrderDetailRepository.findHotelRecordByRecordId(
|
||||
String.valueOf(settlementDetail.getRecordId()));
|
||||
if (record == null) {
|
||||
record = CTripHotelRecord.of(CTripHotelRecordBase.changeInfo(settlementDetail),
|
||||
CTripHotelInfo.of(it.getHotelDetail()));
|
||||
}
|
||||
//补充额外的字段
|
||||
OrderHotelResponse.SettlementOrderDetail orderDetail = it.getOrderDetail();
|
||||
record.setRecordId(orderDetail.getHotelRelatedJourneyNo());
|
||||
return record;
|
||||
}).toList();
|
||||
cTripOrderDetailRepository.saveAllCTripHotelRecord(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,27 +88,45 @@ public class CTripOrderRecordAutoSave {
|
|||
OrderTrainResponse trainOrder = cTripOrderDetailRequest.getTrainOrder();
|
||||
List<OrderTrainResponse.CorpTrainAccountSettlement> lstTrainSettlement = trainOrder.getLstTrainSettlement();
|
||||
if (lstTrainSettlement != null && !lstTrainSettlement.isEmpty()) {
|
||||
List<CTripTrainRecordBase> list = lstTrainSettlement.stream()
|
||||
List<CTripTrainRecord> list = lstTrainSettlement.stream()
|
||||
.flatMap(it -> it.getLstTrainSettlementDetail().stream())
|
||||
.map(OrderTrainResponse.CorpTrainSettlementInfo::getTrainSettlementDetail)
|
||||
.map(CTripTrainRecordBase::changeInfo)
|
||||
.toList();
|
||||
cTripOrderDetailRepository.saveAllTrainRecord(list);
|
||||
.map(it -> {
|
||||
OrderTrainResponse.CorpTrainSettlementDetail trainSettlementDetail = it.getTrainSettlementDetail();
|
||||
CTripTrainRecord record = cTripOrderDetailRepository.findTrainRecordByRecordId(
|
||||
String.valueOf(trainSettlementDetail.getRecordID()));
|
||||
if (record == null) {
|
||||
record = CTripTrainRecord.of(CTripTrainRecordBase.changeInfo(trainSettlementDetail),
|
||||
CTripTrainInfo.of(it.getTrainSettlementTicket()));
|
||||
}
|
||||
//补充额外的字段
|
||||
record.setRouteOrderNo(it.getTrainSettlementOrder().getJouneryID());
|
||||
return record;
|
||||
}).toList();
|
||||
cTripOrderDetailRepository.saveAllCTripTrainRecord(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void cTripCarRecordAutoSave() {
|
||||
OrderCarResponse carOrder = cTripOrderDetailRequest.getCarOrder();
|
||||
List<OrderCarResponse.CarOrderAccountSettlementDetail> settlementList = carOrder.getCarOrderAccountSettlementList();
|
||||
if (settlementList != null && !settlementList.isEmpty()) {
|
||||
List<CTripCarRecordBase> list = settlementList.stream()
|
||||
List<CTripCarRecord> list = settlementList.stream()
|
||||
.flatMap(it -> it.getCarSettlementDetailList().stream())
|
||||
.map(OrderCarResponse.CarOrderSettlementDetail::getSettlementBaseInfo)
|
||||
.map(CTripCarRecordBase::changeInfo)
|
||||
.toList();
|
||||
cTripOrderDetailRepository.saveAllCarRecord(list);
|
||||
.map(it -> {
|
||||
OrderCarResponse.CarOrderSettlementBaseInfo settlementBaseInfo = it.getSettlementBaseInfo();
|
||||
CTripCarRecord record = cTripOrderDetailRepository.findCarRecordByRecordId(
|
||||
String.valueOf(settlementBaseInfo.getRecordId()));
|
||||
if (record == null) {
|
||||
record = CTripCarRecord.of(
|
||||
CTripCarRecordBase.changeInfo(settlementBaseInfo),
|
||||
CTripCarQuickInfo.of(it.getOrderDetail().getQuickProductInfo()));
|
||||
}
|
||||
//补充额外的字段
|
||||
OrderCarResponse.CarOrderCorpInfo corpInfo = it.getOrderDetail().getCorpInfo();
|
||||
record.setRouteOrderNo(corpInfo.getJouneryId());
|
||||
return record;
|
||||
}).toList();
|
||||
cTripOrderDetailRepository.saveAllCTripCarRecord(list);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ class RouteApplicationTests {
|
|||
|
||||
@Test
|
||||
void loginSignProd() {
|
||||
String sfno = "181203012";
|
||||
String sfno = "231201060";
|
||||
String syscode = "FSSC";
|
||||
String billcode = "CLSQ240225000099";
|
||||
String companycode = "正泰集团股份有限公司";
|
||||
|
|
Loading…
Reference in New Issue