diff --git a/src/main/java/com/chint/application/in/OrderPublicController.java b/src/main/java/com/chint/application/in/OrderPublicController.java index 2195c3af..d20466ce 100644 --- a/src/main/java/com/chint/application/in/OrderPublicController.java +++ b/src/main/java/com/chint/application/in/OrderPublicController.java @@ -3,11 +3,15 @@ package com.chint.application.in; import com.chint.application.dtos.DeleteLegData; import com.chint.application.queryies.OrderQuery; import com.chint.application.services.OrderApplicationService; +import com.chint.domain.aggregates.order.RouteOrder; +import com.chint.domain.repository.RouteRepository; import com.chint.domain.service.LegDomainService; import com.chint.domain.service.OrderDomainService; import com.chint.domain.service.SystemDomainService; import com.chint.domain.value_object.ApprovalSimpleData; +import com.chint.domain.value_object.ApproveCustomField; import com.chint.domain.value_object.ApproveRouteData; +import com.chint.domain.value_object.OrderQueryData; import com.chint.infrastructure.util.Result; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -17,6 +21,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS; @RestController @@ -38,6 +44,9 @@ public class OrderPublicController { @Autowired private OrderDomainService orderDomainService; + @Autowired + private RouteRepository routeRepository; + @ApiOperation("提交审批行程规划单") @PostMapping("/approve") @@ -81,4 +90,16 @@ public class OrderPublicController { } + @ApiOperation("查询行程规划订单自定义字段") + @PostMapping("/query/custom/fields") + public Result> queryCustomFields(@RequestBody OrderQueryData queryData) { + RouteOrder routeOrder = routeRepository + .findByActualOrderNoAndSysCode(queryData.getActualOrderNo(), queryData.getSysCode()); + List approveCustomFieldList = routeOrder.getRouteCustomExtensionFieldList() + .stream() + .map(ApproveCustomField::of) + .toList(); + return Result.Success(SUCCESS, approveCustomFieldList); + } + } diff --git a/src/main/java/com/chint/application/out/OrderOutController.java b/src/main/java/com/chint/application/out/OrderOutController.java index 864bac9c..d275e3f9 100644 --- a/src/main/java/com/chint/application/out/OrderOutController.java +++ b/src/main/java/com/chint/application/out/OrderOutController.java @@ -115,17 +115,7 @@ public class OrderOutController { return Result.Success(SUCCESS, orderQuery.queryNotSubmit(queryData)); } - @ApiOperation("查询行程规划订单自定义字段") - @PostMapping("/query/custom/fields") - public Result> queryCustomFields(@RequestBody OrderQueryData queryData) { - RouteOrder routeOrder = routeRepository - .findByActualOrderNoAndSysCode(queryData.getActualOrderNo(), queryData.getSysCode()); - List approveCustomFieldList = routeOrder.getRouteCustomExtensionFieldList() - .stream() - .map(ApproveCustomField::of) - .toList(); - return Result.Success(SUCCESS, approveCustomFieldList); - } + @ApiOperation("查询能够同步的行程节点") diff --git a/src/test/java/com/chint/CTripTest.java b/src/test/java/com/chint/CTripTest.java index 5cd9e019..1419966e 100644 --- a/src/test/java/com/chint/CTripTest.java +++ b/src/test/java/com/chint/CTripTest.java @@ -246,7 +246,7 @@ public class CTripTest { @Test void search() { BaseContext.setCurrentUser(user); - SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("30386062604"); + SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("30701490985"); System.out.println(response); } diff --git a/src/test/java/com/chint/LYTest.java b/src/test/java/com/chint/LYTest.java index 17a9646a..21d2c416 100644 --- a/src/test/java/com/chint/LYTest.java +++ b/src/test/java/com/chint/LYTest.java @@ -822,9 +822,9 @@ public class LYTest { System.out.println(json); } -// @Test + @Test void searchTrain() { - TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24042571594139716"); + TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24032167485837934"); Gson gson = new Gson(); String json = gson.toJson(trainOrderDetail); System.out.println(json); diff --git a/src/test/java/com/chint/RouteApplicationTests.java b/src/test/java/com/chint/RouteApplicationTests.java index 3597c3a1..756939a3 100644 --- a/src/test/java/com/chint/RouteApplicationTests.java +++ b/src/test/java/com/chint/RouteApplicationTests.java @@ -289,7 +289,7 @@ class RouteApplicationTests { @Test void loginSignProd() { - String sfno = "240305077"; + String sfno = "220301581"; String syscode = "FSSC"; String billcode = "CLSQ240225000099"; String companycode = "正泰集团股份有限公司";