【update】后台管理模块接口路径修改

This commit is contained in:
nixj 2024-05-15 13:08:40 +08:00
parent d27131fc36
commit 830abc84d8
7 changed files with 29 additions and 25 deletions

View File

@ -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<PageResult<? extends BaseExcel>> query(@RequestBody ConsumptionDetailQuery dto){
return Result.Success(SUCCESS,manageService.pageConsumptionDetail(dto));
}
@ApiOperation("消费明细导出接口")
@PostMapping("/export")
@PostMapping("/consumption/export")
public ResponseEntity<Resource> 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<PageResult<OrderExceedStandardExcel>> 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<PageResult<OrderPageDto>> orderPageQuery(@RequestBody OrderPageQuery dto){
@ApiOperation("行程单分页查询接口")
@PostMapping("/itinerary/pageQuery")
public Result<PageResult<OrderPageDto>> 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;
}
}

View File

@ -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<String> userIds=new ArrayList<>();

View File

@ -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<OrderPageDto> orderPageQueryByDto(OrderPageQuery dto);
Page<OrderPageDto> orderPageQueryByDto(ItineraryPageQuery dto);
PageResult<? extends BaseExcel> pageConsumptionDetail(ConsumptionDetailQuery dto);
}

View File

@ -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<OrderPageDto> orderPageQueryByDto(OrderPageQuery dto) {
public Page<OrderPageDto> orderPageQueryByDto(ItineraryPageQuery dto) {
String query = "SELECT * FROM route_order " +
"WHERE 1 = 1 " +
"AND (:actualOrderNo IS NULL OR actual_order_no = :actualOrderNo ) ";

View File

@ -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<OrderPageDto> orderPageQuery(OrderPageQuery dto);
PageResult<OrderPageDto> orderPageQuery(ItineraryPageQuery dto);
}

View File

@ -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;
/**
*
* @Authornxj
@ -86,7 +83,7 @@ public class ManageServiceImpl implements ManageService {
}
@Override
public PageResult<OrderPageDto> orderPageQuery(OrderPageQuery dto) {
public PageResult<OrderPageDto> orderPageQuery(ItineraryPageQuery dto) {
List<User> users=jdbcUserRepository.findAllByNameContains(dto.getApplicant());
if (users==null||users.isEmpty()){
return null;

View File

@ -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<OrderPageDto> page= jdbcConsumptionDetailRepository.orderPageQueryByDto(dto);
System.out.println(page);
}