From b94b42c1f3e89e8c0bb28926f155b2641042e8f6 Mon Sep 17 00:00:00 2001 From: dengwc Date: Wed, 21 Feb 2024 10:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=90=8C=E7=A8=8B=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/service/order_sync/LYOrderSyncAdapter.java | 9 ++++++--- .../domain/service/supplier/LYOrderDataAdapter.java | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) 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)