From c62440c4e661f98d796385917afc637ebbaea97a Mon Sep 17 00:00:00 2001 From: lulz1 Date: Wed, 29 May 2024 15:40:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=AB=98=E5=BE=B7=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=AD=A5=E5=B7=AE=E6=97=85=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=8D=95=E5=A2=9E=E5=8A=A0=E5=85=A5=E8=B4=A6=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order_detail/AmapOrderExtensionFactoryImpl.java | 8 ++++++++ .../domain/service/order_sync/AmapOrderSyncAdapter.java | 4 ++++ src/test/java/com/chint/LYTest.java | 2 +- src/test/java/com/chint/RouteApplicationTests.java | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/chint/domain/factoriy/order_detail/AmapOrderExtensionFactoryImpl.java b/src/main/java/com/chint/domain/factoriy/order_detail/AmapOrderExtensionFactoryImpl.java index 4f84082d..d23d0dc4 100644 --- a/src/main/java/com/chint/domain/factoriy/order_detail/AmapOrderExtensionFactoryImpl.java +++ b/src/main/java/com/chint/domain/factoriy/order_detail/AmapOrderExtensionFactoryImpl.java @@ -129,6 +129,14 @@ public class AmapOrderExtensionFactoryImpl implements OrderExtensionFactory { carOrderDetail.setPhone(data.getMobile()); } + //补充用车明细如果是取消,补充开始时间和结束时间为创建时间 + if (carOrderDetail.getStartTime() == null) { + carOrderDetail.setStartTime(carOrderDetail.getCreateTime()); + } + if (carOrderDetail.getArriveTime() == null) { + carOrderDetail.setArriveTime(carOrderDetail.getCreateTime()); + } + return carOrderDetail; } diff --git a/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java b/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java index 08f38cdd..ce47bfe3 100644 --- a/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java +++ b/src/main/java/com/chint/domain/service/order_sync/AmapOrderSyncAdapter.java @@ -105,6 +105,8 @@ public class AmapOrderSyncAdapter implements SupplierOrderSync { + routeRequestFields.getSysCode() + "-" + routeRequestFields.getActualOrderNo()); dto.setApplyEUserId(routeRequestFields.getUserId()); + dto.setDepartmentId(routeRequestFields.getAccountCompanyCode()); + dto.setDepartmentName(routeRequestFields.getAccountCompanyName()); User user = userRepository.findByUserEmployeeNo(routeRequestFields.getUserId()); dto.setApplyMobile(user.getPhoneNumber()); dto.setApplyName(user.getName()); @@ -147,6 +149,8 @@ public class AmapOrderSyncAdapter implements SupplierOrderSync { dto.setProcessContent(gson.toJson(processContent)); dto.setStatus("1"); + + Optional supplier = supplierRepository.findBySupplierName(SUPPLIER_AMAP); supplier.flatMap(Supplier::carSupplierProduct).ifPresent(carSupplierProduct -> { if (carSupplierProduct.getSupplierProductStandardLevelList() diff --git a/src/test/java/com/chint/LYTest.java b/src/test/java/com/chint/LYTest.java index e940b9bf..3a9cb16d 100644 --- a/src/test/java/com/chint/LYTest.java +++ b/src/test/java/com/chint/LYTest.java @@ -828,7 +828,7 @@ public class LYTest { @Test void searchHotel() { - HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail("HO20240523153100458921"); + HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail("HO20240414144500947464"); Gson gson = new Gson(); String json = gson.toJson(hotelOrderDetail); System.out.println(json); diff --git a/src/test/java/com/chint/RouteApplicationTests.java b/src/test/java/com/chint/RouteApplicationTests.java index ac8886a0..18600a63 100644 --- a/src/test/java/com/chint/RouteApplicationTests.java +++ b/src/test/java/com/chint/RouteApplicationTests.java @@ -299,7 +299,7 @@ class RouteApplicationTests { @Test void loginSign() { - String sfno = "030710001"; + String sfno = "231114011"; String syscode = "FSSC"; String billcode = "CLSQ240225000099"; String companycode = "正泰集团股份有限公司";