跳转自定义字段查询接口

This commit is contained in:
lulz1 2024-04-28 15:49:03 +08:00
parent 850e55ff52
commit 4c7e132354
5 changed files with 26 additions and 15 deletions

View File

@ -3,11 +3,15 @@ package com.chint.application.in;
import com.chint.application.dtos.DeleteLegData; import com.chint.application.dtos.DeleteLegData;
import com.chint.application.queryies.OrderQuery; import com.chint.application.queryies.OrderQuery;
import com.chint.application.services.OrderApplicationService; 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.LegDomainService;
import com.chint.domain.service.OrderDomainService; import com.chint.domain.service.OrderDomainService;
import com.chint.domain.service.SystemDomainService; import com.chint.domain.service.SystemDomainService;
import com.chint.domain.value_object.ApprovalSimpleData; 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.ApproveRouteData;
import com.chint.domain.value_object.OrderQueryData;
import com.chint.infrastructure.util.Result; import com.chint.infrastructure.util.Result;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS; import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS;
@RestController @RestController
@ -38,6 +44,9 @@ public class OrderPublicController {
@Autowired @Autowired
private OrderDomainService orderDomainService; private OrderDomainService orderDomainService;
@Autowired
private RouteRepository routeRepository;
@ApiOperation("提交审批行程规划单") @ApiOperation("提交审批行程规划单")
@PostMapping("/approve") @PostMapping("/approve")
@ -81,4 +90,16 @@ public class OrderPublicController {
} }
@ApiOperation("查询行程规划订单自定义字段")
@PostMapping("/query/custom/fields")
public Result<List<ApproveCustomField>> queryCustomFields(@RequestBody OrderQueryData queryData) {
RouteOrder routeOrder = routeRepository
.findByActualOrderNoAndSysCode(queryData.getActualOrderNo(), queryData.getSysCode());
List<ApproveCustomField> approveCustomFieldList = routeOrder.getRouteCustomExtensionFieldList()
.stream()
.map(ApproveCustomField::of)
.toList();
return Result.Success(SUCCESS, approveCustomFieldList);
}
} }

View File

@ -115,17 +115,7 @@ public class OrderOutController {
return Result.Success(SUCCESS, orderQuery.queryNotSubmit(queryData)); return Result.Success(SUCCESS, orderQuery.queryNotSubmit(queryData));
} }
@ApiOperation("查询行程规划订单自定义字段")
@PostMapping("/query/custom/fields")
public Result<List<ApproveCustomField>> queryCustomFields(@RequestBody OrderQueryData queryData) {
RouteOrder routeOrder = routeRepository
.findByActualOrderNoAndSysCode(queryData.getActualOrderNo(), queryData.getSysCode());
List<ApproveCustomField> approveCustomFieldList = routeOrder.getRouteCustomExtensionFieldList()
.stream()
.map(ApproveCustomField::of)
.toList();
return Result.Success(SUCCESS, approveCustomFieldList);
}
@ApiOperation("查询能够同步的行程节点") @ApiOperation("查询能够同步的行程节点")

View File

@ -246,7 +246,7 @@ public class CTripTest {
@Test @Test
void search() { void search() {
BaseContext.setCurrentUser(user); BaseContext.setCurrentUser(user);
SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("30386062604"); SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("30701490985");
System.out.println(response); System.out.println(response);
} }

View File

@ -822,9 +822,9 @@ public class LYTest {
System.out.println(json); System.out.println(json);
} }
// @Test @Test
void searchTrain() { void searchTrain() {
TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24042571594139716"); TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24032167485837934");
Gson gson = new Gson(); Gson gson = new Gson();
String json = gson.toJson(trainOrderDetail); String json = gson.toJson(trainOrderDetail);
System.out.println(json); System.out.println(json);

View File

@ -289,7 +289,7 @@ class RouteApplicationTests {
@Test @Test
void loginSignProd() { void loginSignProd() {
String sfno = "240305077"; String sfno = "220301581";
String syscode = "FSSC"; String syscode = "FSSC";
String billcode = "CLSQ240225000099"; String billcode = "CLSQ240225000099";
String companycode = "正泰集团股份有限公司"; String companycode = "正泰集团股份有限公司";