diff --git a/src/main/java/com/chint/manage/controller/ManageController.java b/src/main/java/com/chint/manage/controller/ManageController.java index 483ca333..3991a3ae 100644 --- a/src/main/java/com/chint/manage/controller/ManageController.java +++ b/src/main/java/com/chint/manage/controller/ManageController.java @@ -6,7 +6,7 @@ import com.chint.manage.entity.dto.OrderPageDto; import com.chint.manage.entity.excel.BaseExcel; import com.chint.manage.entity.excel.OrderExceedStandardExcel; import com.chint.manage.entity.query.ConsumptionDetailQuery; -import com.chint.manage.entity.query.OrderPageQuery; +import com.chint.manage.entity.query.ItineraryPageQuery; import com.chint.manage.entity.query.StandardQuery; import com.chint.manage.service.ManageService; import io.swagger.annotations.ApiOperation; @@ -36,14 +36,14 @@ public class ManageController { private ManageService manageService; - @ApiOperation("消费明细查询接口") - @PostMapping("/query") + @ApiOperation("消费明细分页查询接口") + @PostMapping("/consumption/pageQuery") public Result> query(@RequestBody ConsumptionDetailQuery dto){ return Result.Success(SUCCESS,manageService.pageConsumptionDetail(dto)); } @ApiOperation("消费明细导出接口") - @PostMapping("/export") + @PostMapping("/consumption/export") public ResponseEntity export(@RequestBody ConsumptionDetailQuery dto) { dto.setPageNum(1); dto.setPageSize(Integer.MAX_VALUE); @@ -60,8 +60,8 @@ public class ManageController { .body(resource); } - @ApiOperation("超标报表查询接口") - @PostMapping("/standard/query") + @ApiOperation("超标报表分页查询接口") + @PostMapping("/standard/pageQuery") public Result> standardQuery(@RequestBody StandardQuery dto){ return Result.Success(SUCCESS,manageService.standardQuery(dto)); } @@ -84,10 +84,19 @@ public class ManageController { .body(resource); } - @ApiOperation("行程单查询接口") - @PostMapping("/order/pageQuery") - public Result> orderPageQuery(@RequestBody OrderPageQuery dto){ + @ApiOperation("行程单分页查询接口") + @PostMapping("/itinerary/pageQuery") + public Result> orderPageQuery(@RequestBody ItineraryPageQuery dto){ return Result.Success(SUCCESS,manageService.orderPageQuery(dto)); } + + + @ApiOperation("订单分页查询接口") + @PostMapping("/order/pageQuery") + public Result orderPage(@RequestBody ItineraryPageQuery dto){ + //订单查询 order_detail 行程号改为申请单号 任务创建创建生成记录 异步生成 完成之后再开发下载 + return null; + } + } diff --git a/src/main/java/com/chint/manage/entity/query/OrderPageQuery.java b/src/main/java/com/chint/manage/entity/query/ItineraryPageQuery.java similarity index 85% rename from src/main/java/com/chint/manage/entity/query/OrderPageQuery.java rename to src/main/java/com/chint/manage/entity/query/ItineraryPageQuery.java index 319a9099..62e2ebc1 100644 --- a/src/main/java/com/chint/manage/entity/query/OrderPageQuery.java +++ b/src/main/java/com/chint/manage/entity/query/ItineraryPageQuery.java @@ -7,7 +7,7 @@ import java.util.ArrayList; import java.util.List; @Data -public class OrderPageQuery extends BaseQuery { +public class ItineraryPageQuery extends BaseQuery { private String applicant;// 申请人 private String actualOrderNo; //申请单号 private List userIds=new ArrayList<>(); diff --git a/src/main/java/com/chint/manage/mapper/JdbcConsumptionDetailRepository.java b/src/main/java/com/chint/manage/mapper/JdbcConsumptionDetailRepository.java index f93e1b2e..b70e6520 100644 --- a/src/main/java/com/chint/manage/mapper/JdbcConsumptionDetailRepository.java +++ b/src/main/java/com/chint/manage/mapper/JdbcConsumptionDetailRepository.java @@ -4,11 +4,11 @@ import com.chint.infrastructure.util.PageResult; import com.chint.manage.entity.dto.OrderPageDto; import com.chint.manage.entity.excel.BaseExcel; import com.chint.manage.entity.query.ConsumptionDetailQuery; -import com.chint.manage.entity.query.OrderPageQuery; +import com.chint.manage.entity.query.ItineraryPageQuery; import org.springframework.data.domain.Page; public interface JdbcConsumptionDetailRepository { - Page orderPageQueryByDto(OrderPageQuery dto); + Page orderPageQueryByDto(ItineraryPageQuery dto); PageResult pageConsumptionDetail(ConsumptionDetailQuery dto); } \ No newline at end of file diff --git a/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java b/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java index 9b2ef5b7..eafd47c6 100644 --- a/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java +++ b/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java @@ -4,7 +4,7 @@ import com.chint.domain.aggregates.order.*; import com.chint.infrastructure.util.PageResult; import com.chint.manage.entity.dto.OrderPageDto; import com.chint.manage.entity.query.ConsumptionDetailQuery; -import com.chint.manage.entity.query.OrderPageQuery; +import com.chint.manage.entity.query.ItineraryPageQuery; import com.chint.manage.entity.excel.*; import com.chint.manage.mapper.*; import org.springframework.beans.BeanUtils; @@ -44,7 +44,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai @Override - public Page orderPageQueryByDto(OrderPageQuery dto) { + public Page orderPageQueryByDto(ItineraryPageQuery dto) { String query = "SELECT * FROM route_order " + "WHERE 1 = 1 " + "AND (:actualOrderNo IS NULL OR actual_order_no = :actualOrderNo ) "; diff --git a/src/main/java/com/chint/manage/service/ManageService.java b/src/main/java/com/chint/manage/service/ManageService.java index e0489100..1247e18b 100644 --- a/src/main/java/com/chint/manage/service/ManageService.java +++ b/src/main/java/com/chint/manage/service/ManageService.java @@ -1,11 +1,9 @@ package com.chint.manage.service; -import com.chint.application.dtos.response.RouteOrderPageRes; import com.chint.infrastructure.util.PageResult; -import com.chint.infrastructure.util.Result; import com.chint.manage.entity.dto.OrderPageDto; import com.chint.manage.entity.query.ConsumptionDetailQuery; -import com.chint.manage.entity.query.OrderPageQuery; +import com.chint.manage.entity.query.ItineraryPageQuery; import com.chint.manage.entity.query.StandardQuery; import com.chint.manage.entity.excel.BaseExcel; import com.chint.manage.entity.excel.OrderExceedStandardExcel; @@ -27,5 +25,5 @@ public interface ManageService { File standardExport(StandardQuery dto); - PageResult orderPageQuery(OrderPageQuery dto); + PageResult orderPageQuery(ItineraryPageQuery dto); } diff --git a/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java b/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java index 07fa2787..6d48bb0e 100644 --- a/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java +++ b/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java @@ -9,13 +9,12 @@ import com.chint.domain.service.LegDomainService; import com.chint.infrastructure.repository.jdbc.JdbcRouteRepository; import com.chint.infrastructure.repository.jdbc.JdbcUserRepository; import com.chint.infrastructure.util.PageResult; -import com.chint.infrastructure.util.Result; import com.chint.manage.entity.OrderExceedStandard; import com.chint.manage.entity.dto.OrderPageDto; import com.chint.manage.entity.excel.BaseExcel; import com.chint.manage.entity.excel.OrderExceedStandardExcel; import com.chint.manage.entity.query.ConsumptionDetailQuery; -import com.chint.manage.entity.query.OrderPageQuery; +import com.chint.manage.entity.query.ItineraryPageQuery; import com.chint.manage.entity.query.StandardQuery; import com.chint.manage.mapper.JdbcOrderExceedStandardRepository; import com.chint.manage.mapper.impl.JdbcConsumptionDetailRepositoryImpl; @@ -34,8 +33,6 @@ import java.util.List; import java.util.Objects; import java.util.stream.Stream; -import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS; - /** * * @Author:nxj @@ -86,7 +83,7 @@ public class ManageServiceImpl implements ManageService { } @Override - public PageResult orderPageQuery(OrderPageQuery dto) { + public PageResult orderPageQuery(ItineraryPageQuery dto) { List users=jdbcUserRepository.findAllByNameContains(dto.getApplicant()); if (users==null||users.isEmpty()){ return null; diff --git a/src/test/java/com/chint/ManageTest.java b/src/test/java/com/chint/ManageTest.java index c1ec1bda..3c4c444b 100644 --- a/src/test/java/com/chint/ManageTest.java +++ b/src/test/java/com/chint/ManageTest.java @@ -7,7 +7,7 @@ import com.chint.manage.entity.OrderExceedStandard; import com.chint.manage.entity.dto.OrderPageDto; import com.chint.manage.entity.excel.BaseExcel; import com.chint.manage.entity.query.ConsumptionDetailQuery; -import com.chint.manage.entity.query.OrderPageQuery; +import com.chint.manage.entity.query.ItineraryPageQuery; import com.chint.manage.mapper.JdbcOrderExceedStandardRepository; import com.chint.manage.mapper.impl.JdbcConsumptionDetailRepositoryImpl; import com.chint.manage.service.ManageService; @@ -32,7 +32,7 @@ public class ManageTest { @Test void pageQuery(){ - OrderPageQuery dto=new OrderPageQuery(); + ItineraryPageQuery dto=new ItineraryPageQuery(); Page page= jdbcConsumptionDetailRepository.orderPageQueryByDto(dto); System.out.println(page); }