Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
2fefbbeab8
|
@ -2,11 +2,13 @@ package com.chint.domain.aggregates.order;
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
import org.springframework.data.annotation.Id;
|
import org.springframework.data.annotation.Id;
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
import org.springframework.data.relational.core.mapping.Table;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Table("train_order_detail")
|
@Table("train_order_detail")
|
||||||
|
@Accessors(chain = true)
|
||||||
public class TrainOrderDetail {
|
public class TrainOrderDetail {
|
||||||
@Id
|
@Id
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.chint.domain.repository.UserRepository;
|
||||||
import com.chint.domain.value_object.*;
|
import com.chint.domain.value_object.*;
|
||||||
import com.chint.interfaces.rest.ly.dto.hotelorderdatapushbach.Resident;
|
import com.chint.interfaces.rest.ly.dto.hotelorderdatapushbach.Resident;
|
||||||
import com.chint.interfaces.rest.ly.dto.search.response.hotel.HotelDetailResponse;
|
import com.chint.interfaces.rest.ly.dto.search.response.hotel.HotelDetailResponse;
|
||||||
|
import com.chint.interfaces.rest.ly.dto.search.response.train.TrainDetailResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -17,9 +18,9 @@ import java.util.stream.Collectors;
|
||||||
public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserRepository userRepository;
|
private UserRepository userRepository;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CarOrderDetail createCarOrderDetail(Object carOrderDetailData) {
|
public CarOrderDetail createCarOrderDetail(Object carOrderDetailData) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -27,9 +28,15 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TrainOrderDetail createTrainOrderDetail(Object trainOrderDetailData) {
|
public TrainOrderDetail createTrainOrderDetail(Object trainOrderDetailData) {
|
||||||
|
TrainDetailResponse trainDetailResponse = (TrainDetailResponse) trainOrderDetailData;
|
||||||
|
TrainDetailResponse.TrainDetailData data = trainDetailResponse.getData();
|
||||||
|
TrainOrderDetail trainOrderDetail = new TrainOrderDetail();
|
||||||
|
//映射值
|
||||||
|
trainOrderDetail.setOrderNo(data.getOrderNo())
|
||||||
|
.setOverStandard(String.valueOf(data.getRuleViolate()))
|
||||||
|
;
|
||||||
|
|
||||||
|
return trainOrderDetail;
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,11 +63,9 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
||||||
private FlightOrderDetail convertFlight(HotelDetailResponse hotelDetailResponse) {
|
private FlightOrderDetail convertFlight(HotelDetailResponse hotelDetailResponse) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private HotelOrderDetail convertHotel(HotelDetailResponse hotelDetailResponse) {
|
private HotelOrderDetail convertHotel(HotelDetailResponse hotelDetailResponse) {
|
||||||
HotelOrderDetail hotelOrderDetail = new HotelOrderDetail();
|
HotelOrderDetail hotelOrderDetail = new HotelOrderDetail();
|
||||||
HotelDetailResponse.Data data = hotelDetailResponse.getData();
|
HotelDetailResponse.Data data = hotelDetailResponse.getData();
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_TRAIN;
|
import static com.chint.infrastructure.constant.LegConstant.*;
|
||||||
import static com.chint.infrastructure.constant.SupplierNameConstant.SUPPLIER_L_Y;
|
import static com.chint.infrastructure.constant.SupplierNameConstant.SUPPLIER_L_Y;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
@ -49,7 +49,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
||||||
HotelDetailResponse.Data data = hotelDetailResponse.getData();
|
HotelDetailResponse.Data data = hotelDetailResponse.getData();
|
||||||
return Optional.of(
|
return Optional.of(
|
||||||
OrderLegData.builder()
|
OrderLegData.builder()
|
||||||
.productType(LEG_TYPE_TRAIN)
|
.productType(LEG_TYPE_HOTEL)
|
||||||
.outOrderNo(data.getOrderInfo().getOrderSerialNo())
|
.outOrderNo(data.getOrderInfo().getOrderSerialNo())
|
||||||
.price(String.valueOf(data.getOrderInfo().getTotalPrice()))
|
.price(String.valueOf(data.getOrderInfo().getTotalPrice()))
|
||||||
.actualOrderNo(data.getOrderInfo().getOrderSerialNo())
|
.actualOrderNo(data.getOrderInfo().getOrderSerialNo())
|
||||||
|
@ -63,7 +63,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
||||||
CarDetailResponse.Data data = carDetailResponse.getData();
|
CarDetailResponse.Data data = carDetailResponse.getData();
|
||||||
return Optional.of(
|
return Optional.of(
|
||||||
OrderLegData.builder()
|
OrderLegData.builder()
|
||||||
.productType(LEG_TYPE_TRAIN)
|
.productType(LEG_TYPE_TAXI)
|
||||||
.outOrderNo(data.getOrderNo())
|
.outOrderNo(data.getOrderNo())
|
||||||
.price(String.valueOf(data.getTotalAmount()))
|
.price(String.valueOf(data.getTotalAmount()))
|
||||||
.actualOrderNo(data.getOutOrderNo())
|
.actualOrderNo(data.getOutOrderNo())
|
||||||
|
@ -78,7 +78,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
||||||
FlightOrderDetail.Data data = flightOrderDetail.getData();
|
FlightOrderDetail.Data data = flightOrderDetail.getData();
|
||||||
return Optional.of(
|
return Optional.of(
|
||||||
OrderLegData.builder()
|
OrderLegData.builder()
|
||||||
.productType(LEG_TYPE_TRAIN)
|
.productType(LEG_TYPE_AIRPLANE)
|
||||||
// .orderNo(data.get())
|
// .orderNo(data.get())
|
||||||
// .price(String.valueOf( data.getTotalAmount()))
|
// .price(String.valueOf( data.getTotalAmount()))
|
||||||
// .actualOrderNo(data.getOutOrderNo())
|
// .actualOrderNo(data.getOutOrderNo())
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class BPMController {
|
||||||
@PostMapping("/reschedule/back")
|
@PostMapping("/reschedule/back")
|
||||||
public Result<TravelStandards> rescheduleBack(@RequestBody BPMBack bpmBack) {
|
public Result<TravelStandards> rescheduleBack(@RequestBody BPMBack bpmBack) {
|
||||||
//获取订单号和审批结果
|
//获取订单号和审批结果
|
||||||
|
System.out.println("bpmBack = " + bpmBack);
|
||||||
return Result.Success(CommonMessageConstant.SUCCESS);
|
return Result.Success(CommonMessageConstant.SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class TrainDetailResponse {
|
||||||
private int bookType;
|
private int bookType;
|
||||||
private int trainIndex;
|
private int trainIndex;
|
||||||
private String relationOrderNo;
|
private String relationOrderNo;
|
||||||
|
private Boolean ruleViolate;
|
||||||
// Constructors, Getters, and Setters
|
// Constructors, Getters, and Setters
|
||||||
}
|
}
|
||||||
@Data
|
@Data
|
||||||
|
|
Loading…
Reference in New Issue