结算明细字段映射调整

This commit is contained in:
dengwc 2024-03-29 16:49:18 +08:00
parent 7b94273155
commit 73f747fca9
2 changed files with 49 additions and 27 deletions

View File

@ -131,6 +131,11 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
.setBookOrgCode2(lyOrderFlightRecord.getPassengerDepartment()) //出行人组织架构信息2
.setBookOrgCode3(lyOrderFlightRecord.getPassengerDepartment()) //出行人组织架构信息3
.setOfflineCcomyCode(lyOrderFlightRecord.getPassengerCostCenter()) //成本中心
/* .setOrderStatus() //结算状态
.setExpenseOrderAmount() //订单金额
.setSettleOrderFlag() //订单对账状态
.setPayAmount() //支付金额
*/
;
}
@ -187,6 +192,11 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
.setBookOrgCode2("") //入住人组织架构信息2
.setBookOrgCode3("") //入住人组织架构信息3
.setOfflineCcomyCode(lyOrderHotelRecord.getPassengerCostCenter()) //成本中心
/* .setOrderStatus() //结算状态
.setExpenseOrderAmount() //订单金额
.setSettleOrderFlag() //订单对账状态
.setPayAmount() //支付金额
*/
;
}
@ -234,14 +244,20 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
.setBookOrgCode2("")//出行人组织架构信息2
.setBookOrgCode3("")//出行人组织架构信息3
.setOfflineCcomyCode(lyOrderTrainRecord.getPassengerCostCenter())//成本中心
.setTravelUserBirthday("")//生日
/* .setOrderStatus() //结算状态
.setExpenseOrderAmount() //订单金额
.setSettleOrderFlag() //订单对账状态
.setPayAmount() //支付金额
*/
/* .setTravelUserBirthday("")//生日
.setTravelUserPhone("") //出行人手机号
.setTravelUserSex("")//"性别0保密不展示 1男 2女"
.setTravelUserType("") //"乘客类型:成人(ADULT) 儿童(CHILDREN) 婴儿(BABY)"
.setPassportNo("")//乘客证件号
.setPassportType("")//乘客证件类型
.setTrainTime("")//发车时间 yyyy - MM - dd HH:mm:ss
.setYxId("")//影像比对ID
.setYxId("")//影像比对ID*/
;
}
@ -288,9 +304,10 @@ public class LyOrderRecordExtensionFactory implements OrderRecordExtensionFactor
.setPaymentType(String.valueOf(getPaymentType(lyOrderCarRecord.getPayType()))) //"付款方式0公司统付 1个人付 2混付"
.setOfflineCcomyCode(lyOrderCarRecord.getPassengerDepartment()) //成本中心
.setOrderSource(lyOrderCarRecord.getBookingPlat()) //预订来源线上/线下
// .setORDER_AMOUNT() //订单金额
// .setSETTLE_ORDER_FLAG() //订单对账状态
// .setpayAmount()// 支付金额
/* .setExpenseOrderAmount() //订单金额
.setSettleOrderFlag() //订单对账状态
.setPayAmount()// 支付金额*/
;
}

View File

@ -66,31 +66,36 @@ public class EventManager implements ApplicationContextAware, BeanNameAware, Ini
}
}
private void scanAndRegister(Object bean) {
Method[] methods = null;
//判断是何种类型的代理,使得动态代理的自定义注解不会失效
if (AopUtils.isJdkDynamicProxy(bean)) {
Object singletonTarget = AopProxyUtils.getSingletonTarget(bean);
if (singletonTarget != null) {
methods = singletonTarget.getClass().getDeclaredMethods();
Method[] methods = getTargetClassMethods(bean);
processAnnotation(methods, bean);
}
private Method[] getTargetClassMethods(Object bean) {
//判断是何种类型的代理,获取动态代理后的原类的自定义注解使其不会失效
if (AopUtils.isCglibProxy(bean)) {
return bean.getClass().getSuperclass().getDeclaredMethods();
} else if (AopUtils.isJdkDynamicProxy(bean)) {
Object target = AopProxyUtils.getSingletonTarget(bean);
if (target != null) {
return target.getClass().getDeclaredMethods();
}
} else if (AopUtils.isCglibProxy(bean)) {
methods = bean.getClass().getSuperclass().getDeclaredMethods();
} else {
methods = bean.getClass().getDeclaredMethods();
}
if (methods != null) {
for (Method method : methods) {
if (method.isAnnotationPresent(ListenTo.class)) {
ListenTo listenTo = method.getAnnotation(ListenTo.class);
MethodContainer container = new MethodContainer(bean, listenTo.order(), method);
listenerMethods.computeIfAbsent(listenTo.command(), k -> new ArrayList<>()).add(container);
}
if (method.isAnnotationPresent(TransitionTo.class)) {
TransitionTo transitionTo = method.getAnnotation(TransitionTo.class);
MethodContainer container = new MethodContainer(bean, transitionTo.order(), method);
transitionMethods.computeIfAbsent(transitionTo.command(), k -> new ArrayList<>()).add(container);
}
return bean.getClass().getDeclaredMethods();
}
private void processAnnotation(Method[] methods, Object bean) {
for (Method method : methods) {
if (method.isAnnotationPresent(ListenTo.class)) {
ListenTo listenTo = method.getAnnotation(ListenTo.class);
MethodContainer container = new MethodContainer(bean, listenTo.order(), method);
listenerMethods.computeIfAbsent(listenTo.command(), k -> new ArrayList<>()).add(container);
}
if (method.isAnnotationPresent(TransitionTo.class)) {
TransitionTo transitionTo = method.getAnnotation(TransitionTo.class);
MethodContainer container = new MethodContainer(bean, transitionTo.order(), method);
transitionMethods.computeIfAbsent(transitionTo.command(), k -> new ArrayList<>()).add(container);
}
}
}