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