完善携程酒店结算代码
This commit is contained in:
parent
e903a95b35
commit
519827f281
|
@ -32,14 +32,14 @@ public class RouteRequest implements Serializable {
|
||||||
|
|
||||||
private String RouteRequestNo;
|
private String RouteRequestNo;
|
||||||
|
|
||||||
private String supplier;
|
|
||||||
|
|
||||||
@MappedCollection(idColumn = "route_request_id", keyColumn = "route_request_key")
|
@MappedCollection(idColumn = "route_request_id", keyColumn = "route_request_key")
|
||||||
private List<RouteRequestLeg> routeRequestLegList;
|
private List<RouteRequestLeg> routeRequestLegList;
|
||||||
|
|
||||||
@MappedCollection(idColumn = "route_request_id", keyColumn = "route_request_key")
|
@MappedCollection(idColumn = "route_request_id", keyColumn = "route_request_key")
|
||||||
private List<RouteRequestEvent> eventList;
|
private List<RouteRequestEvent> eventList;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String supplier;
|
||||||
@Transient
|
@Transient
|
||||||
private Integer status;
|
private Integer status;
|
||||||
@Transient
|
@Transient
|
||||||
|
|
|
@ -127,6 +127,12 @@ public class OrderHotelRecord extends OrderBaseRecord {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OrderHotelRecord loadBookerAndGuestCode(String bookingUserCode, String userCode) {
|
||||||
|
this.setBookingUserCode(bookingUserCode);
|
||||||
|
this.setUserCode(userCode);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// 加载财务信息
|
// 加载财务信息
|
||||||
public OrderHotelRecord loadFinancialInfo(String accountPeriod,
|
public OrderHotelRecord loadFinancialInfo(String accountPeriod,
|
||||||
String billNo,
|
String billNo,
|
||||||
|
|
|
@ -89,6 +89,7 @@ public class User implements Serializable {
|
||||||
public String lowestDeptCode(String companyName) {
|
public String lowestDeptCode(String companyName) {
|
||||||
Optional<UserDepartmentInfo> first = this.userDepartmentInfoList
|
Optional<UserDepartmentInfo> first = this.userDepartmentInfoList
|
||||||
.stream()
|
.stream()
|
||||||
|
.filter(it -> it.getCompanyName() != null)
|
||||||
.filter(it -> it.getCompanyName().equals(companyName))
|
.filter(it -> it.getCompanyName().equals(companyName))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
return first.map(this::lowestDept).orElse(null);
|
return first.map(this::lowestDept).orElse(null);
|
||||||
|
|
|
@ -464,10 +464,10 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
||||||
}
|
}
|
||||||
address = address + cTripHotelInfo.getHotelName();
|
address = address + cTripHotelInfo.getHotelName();
|
||||||
orderHotelRecord.loadLocationInfo(
|
orderHotelRecord.loadLocationInfo(
|
||||||
address,
|
|
||||||
locationRes.getCountry(),
|
locationRes.getCountry(),
|
||||||
locationRes.getProvince(),
|
locationRes.getProvince(),
|
||||||
cTripHotelInfo.getCityName());
|
locationRes.getProvince() + cTripHotelInfo.getCityName(),
|
||||||
|
address);
|
||||||
} else {
|
} else {
|
||||||
//如果找不到该地区,那么只能先用空的
|
//如果找不到该地区,那么只能先用空的
|
||||||
orderHotelRecord.loadLocationInfo("", "", cTripHotelInfo.getCityName(), cTripHotelInfo.getHotelName());
|
orderHotelRecord.loadLocationInfo("", "", cTripHotelInfo.getCityName(), cTripHotelInfo.getHotelName());
|
||||||
|
@ -480,7 +480,7 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
||||||
|
|
||||||
// 加载订单来源和系统归属信息
|
// 加载订单来源和系统归属信息
|
||||||
String sourceInfo;
|
String sourceInfo;
|
||||||
if (cTripHotelRecord.getRouteOrderNo() == null) {
|
if (routeOrderNo == null || routeOrderNo.isBlank() || routeOrderNo.isEmpty()) {
|
||||||
sourceInfo = "N";
|
sourceInfo = "N";
|
||||||
} else {
|
} else {
|
||||||
sourceInfo = "Y";
|
sourceInfo = "Y";
|
||||||
|
@ -543,10 +543,21 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
||||||
String.valueOf(personAmount));
|
String.valueOf(personAmount));
|
||||||
|
|
||||||
// 加载预订人和入住人信息
|
// 加载预订人和入住人信息
|
||||||
orderHotelRecord.loadBookerAndGuestInfo(cTripHotelOrderDetail.getEmployeeID(),
|
|
||||||
cTripHotelOrderDetail.getEmployeeName(),
|
if (orderHotelRecord.getOrderSource().equals("Y")) {
|
||||||
cTripHotelOrderDetail.getEmployeeName(),
|
orderHotelRecord.loadBookerAndGuestInfo(
|
||||||
cTripHotelOrderDetail.getEmployeeID());
|
cTripHotelOrderDetail.getEmployeeID(),
|
||||||
|
cTripHotelOrderDetail.getEmployeeName(),
|
||||||
|
cTripHotelOrderDetail.getClientName(),
|
||||||
|
cTripHotelOrderDetail.getEmployeeID());
|
||||||
|
} else {
|
||||||
|
orderHotelRecord.loadBookerAndGuestInfo(
|
||||||
|
"",
|
||||||
|
cTripHotelOrderDetail.getEmployeeName(),
|
||||||
|
cTripHotelOrderDetail.getClientName(),
|
||||||
|
"");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 加载组织架构
|
// 加载组织架构
|
||||||
orderHotelRecord.loadOrganizationalAndProjectInfo(cTripHotelOrderDetail.getDept1(),
|
orderHotelRecord.loadOrganizationalAndProjectInfo(cTripHotelOrderDetail.getDept1(),
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.chint.domain.aggregates.user.User;
|
||||||
import com.chint.infrastructure.repository.jdbc.*;
|
import com.chint.infrastructure.repository.jdbc.*;
|
||||||
import com.chint.infrastructure.util.BeanCopyUtils;
|
import com.chint.infrastructure.util.BeanCopyUtils;
|
||||||
import com.chint.interfaces.rest.bpm.dto.BPMResponse;
|
import com.chint.interfaces.rest.bpm.dto.BPMResponse;
|
||||||
|
import com.chint.interfaces.rest.user.UserHttpRequest;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -48,6 +49,9 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
||||||
@Autowired
|
@Autowired
|
||||||
private CTripOrderRecordExtensionFactory cTripOrderRecordExtensionFactory;
|
private CTripOrderRecordExtensionFactory cTripOrderRecordExtensionFactory;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserHttpRequest userHttpRequest;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OrderFlightRecord createFlightOrderRecord(Object orderFlightRecordData) {
|
public OrderFlightRecord createFlightOrderRecord(Object orderFlightRecordData) {
|
||||||
OrderFlightRecord orderFlightRecord = new OrderFlightRecord();
|
OrderFlightRecord orderFlightRecord = new OrderFlightRecord();
|
||||||
|
@ -158,7 +162,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
||||||
.flatMap(it -> Optional.ofNullable(it.getRouterOrderExtensionField()));
|
.flatMap(it -> Optional.ofNullable(it.getRouterOrderExtensionField()));
|
||||||
routerOrderExtensionField.ifPresentOrElse(it -> orderFlightRecord.loadBelongDeport(it.getBelongDeptCode()),
|
routerOrderExtensionField.ifPresentOrElse(it -> orderFlightRecord.loadBelongDeport(it.getBelongDeptCode()),
|
||||||
() -> orderFlightRecord.loadBelongDeport(
|
() -> orderFlightRecord.loadBelongDeport(
|
||||||
cTripOrderRecordExtensionFactory.belongDeport(orderFlightRecord.getBookingUserCode(), orderFlightRecord.getAccountCompanyName())
|
userHttpRequest.belongDeport(orderFlightRecord.getBookingUserCode(), orderFlightRecord.getAccountCompanyName())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +250,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
||||||
.flatMap(it -> Optional.ofNullable(it.getRouterOrderExtensionField()));
|
.flatMap(it -> Optional.ofNullable(it.getRouterOrderExtensionField()));
|
||||||
routerOrderExtensionField.ifPresentOrElse(it -> orderHotelRecord.loadBelongDeport(it.getBelongDeptCode()),
|
routerOrderExtensionField.ifPresentOrElse(it -> orderHotelRecord.loadBelongDeport(it.getBelongDeptCode()),
|
||||||
() -> orderHotelRecord.loadBelongDeport(
|
() -> orderHotelRecord.loadBelongDeport(
|
||||||
cTripOrderRecordExtensionFactory.belongDeport(orderHotelRecord.getBookingUserCode(), orderHotelRecord.getAccountCompanyName())
|
userHttpRequest.belongDeport(orderHotelRecord.getBookingUserCode(), orderHotelRecord.getAccountCompanyName())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +335,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
||||||
.flatMap(it -> Optional.ofNullable(it.getRouterOrderExtensionField()));
|
.flatMap(it -> Optional.ofNullable(it.getRouterOrderExtensionField()));
|
||||||
routerOrderExtensionField.ifPresentOrElse(it -> orderTrainRecord.loadBelongDeport(it.getBelongDeptCode()),
|
routerOrderExtensionField.ifPresentOrElse(it -> orderTrainRecord.loadBelongDeport(it.getBelongDeptCode()),
|
||||||
() -> orderTrainRecord.loadBelongDeport(
|
() -> orderTrainRecord.loadBelongDeport(
|
||||||
cTripOrderRecordExtensionFactory.belongDeport(orderTrainRecord.getBookingUserCode(), orderTrainRecord.getAccountCompanyName())
|
userHttpRequest.belongDeport(orderTrainRecord.getBookingUserCode(), orderTrainRecord.getAccountCompanyName())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,7 +403,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
||||||
.flatMap(it -> Optional.ofNullable(it.getRouterOrderExtensionField()));
|
.flatMap(it -> Optional.ofNullable(it.getRouterOrderExtensionField()));
|
||||||
routerOrderExtensionField.ifPresentOrElse(it -> orderCarRecord.loadBelongDeport(it.getBelongDeptCode()),
|
routerOrderExtensionField.ifPresentOrElse(it -> orderCarRecord.loadBelongDeport(it.getBelongDeptCode()),
|
||||||
() -> orderCarRecord.loadBelongDeport(
|
() -> orderCarRecord.loadBelongDeport(
|
||||||
cTripOrderRecordExtensionFactory.belongDeport(orderCarRecord.getBookingUserCode(), orderCarRecord.getAccountCompanyName())
|
userHttpRequest.belongDeport(orderCarRecord.getBookingUserCode(), orderCarRecord.getAccountCompanyName())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue