取消同程订单接口

This commit is contained in:
dengwc 2024-02-21 10:45:15 +08:00
parent 23ceb54308
commit b94b42c1f3
2 changed files with 8 additions and 5 deletions

View File

@ -35,10 +35,10 @@ public class LYOrderSyncAdapter implements SupplierOrderSync {
//1.设置订单参数
SupplierOrderParam param = new SupplierOrderParam();//参数
param.setOutEmployeeIdType(0);//外部员工ID类型默认为0
// param.setOutTravelApplyNo(order.getApproveOrderNo().getActualOrderNo());//审批订单号
// param.setOutTravelApplyNo(order.getApproveOrderNo().getActualOrderNo());//审批订单号
param.setOutTravelApplyNo(order.getRouteOrderNo());//审批订单号
param.setTravelApplyType(1); //差旅类型1 普通差旅,2 福利差旅
param.setStatus(1);//状态1通过2作废
param.setStatus(order.getStatus());//状态1通过2作废
//日期格式化
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
String applyTime = order.getCreateTime().format(formatter);
@ -83,7 +83,10 @@ public class LYOrderSyncAdapter implements SupplierOrderSync {
@Override
public boolean cancelSyncSupplierOrder(RouteOrder order) {
return false;
//作废状态2
order.setStatus(2);
System.out.println("开始取消同程订单");
return syncSupplierOrder(order);
}
//同程Leg集合解析

View File

@ -40,7 +40,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
return Optional.of(
OrderLegData.builder()
.productType(LEG_TYPE_TRAIN)
.orderNo(data.getOrderInfo().getOrderSerialNo())
.outOrderNo(data.getOrderInfo().getOrderSerialNo())
.price(String.valueOf( data.getOrderInfo().getTotalPrice()))
.actualOrderNo(data.getOrderInfo().getOrderSerialNo())
.supplierName(SUPPLIER_L_Y)
@ -53,7 +53,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
return Optional.of(
OrderLegData.builder()
.productType(LEG_TYPE_TRAIN)
.orderNo(data.getOrderNo())
.outOrderNo(data.getOrderNo())
.price(String.valueOf( data.getTotalAmount()))
.actualOrderNo(data.getOutOrderNo())
.supplierName(SUPPLIER_L_Y)