1.字段修改为 静态字段
This commit is contained in:
parent
233d548915
commit
d5a25707e6
|
@ -6,6 +6,7 @@ import com.chint.domain.repository.LocationRepository;
|
|||
import com.chint.domain.repository.OrderDetailRepository;
|
||||
import com.chint.domain.repository.RouteRepository;
|
||||
import com.chint.domain.repository.UserRepository;
|
||||
import com.chint.infrastructure.constant.BelongSystemConstant;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.flight.*;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.hotel.ClientInfo;
|
||||
import com.chint.interfaces.rest.ctrip.dto.search.hotel.HotelOrderInfoEntity;
|
||||
|
@ -18,6 +19,7 @@ import java.util.Optional;
|
|||
|
||||
import static com.chint.infrastructure.constant.UtilConstant.KEEP_TWO_DECIMAL_ZERO;
|
||||
|
||||
import static com.chint.infrastructure.constant.BelongSystemConstant.*;
|
||||
@Component
|
||||
public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
||||
|
||||
|
@ -105,21 +107,20 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
|
||||
// flightOrderDetail.setSupplier(SUPPLIER_C_TRIP_EXTENSION_NAME);
|
||||
|
||||
flightOrderDetail.setTrvaleSysType("XC");
|
||||
flightOrderDetail.setTrvaleSysType(TRAVAL_SYS_TYPE_CTRIP);
|
||||
if (sysCode != null) {
|
||||
if (sysCode.equals("FSSC")) {
|
||||
flightOrderDetail.setBelongSysType("GF_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_FSSC)) {
|
||||
flightOrderDetail.setBelongSysType(BELONG_SYS_TYPE_FSSC);
|
||||
}
|
||||
if (sysCode.equals("H3BPM")) {
|
||||
flightOrderDetail.setBelongSysType("JT_BPM");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_H3BPM)) {
|
||||
flightOrderDetail.setBelongSysType(BELONG_SYS_TYPE_H3BPM);
|
||||
|
||||
}
|
||||
if (sysCode.equals("XNFSSC")) {
|
||||
flightOrderDetail.setBelongSysType("XN_FK");
|
||||
|
||||
if (sysCode.equals(BELONG_SYS_CODE_XNFSSC)) {
|
||||
flightOrderDetail.setBelongSysType(BELONG_SYS_TYPE_XNFSSC);
|
||||
}
|
||||
if (sysCode.equals("ANFSSC")) {
|
||||
flightOrderDetail.setBelongSysType("AN_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_ANFSSC)) {
|
||||
flightOrderDetail.setBelongSysType(BELONG_SYS_TYPE_ANFSSC);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,30 +275,31 @@ public class CTripOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
// } else {
|
||||
// hotelOrderDetail.setOverStandard("false");
|
||||
// }
|
||||
hotelOrderDetail.setTrvaleSysType("XC");
|
||||
|
||||
// hotelOrderDetail.setSupplier(SUPPLIER_C_TRIP_EXTENSION_NAME);
|
||||
|
||||
hotelOrderDetail.setTrvaleSysType(TRAVAL_SYS_TYPE_CTRIP);
|
||||
|
||||
if (routeOrder != null) {
|
||||
String sysCode = routeOrder.getApproveOrderNo().getSysCode();
|
||||
approveOrderNo = routeOrder.getApproveOrderNo();
|
||||
|
||||
if (sysCode != null) {
|
||||
if (sysCode.equals("FSSC")) {
|
||||
hotelOrderDetail.setBelongSysType("GF_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_FSSC)) {
|
||||
hotelOrderDetail.setBelongSysType(BELONG_SYS_TYPE_FSSC);
|
||||
}
|
||||
if (sysCode.equals("H3BPM")) {
|
||||
hotelOrderDetail.setBelongSysType("JT_BPM");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_H3BPM)) {
|
||||
hotelOrderDetail.setBelongSysType(BELONG_SYS_TYPE_H3BPM);
|
||||
|
||||
}
|
||||
if (sysCode.equals("XNFSSC")) {
|
||||
hotelOrderDetail.setBelongSysType("XN_FK");
|
||||
|
||||
if (sysCode.equals(BELONG_SYS_CODE_XNFSSC)) {
|
||||
hotelOrderDetail.setBelongSysType(BELONG_SYS_TYPE_XNFSSC);
|
||||
}
|
||||
if (sysCode.equals("ANFSSC")) {
|
||||
hotelOrderDetail.setBelongSysType("AN_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_ANFSSC)) {
|
||||
hotelOrderDetail.setBelongSysType(BELONG_SYS_TYPE_ANFSSC);
|
||||
}
|
||||
}
|
||||
|
||||
// byOrderNo.flatMap(orderDetail -> routeOrder.getLegItems()
|
||||
// .stream()
|
||||
// .filter(it -> byOrderNo.get().getLegId().equals(it.getLegId()))
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.util.List;
|
|||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.chint.infrastructure.constant.BelongSystemConstant.*;
|
||||
import static com.chint.infrastructure.constant.CommonMessageConstant.NOT_FOUND;
|
||||
import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_ETA;
|
||||
|
||||
|
@ -121,24 +122,26 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
passenger = data.getPassengerList().get(0);
|
||||
}
|
||||
|
||||
flightOrderDetail.setTrvaleSysType("TC");
|
||||
|
||||
// flightOrderDetail.setSupplier(SUPPLIER_L_Y_EXTENSION_NAME);
|
||||
|
||||
flightOrderDetail.setTrvaleSysType(TRAVAL_SYS_TYPE_LY);
|
||||
if (sysCode != null) {
|
||||
if (sysCode.equals("FSSC")) {
|
||||
flightOrderDetail.setBelongSysType("GF_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_FSSC)) {
|
||||
flightOrderDetail.setBelongSysType(BELONG_SYS_TYPE_FSSC);
|
||||
}
|
||||
if (sysCode.equals("H3BPM")) {
|
||||
flightOrderDetail.setBelongSysType("JT_BPM");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_H3BPM)) {
|
||||
flightOrderDetail.setBelongSysType(BELONG_SYS_TYPE_H3BPM);
|
||||
|
||||
}
|
||||
if (sysCode.equals("XNFSSC")) {
|
||||
flightOrderDetail.setBelongSysType("XN_FK");
|
||||
|
||||
if (sysCode.equals(BELONG_SYS_CODE_XNFSSC)) {
|
||||
flightOrderDetail.setBelongSysType(BELONG_SYS_TYPE_XNFSSC);
|
||||
}
|
||||
if (sysCode.equals("ANFSSC")) {
|
||||
flightOrderDetail.setBelongSysType("AN_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_ANFSSC)) {
|
||||
flightOrderDetail.setBelongSysType(BELONG_SYS_TYPE_ANFSSC);
|
||||
}
|
||||
}
|
||||
// flightOrderDetail.setSupplier(SUPPLIER_L_Y_EXTENSION_NAME);
|
||||
|
||||
|
||||
String EmployeeNo = routeOrder.getUserId();
|
||||
User user = userRepository.findByUserEmployeeNo(EmployeeNo);
|
||||
|
@ -275,23 +278,24 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
|
||||
HotelOrderDetail hotelOrderDetail = new HotelOrderDetail();
|
||||
|
||||
hotelOrderDetail.setTrvaleSysType("TC");
|
||||
hotelOrderDetail.setTrvaleSysType(TRAVAL_SYS_TYPE_LY);
|
||||
if (sysCode != null) {
|
||||
if (sysCode.equals("FSSC")) {
|
||||
hotelOrderDetail.setBelongSysType("GF_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_FSSC)) {
|
||||
hotelOrderDetail.setBelongSysType(BELONG_SYS_TYPE_FSSC);
|
||||
}
|
||||
if (sysCode.equals("H3BPM")) {
|
||||
hotelOrderDetail.setBelongSysType("JT_BPM");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_H3BPM)) {
|
||||
hotelOrderDetail.setBelongSysType(BELONG_SYS_TYPE_H3BPM);
|
||||
|
||||
}
|
||||
if (sysCode.equals("XNFSSC")) {
|
||||
hotelOrderDetail.setBelongSysType("XN_FK");
|
||||
|
||||
if (sysCode.equals(BELONG_SYS_CODE_XNFSSC)) {
|
||||
hotelOrderDetail.setBelongSysType(BELONG_SYS_TYPE_XNFSSC);
|
||||
}
|
||||
if (sysCode.equals("ANFSSC")) {
|
||||
hotelOrderDetail.setBelongSysType("AN_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_ANFSSC)) {
|
||||
hotelOrderDetail.setBelongSysType(BELONG_SYS_TYPE_ANFSSC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String EmployeeNo = routeOrder.getUserId();
|
||||
User user = userRepository.findByUserEmployeeNo(EmployeeNo);
|
||||
if (orderInfo != null) {
|
||||
|
@ -413,25 +417,27 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
String sysCode = routeOrder.getApproveOrderNo().getSysCode();
|
||||
|
||||
TrainOrderDetail trainOrderDetail = new TrainOrderDetail();
|
||||
trainOrderDetail.setTrvaleSysType("TC");
|
||||
|
||||
|
||||
trainOrderDetail.setTrvaleSysType(TRAVAL_SYS_TYPE_LY);
|
||||
if (sysCode != null) {
|
||||
if (sysCode.equals("FSSC")) {
|
||||
trainOrderDetail.setBelongSysType("GF_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_FSSC)) {
|
||||
trainOrderDetail.setBelongSysType(BELONG_SYS_TYPE_FSSC);
|
||||
}
|
||||
if (sysCode.equals("H3BPM")) {
|
||||
trainOrderDetail.setBelongSysType("JT_BPM");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_H3BPM)) {
|
||||
trainOrderDetail.setBelongSysType(BELONG_SYS_TYPE_H3BPM);
|
||||
|
||||
}
|
||||
if (sysCode.equals("XNFSSC")) {
|
||||
trainOrderDetail.setBelongSysType("XN_FK");
|
||||
|
||||
if (sysCode.equals(BELONG_SYS_CODE_XNFSSC)) {
|
||||
trainOrderDetail.setBelongSysType(BELONG_SYS_TYPE_XNFSSC);
|
||||
}
|
||||
if (sysCode.equals("ANFSSC")) {
|
||||
trainOrderDetail.setBelongSysType("AN_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_ANFSSC)) {
|
||||
trainOrderDetail.setBelongSysType(BELONG_SYS_TYPE_ANFSSC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (trainDetailData != null) {
|
||||
trainOrderDetail.setOrderNo(trainDetailData.getOrderNo());
|
||||
trainOrderDetail.setDetailId(trainDetailData.getOrderNo());
|
||||
|
@ -543,21 +549,23 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
routeOrder = routeRepository.queryById(orderDetail.getRouteId());
|
||||
String sysCode = routeOrder.getApproveOrderNo().getSysCode();
|
||||
|
||||
carOrderDetail.setTrvaleSysType("TC");
|
||||
carOrderDetail.setTrvaleSysType(TRAVAL_SYS_TYPE_LY);
|
||||
if (sysCode != null) {
|
||||
if (sysCode.equals("FSSC")) {
|
||||
carOrderDetail.setBelongSysType("GF_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_FSSC)) {
|
||||
carOrderDetail.setBelongSysType(BELONG_SYS_TYPE_FSSC);
|
||||
}
|
||||
if (sysCode.equals("H3BPM")) {
|
||||
carOrderDetail.setBelongSysType("JT_BPM");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_H3BPM)) {
|
||||
carOrderDetail.setBelongSysType(BELONG_SYS_TYPE_H3BPM);
|
||||
|
||||
}
|
||||
if (sysCode.equals("XNFSSC")) {
|
||||
carOrderDetail.setBelongSysType("XN_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_XNFSSC)) {
|
||||
carOrderDetail.setBelongSysType(BELONG_SYS_TYPE_XNFSSC);
|
||||
}
|
||||
if (sysCode.equals("ANFSSC")) {
|
||||
carOrderDetail.setBelongSysType("AN_FK");
|
||||
if (sysCode.equals(BELONG_SYS_CODE_ANFSSC)) {
|
||||
carOrderDetail.setBelongSysType(BELONG_SYS_TYPE_ANFSSC);
|
||||
}
|
||||
}
|
||||
|
||||
carOrderDetail.setOrderNo(carOrderDetailInfo.getOrderSerialNo());
|
||||
carOrderDetail.setDetailId(carOrderDetailInfo.getOrderSerialNo());
|
||||
Optional<OrderDetail> first1 = routeOrder
|
||||
|
|
|
@ -5,15 +5,17 @@ public class BelongSystemConstant {
|
|||
public static final String TRAVAL_SYS_TYPE_CTRIP = "XC";
|
||||
public static final String TRAVAL_SYS_TYPE_LY = "TC";
|
||||
|
||||
public static final String BELONG_SYS_CODE_FSSC = "CTrip";
|
||||
public static final String BELONG_SYS_CODE_H3BPM = "CTrip";
|
||||
public static final String BELONG_SYS_CODE_FSSC = "FSSC";
|
||||
public static final String BELONG_SYS_CODE_H3BPM = "H3BPM";
|
||||
public static final String BELONG_SYS_CODE_XNFSSC = "XNFSSC";
|
||||
|
||||
public static final String BELONG_SYS_CODE_ANFSSC = "ANFSSC";
|
||||
|
||||
public static final String BELONG_SYS_TYPE_FSSC = "GF_FK";
|
||||
public static final String BELONG_SYS_TYPE_H3BPM = "JT_BPM";
|
||||
public static final String BELONG_SYS_TYPE_XNFSSC = "XN_FK";
|
||||
|
||||
public static final String BELONG_SYS_TYPE_ANFSSC = "AN_FK";
|
||||
|
||||
|
||||
public static final String SUPPLIER_C_TRIP_CN_NAME = "携程";
|
||||
public static final String SUPPLIER_C_TRIP_EXTENSION_NAME = "携程预定";
|
||||
public static final String SUPPLIER_C_TRIP_BPM_NAME = "携程商旅";
|
||||
public static final String SUPPLIER_L_Y = "LY";
|
||||
public static final String SUPPLIER_L_Y_CN_NAME = "同程";
|
||||
public static final String SUPPLIER_L_Y_EXTENSION_NAME = "同程预定";
|
||||
public static final String SUPPLIER_L_Y_BPM_NAME = "同程商旅";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue