diff --git a/src/main/java/com/chint/domain/service/order_sync/LYOrderSyncAdapter.java b/src/main/java/com/chint/domain/service/order_sync/LYOrderSyncAdapter.java index e4cfa2ce..388b022e 100644 --- a/src/main/java/com/chint/domain/service/order_sync/LYOrderSyncAdapter.java +++ b/src/main/java/com/chint/domain/service/order_sync/LYOrderSyncAdapter.java @@ -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集合解析 diff --git a/src/main/java/com/chint/domain/service/supplier/LYOrderDataAdapter.java b/src/main/java/com/chint/domain/service/supplier/LYOrderDataAdapter.java index 15c61796..a7f6d790 100644 --- a/src/main/java/com/chint/domain/service/supplier/LYOrderDataAdapter.java +++ b/src/main/java/com/chint/domain/service/supplier/LYOrderDataAdapter.java @@ -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)