结算数据添加一个财务共享单号字段
This commit is contained in:
parent
8677651456
commit
ff18fd425f
|
@ -70,7 +70,7 @@ public class OrderCarRecord extends OrderBaseRecord {
|
|||
private String offlineCcomyCode; // 成本中心
|
||||
private String orderSource; // 预订来源:线上/线下
|
||||
private String payAmount;//支付总金额
|
||||
|
||||
private String receiptsNumOrigin;//支付总金额
|
||||
|
||||
|
||||
//添加行程信息
|
||||
|
@ -173,10 +173,17 @@ public class OrderCarRecord extends OrderBaseRecord {
|
|||
return this;
|
||||
}
|
||||
|
||||
public OrderCarRecord loadComplianceInfoNot() {
|
||||
this.setOverStandard("否");
|
||||
this.setOverStandardReason("");
|
||||
return this;
|
||||
}
|
||||
|
||||
// 加载关联订单信息
|
||||
public OrderCarRecord loadRelatedOrderInfo(Long orderDetailId,
|
||||
String detailId,
|
||||
String receiptsNum,
|
||||
String receiptsNumOrigin,
|
||||
String parentOrderNo,
|
||||
String originalOrderNo) {
|
||||
this.setOrderDetailId(orderDetailId);
|
||||
|
@ -184,6 +191,7 @@ public class OrderCarRecord extends OrderBaseRecord {
|
|||
this.setReceiptsNum(receiptsNum);
|
||||
this.setParentOrderNo(parentOrderNo);
|
||||
this.setOriginalOrderNo(originalOrderNo);
|
||||
this.setReceiptsNumOrigin(receiptsNumOrigin);
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -78,6 +78,7 @@ public class OrderFlightRecord extends OrderBaseRecord {
|
|||
private String offlineCcomyCode; // 成本中心
|
||||
private String orderStatus;
|
||||
private String createTime;
|
||||
private String receiptsNumOrigin;//原差旅申请单单号
|
||||
|
||||
// 加载基础订单信息
|
||||
public OrderFlightRecord loadBasicOrderInfo(String orderNo,
|
||||
|
@ -220,6 +221,12 @@ public class OrderFlightRecord extends OrderBaseRecord {
|
|||
return this;
|
||||
}
|
||||
|
||||
public OrderFlightRecord loadComplianceInfoNot() {
|
||||
this.setOverStandard("否");
|
||||
this.setOverStandardReason("");
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// 加载未预订最低价原因
|
||||
public OrderFlightRecord loadNotLowReason(String notLowReason) {
|
||||
|
@ -231,6 +238,7 @@ public class OrderFlightRecord extends OrderBaseRecord {
|
|||
public OrderFlightRecord loadRelatedOrderInfo(Long orderDetailId,
|
||||
String detailId,
|
||||
String receiptsNum,
|
||||
String receiptsNumOrigin,
|
||||
String parentOrderNo,
|
||||
String originalOrderNo) {
|
||||
this.setOrderDetailId(orderDetailId);
|
||||
|
@ -238,6 +246,7 @@ public class OrderFlightRecord extends OrderBaseRecord {
|
|||
this.setReceiptsNum(receiptsNum);
|
||||
this.setParentOrderNo(parentOrderNo);
|
||||
this.setOriginalOrderNo(originalOrderNo);
|
||||
this.setReceiptsNumOrigin(receiptsNumOrigin);
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -8,6 +8,8 @@ import lombok.experimental.Accessors;
|
|||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Data
|
||||
@Table("order_hotel_record")
|
||||
@NoArgsConstructor
|
||||
|
@ -30,7 +32,7 @@ public class OrderHotelRecord extends OrderBaseRecord {
|
|||
private String originalOrderNo; // 原始订单号
|
||||
private String brandGroup; // 酒店品牌集团
|
||||
private String brandName; // 酒店品牌
|
||||
private int overStandard; // 是否违规(超标): 0否 1是
|
||||
private String overStandard; // 是否违规(超标): 0否 1是
|
||||
private String overStandardReason; // 违规原因(超标原因)
|
||||
private String receiptsNum; // 关联申请单号
|
||||
private String bookingName; // 预订人姓名
|
||||
|
@ -45,7 +47,7 @@ public class OrderHotelRecord extends OrderBaseRecord {
|
|||
private String hotelAddress; // 酒店地址
|
||||
private String hotelName; // 酒店名称
|
||||
private String includeAmount; // 含早情况:XX份
|
||||
private int isAgreement; // 是否协议酒店:0否1是
|
||||
private String isAgreement; // 是否协议酒店:0否1是
|
||||
private int paymentType; // 付款方式: 0-公司统付 1-个人付 2-混付
|
||||
private String orderAmount; // 订单总额
|
||||
private String companyAmount; // 企业统付总额
|
||||
|
@ -76,7 +78,7 @@ public class OrderHotelRecord extends OrderBaseRecord {
|
|||
private String payAmount; // 支付总金额
|
||||
private String orderStatus;
|
||||
private String createTime;
|
||||
|
||||
private String receiptsNumOrigin;//支付总金额
|
||||
// 加载基础订单信息
|
||||
public OrderHotelRecord loadBasicOrderInfo(String orderNo,
|
||||
String orderStatus,
|
||||
|
@ -168,12 +170,15 @@ public class OrderHotelRecord extends OrderBaseRecord {
|
|||
}
|
||||
|
||||
// 加载违规信息
|
||||
public OrderHotelRecord loadComplianceInfo(OrderDetail orderDetail) {
|
||||
orderDetail.getETAEvent().ifPresentOrElse(it -> {
|
||||
this.setOverStandard(1);
|
||||
this.setOverStandardReason(it.getExtension());
|
||||
public OrderHotelRecord loadComplianceInfo(Optional<OrderDetail> orderDetail) {
|
||||
orderDetail.ifPresentOrElse(it -> it.getETAEvent().ifPresentOrElse(orderEvent -> {
|
||||
this.setOverStandard("是");
|
||||
this.setOverStandardReason(orderEvent.getExtension());
|
||||
}, () -> {
|
||||
this.setOverStandard(0);
|
||||
this.setOverStandard("否");
|
||||
this.setOverStandardReason("");
|
||||
}), () -> {
|
||||
this.setOverStandard("否");
|
||||
this.setOverStandardReason("");
|
||||
});
|
||||
return this;
|
||||
|
@ -193,6 +198,7 @@ public class OrderHotelRecord extends OrderBaseRecord {
|
|||
public OrderHotelRecord loadOrderNoInfo(Long orderDetailId,
|
||||
String detailId,
|
||||
String receiptsNum,
|
||||
String receiptsNumOrigin,
|
||||
String parentOrderNo,
|
||||
String originalOrderNo) {
|
||||
this.setOrderDetailId(orderDetailId);
|
||||
|
@ -200,12 +206,13 @@ public class OrderHotelRecord extends OrderBaseRecord {
|
|||
this.setReceiptsNum(receiptsNum);
|
||||
this.setParentOrderNo(parentOrderNo);
|
||||
this.setOriginalOrderNo(originalOrderNo);
|
||||
this.setReceiptsNumOrigin(receiptsNumOrigin);
|
||||
return this;
|
||||
}
|
||||
|
||||
// 加载房间和早餐信息
|
||||
public OrderHotelRecord loadRoomAndBreakfastInfo(String includeAmount,
|
||||
int isAgreement,
|
||||
String isAgreement,
|
||||
int roomNightCount,
|
||||
int nightCount,
|
||||
String roomPrice,
|
||||
|
|
|
@ -71,7 +71,7 @@ public class OrderTrainRecord extends OrderBaseRecord{
|
|||
private String passportType; // 乘客证件类型
|
||||
private String trainTime; // 发车时间 yyyy-MM-dd HH:mm:ss
|
||||
private String yxId; // 影像比对ID
|
||||
|
||||
private String receiptsNumOrigin;//原差旅申请单单号
|
||||
// 加载基础订单信息
|
||||
public OrderTrainRecord loadBasicOrderInfo(Long id, String orderNo, String orderStatus, String createTime) {
|
||||
this.setId(id);
|
||||
|
|
|
@ -35,6 +35,7 @@ public class TripSubmitItemList implements Serializable {
|
|||
//父id
|
||||
private Integer lyRecordId;
|
||||
|
||||
|
||||
private Integer lyRecordKey;
|
||||
//编码
|
||||
private String code;
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.chint.domain.aggregates.system.FsscSystem;
|
|||
import com.chint.domain.value_object.UserLoginParam;
|
||||
import com.chint.infrastructure.constant.AuthMessageConstant;
|
||||
import com.chint.interfaces.rest.base.PostRequest;
|
||||
import com.chint.interfaces.rest.user.PushUser;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -71,6 +72,7 @@ public class User implements Serializable {
|
|||
this.employeeNo = employeeNo;
|
||||
}
|
||||
|
||||
|
||||
// public User addDeptInfo(){
|
||||
//
|
||||
// }
|
||||
|
@ -106,6 +108,8 @@ public class User implements Serializable {
|
|||
this.companyCode = companyCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public User addFssc(String CompanyName, String sysCode) {
|
||||
FsscSystem fsscSystem = new FsscSystem(CompanyName, sysCode);
|
||||
this.addFsscSystemToList(fsscSystem);
|
||||
|
@ -184,4 +188,9 @@ public class User implements Serializable {
|
|||
public String generateXNFsscUrlPath() {
|
||||
return XN_FSSC_REDIRECT_PATH_APPROVAL_ONE + employeeNo + FSSC_REDIRECT_PATH_APPROVAL_TWO;
|
||||
}
|
||||
|
||||
// public User startAddDept(){
|
||||
//
|
||||
//
|
||||
// }
|
||||
}
|
|
@ -33,4 +33,7 @@ public class UserDepartmentInfo implements Serializable {
|
|||
private String departmentCodeSeven;
|
||||
private String departmentNameSeven;
|
||||
private Integer ifPrimary;
|
||||
|
||||
// Builder static inner class
|
||||
|
||||
}
|
||||
|
|
|
@ -146,19 +146,24 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
|||
}
|
||||
|
||||
// 加载超标信息, 加载订单关联信息 , 加载订单状态 ,单号,创建时间等信息
|
||||
// 当测试环境没有行程规划单 , 只能去回传的差旅申请单
|
||||
String orderNo = getOrderNoForCTrip(cTripCarRecord.getRouteOrderNo());
|
||||
orderDetail.ifPresentOrElse(it -> {
|
||||
CarOrderDetail carOrderDetail = it.getCarOrderDetail();
|
||||
orderCarRecord.loadComplianceInfo(it)
|
||||
.loadRelatedOrderInfo(it.getOrderId(),
|
||||
cTripCarRecord.getRecordId(),
|
||||
byOrderNo.isPresent() ? byOrderNo.get().getApproveOrderNo().getActualOrderNo() : orderNo, //兼容测试环境和正式环境的数据
|
||||
carOrderDetail.getReceiptsNum(),
|
||||
carOrderDetail.getParentOrderNo(),
|
||||
carOrderDetail.getOriginalOrderNo())
|
||||
.loadBasicOrderInfo(carOrderDetail.getOrderNo(),
|
||||
carOrderDetail.getOrderStatus(),
|
||||
carOrderDetail.getCreateTime());
|
||||
}, () -> orderCarRecord.loadRelatedOrderInfo(cTripCarRecordBase.getOrderId(),
|
||||
}, () -> orderCarRecord.loadComplianceInfoNot()
|
||||
.loadRelatedOrderInfo(cTripCarRecordBase.getOrderId(),
|
||||
cTripCarRecord.getRecordId(),
|
||||
orderNo,
|
||||
cTripCarRecord.getRouteOrderNo(),
|
||||
String.valueOf(cTripCarRecordBase.getOrderId()),
|
||||
String.valueOf(cTripCarRecordBase.getOrderId()))
|
||||
|
@ -169,6 +174,19 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
|||
return orderCarRecord;
|
||||
}
|
||||
|
||||
|
||||
private String getOrderNoForCTrip(String inputOrderNo) {
|
||||
// 当测试环境没有行程规划单 , 只能去回传的差旅申请单
|
||||
String orderNo;
|
||||
if (inputOrderNo.contains("-")) {
|
||||
String[] split = inputOrderNo.split("-");
|
||||
orderNo = split[1];
|
||||
} else {
|
||||
orderNo = inputOrderNo;
|
||||
}
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderTrainRecord createTrainOrderRecord(Object orderTrainRecordData) {
|
||||
|
||||
|
@ -288,6 +306,7 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
|||
cTripFlightBaseInfo.getDept3());
|
||||
|
||||
// 加载关联票价原因
|
||||
String orderNo = getOrderNoForCTrip(cTripFlightRecord.getRouteOrderNo());
|
||||
orderDetail.ifPresentOrElse(it -> {
|
||||
FlightOrderDetail flightOrderDetail = it.getFlightOrderDetail();
|
||||
orderFlightRecord.loadComplianceInfo(it)
|
||||
|
@ -296,11 +315,14 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
|||
cTripFlightRecordBase.getCreateTime())
|
||||
.loadRelatedOrderInfo(cTripFlightRecordBase.getOrderId(),
|
||||
String.valueOf(cTripFlightRecordBase.getRecordId()),
|
||||
byOrderNo.isPresent() ? byOrderNo.get().getApproveOrderNo().getActualOrderNo() : orderNo, //兼容测试环境和正式环境的数据
|
||||
flightOrderDetail.getReceiptsNum(),
|
||||
flightOrderDetail.getParentOrderNo(),
|
||||
it.getOrderNo());
|
||||
}, () -> orderFlightRecord.loadRelatedOrderInfo(cTripFlightRecordBase.getOrderId(), //兼容测试环境没有申请单的情况
|
||||
}, () -> orderFlightRecord.loadComplianceInfoNot()
|
||||
.loadRelatedOrderInfo(cTripFlightRecordBase.getOrderId(), //兼容测试环境没有申请单的情况
|
||||
String.valueOf(cTripFlightRecordBase.getRecordId()),
|
||||
orderNo,
|
||||
cTripFlightBaseInfo.getJourneyID(),
|
||||
String.valueOf(cTripFlightRecordBase.getOrderId()),
|
||||
String.valueOf(cTripFlightRecordBase.getOrderId()))
|
||||
|
@ -372,12 +394,12 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
|||
// 加载房间和早餐信息 , 含早分数先为空
|
||||
String isAgreement;
|
||||
if (cTripHotelRecordBase.getOrderType().equals(4) || cTripHotelRecordBase.getOrderType().equals(6)) {
|
||||
isAgreement = "1";
|
||||
isAgreement = "是";
|
||||
} else {
|
||||
isAgreement = "0";
|
||||
isAgreement = "否";
|
||||
}
|
||||
orderHotelRecord.loadRoomAndBreakfastInfo("",
|
||||
Integer.parseInt(isAgreement),
|
||||
isAgreement,
|
||||
cTripHotelRecordBase.getQuantity(),
|
||||
cTripHotelRecordBase.getQuantity(),
|
||||
String.valueOf(cTripHotelRecordBase.getPrice()),
|
||||
|
@ -410,20 +432,23 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
|||
}
|
||||
orderHotelRecord.loadSourceInfo(sourceInfo);
|
||||
|
||||
|
||||
String orderNo = getOrderNoForCTrip(cTripHotelRecord.getRouteOrderNo());
|
||||
orderDetailOptional.ifPresentOrElse(it -> {
|
||||
orderHotelRecord.loadComplianceInfo(it); // 加载违规信息
|
||||
orderHotelRecord.loadComplianceInfo(Optional.of(it)); // 加载违规信息
|
||||
HotelOrderDetail hotelOrderDetail = it.getHotelOrderDetail();
|
||||
orderHotelRecord.loadOrderNoInfo(it.getOrderId(), // 加载订单关联号信息
|
||||
cTripHotelRecord.getRecordId(),
|
||||
byOrderNo.isPresent() ? byOrderNo.get().getApproveOrderNo().getActualOrderNo() : orderNo, //兼容测试环境和正式环境的数据
|
||||
hotelOrderDetail.getReceiptsNum(),
|
||||
hotelOrderDetail.getOrderNo(),
|
||||
hotelOrderDetail.getOrderNo());
|
||||
orderHotelRecord.loadBasicOrderInfo(hotelOrderDetail.getOrderNo(), // 加载基础订单信息
|
||||
hotelOrderDetail.getOrderStatus(),
|
||||
cTripHotelRecordBase.getCreateTime());
|
||||
}, () -> orderHotelRecord.loadOrderNoInfo(cTripHotelRecordBase.getOrderId(), //兼容测试环境不存在行程规划单的情况 // 加载订单关联号信息
|
||||
}, () -> orderHotelRecord.loadComplianceInfo(Optional.empty())
|
||||
.loadOrderNoInfo(cTripHotelRecordBase.getOrderId(), //兼容测试环境不存在行程规划单的情况 // 加载订单关联号信息
|
||||
cTripHotelRecord.getRecordId(),
|
||||
orderNo,
|
||||
cTripHotelRecord.getRouteOrderNo(),
|
||||
String.valueOf(cTripHotelRecordBase.getOrderId()),
|
||||
String.valueOf(cTripHotelRecordBase.getOrderId()))
|
||||
|
@ -432,8 +457,8 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
|||
cTripHotelRecordBase.getCreateTime()));
|
||||
|
||||
// 加载财务信息
|
||||
orderHotelRecord.loadFinancialInfo(cTripHotelRecordBase.getSubAccCheckBatchNo(),
|
||||
cTripHotelRecordBase.getBatchStartDate().substring(0, 6),
|
||||
orderHotelRecord.loadFinancialInfo(cTripHotelRecordBase.getBatchStartDate().substring(0, 6),
|
||||
cTripHotelRecordBase.getSubAccCheckBatchNo(),
|
||||
String.valueOf(cTripHotelRecordBase.getAmount()),
|
||||
"",
|
||||
cTripHotelRecordBase.getPaidAmount());
|
||||
|
@ -459,8 +484,8 @@ public class CTripOrderRecordExtensionFactory implements OrderRecordExtensionFac
|
|||
// 加载预订人和入住人信息
|
||||
orderHotelRecord.loadBookerAndGuestInfo(cTripHotelOrderDetail.getEmployeeID(),
|
||||
cTripHotelOrderDetail.getEmployeeName(),
|
||||
cTripHotelOrderDetail.getEmployeeID(),
|
||||
cTripHotelOrderDetail.getEmployeeName());
|
||||
cTripHotelOrderDetail.getEmployeeName(),
|
||||
cTripHotelOrderDetail.getEmployeeID());
|
||||
|
||||
// 加载组织架构
|
||||
orderHotelRecord.loadOrganizationalAndProjectInfo(cTripHotelOrderDetail.getDept1(),
|
||||
|
|
|
@ -168,7 +168,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
|||
.setOriginalOrderNo(lyOrderHotelRecord.getOriginOrderSerialNo())//原始订单号
|
||||
.setBrandGroup("") //酒店品牌集团
|
||||
.setBrandName("") //酒店品牌
|
||||
.setOverStandard("是".equals(lyOrderHotelRecord.getOverStandardStatus()) ? 1 : 0) //"是否违规(超标) 0否,1是"
|
||||
.setOverStandard("是".equals(lyOrderHotelRecord.getOverStandardStatus()) ? "1" : "0") //"是否违规(超标) 0否,1是"
|
||||
.setOverStandardReason(lyOrderHotelRecord.getViolationReason()) //违规原因(超标原因)
|
||||
.setReceiptsNum(lyOrderHotelRecord.getOutApplayOrderNo()) //关联申请单号
|
||||
.setUserName(lyOrderHotelRecord.getPassengerName()) //入住人姓名
|
||||
|
@ -181,7 +181,7 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
|
|||
.setHotelAddress(hotelOrderDetail.getHotelAddress()) //酒店地址
|
||||
.setHotelName(lyOrderHotelRecord.getHotelName()) //酒店名称
|
||||
.setIncludeAmount("") //含早情况:XX份
|
||||
.setIsAgreement("是".equals(hotelOrderDetail.getAgreementHotel()) ? 1 : 0) //是否协议酒店:0否1是
|
||||
.setIsAgreement("是".equals(hotelOrderDetail.getAgreementHotel()) ? "1" : "0") //是否协议酒店:0否1是
|
||||
.setPaymentType(getPaymentType(lyOrderHotelRecord.getPayType()))//"付款方式:0-公司统付 1-个人付 2-混付"
|
||||
.setOrderAmount(String.valueOf(lyOrderHotelRecord.getToBePayAmount())) //结算总额
|
||||
.setCompanyAmount(String.valueOf(lyOrderHotelRecord.getToBePayAmount())) //企业统付总额
|
||||
|
|
Loading…
Reference in New Issue