【update】后台管理模块接口路径修改
This commit is contained in:
parent
d27131fc36
commit
830abc84d8
|
@ -6,7 +6,7 @@ import com.chint.manage.entity.dto.OrderPageDto;
|
||||||
import com.chint.manage.entity.excel.BaseExcel;
|
import com.chint.manage.entity.excel.BaseExcel;
|
||||||
import com.chint.manage.entity.excel.OrderExceedStandardExcel;
|
import com.chint.manage.entity.excel.OrderExceedStandardExcel;
|
||||||
import com.chint.manage.entity.query.ConsumptionDetailQuery;
|
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.query.StandardQuery;
|
||||||
import com.chint.manage.service.ManageService;
|
import com.chint.manage.service.ManageService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
@ -36,14 +36,14 @@ public class ManageController {
|
||||||
private ManageService manageService;
|
private ManageService manageService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("消费明细查询接口")
|
@ApiOperation("消费明细分页查询接口")
|
||||||
@PostMapping("/query")
|
@PostMapping("/consumption/pageQuery")
|
||||||
public Result<PageResult<? extends BaseExcel>> query(@RequestBody ConsumptionDetailQuery dto){
|
public Result<PageResult<? extends BaseExcel>> query(@RequestBody ConsumptionDetailQuery dto){
|
||||||
return Result.Success(SUCCESS,manageService.pageConsumptionDetail(dto));
|
return Result.Success(SUCCESS,manageService.pageConsumptionDetail(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("消费明细导出接口")
|
@ApiOperation("消费明细导出接口")
|
||||||
@PostMapping("/export")
|
@PostMapping("/consumption/export")
|
||||||
public ResponseEntity<Resource> export(@RequestBody ConsumptionDetailQuery dto) {
|
public ResponseEntity<Resource> export(@RequestBody ConsumptionDetailQuery dto) {
|
||||||
dto.setPageNum(1);
|
dto.setPageNum(1);
|
||||||
dto.setPageSize(Integer.MAX_VALUE);
|
dto.setPageSize(Integer.MAX_VALUE);
|
||||||
|
@ -60,8 +60,8 @@ public class ManageController {
|
||||||
.body(resource);
|
.body(resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("超标报表查询接口")
|
@ApiOperation("超标报表分页查询接口")
|
||||||
@PostMapping("/standard/query")
|
@PostMapping("/standard/pageQuery")
|
||||||
public Result<PageResult<OrderExceedStandardExcel>> standardQuery(@RequestBody StandardQuery dto){
|
public Result<PageResult<OrderExceedStandardExcel>> standardQuery(@RequestBody StandardQuery dto){
|
||||||
return Result.Success(SUCCESS,manageService.standardQuery(dto));
|
return Result.Success(SUCCESS,manageService.standardQuery(dto));
|
||||||
}
|
}
|
||||||
|
@ -84,10 +84,19 @@ public class ManageController {
|
||||||
.body(resource);
|
.body(resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("行程单查询接口")
|
@ApiOperation("行程单分页查询接口")
|
||||||
@PostMapping("/order/pageQuery")
|
@PostMapping("/itinerary/pageQuery")
|
||||||
public Result<PageResult<OrderPageDto>> orderPageQuery(@RequestBody OrderPageQuery dto){
|
public Result<PageResult<OrderPageDto>> orderPageQuery(@RequestBody ItineraryPageQuery dto){
|
||||||
return Result.Success(SUCCESS,manageService.orderPageQuery(dto));
|
return Result.Success(SUCCESS,manageService.orderPageQuery(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("订单分页查询接口")
|
||||||
|
@PostMapping("/order/pageQuery")
|
||||||
|
public Result<?> orderPage(@RequestBody ItineraryPageQuery dto){
|
||||||
|
//订单查询 order_detail 行程号改为申请单号 任务创建创建生成记录 异步生成 完成之后再开发下载
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class OrderPageQuery extends BaseQuery {
|
public class ItineraryPageQuery extends BaseQuery {
|
||||||
private String applicant;// 申请人
|
private String applicant;// 申请人
|
||||||
private String actualOrderNo; //申请单号
|
private String actualOrderNo; //申请单号
|
||||||
private List<String> userIds=new ArrayList<>();
|
private List<String> userIds=new ArrayList<>();
|
|
@ -4,11 +4,11 @@ import com.chint.infrastructure.util.PageResult;
|
||||||
import com.chint.manage.entity.dto.OrderPageDto;
|
import com.chint.manage.entity.dto.OrderPageDto;
|
||||||
import com.chint.manage.entity.excel.BaseExcel;
|
import com.chint.manage.entity.excel.BaseExcel;
|
||||||
import com.chint.manage.entity.query.ConsumptionDetailQuery;
|
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;
|
import org.springframework.data.domain.Page;
|
||||||
|
|
||||||
public interface JdbcConsumptionDetailRepository {
|
public interface JdbcConsumptionDetailRepository {
|
||||||
Page<OrderPageDto> orderPageQueryByDto(OrderPageQuery dto);
|
Page<OrderPageDto> orderPageQueryByDto(ItineraryPageQuery dto);
|
||||||
|
|
||||||
PageResult<? extends BaseExcel> pageConsumptionDetail(ConsumptionDetailQuery dto);
|
PageResult<? extends BaseExcel> pageConsumptionDetail(ConsumptionDetailQuery dto);
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@ import com.chint.domain.aggregates.order.*;
|
||||||
import com.chint.infrastructure.util.PageResult;
|
import com.chint.infrastructure.util.PageResult;
|
||||||
import com.chint.manage.entity.dto.OrderPageDto;
|
import com.chint.manage.entity.dto.OrderPageDto;
|
||||||
import com.chint.manage.entity.query.ConsumptionDetailQuery;
|
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.entity.excel.*;
|
||||||
import com.chint.manage.mapper.*;
|
import com.chint.manage.mapper.*;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
@ -44,7 +44,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<OrderPageDto> orderPageQueryByDto(OrderPageQuery dto) {
|
public Page<OrderPageDto> orderPageQueryByDto(ItineraryPageQuery dto) {
|
||||||
String query = "SELECT * FROM route_order " +
|
String query = "SELECT * FROM route_order " +
|
||||||
"WHERE 1 = 1 " +
|
"WHERE 1 = 1 " +
|
||||||
"AND (:actualOrderNo IS NULL OR actual_order_no = :actualOrderNo ) ";
|
"AND (:actualOrderNo IS NULL OR actual_order_no = :actualOrderNo ) ";
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
package com.chint.manage.service;
|
package com.chint.manage.service;
|
||||||
|
|
||||||
import com.chint.application.dtos.response.RouteOrderPageRes;
|
|
||||||
import com.chint.infrastructure.util.PageResult;
|
import com.chint.infrastructure.util.PageResult;
|
||||||
import com.chint.infrastructure.util.Result;
|
|
||||||
import com.chint.manage.entity.dto.OrderPageDto;
|
import com.chint.manage.entity.dto.OrderPageDto;
|
||||||
import com.chint.manage.entity.query.ConsumptionDetailQuery;
|
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.query.StandardQuery;
|
||||||
import com.chint.manage.entity.excel.BaseExcel;
|
import com.chint.manage.entity.excel.BaseExcel;
|
||||||
import com.chint.manage.entity.excel.OrderExceedStandardExcel;
|
import com.chint.manage.entity.excel.OrderExceedStandardExcel;
|
||||||
|
@ -27,5 +25,5 @@ public interface ManageService {
|
||||||
|
|
||||||
File standardExport(StandardQuery dto);
|
File standardExport(StandardQuery dto);
|
||||||
|
|
||||||
PageResult<OrderPageDto> orderPageQuery(OrderPageQuery dto);
|
PageResult<OrderPageDto> orderPageQuery(ItineraryPageQuery dto);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,12 @@ import com.chint.domain.service.LegDomainService;
|
||||||
import com.chint.infrastructure.repository.jdbc.JdbcRouteRepository;
|
import com.chint.infrastructure.repository.jdbc.JdbcRouteRepository;
|
||||||
import com.chint.infrastructure.repository.jdbc.JdbcUserRepository;
|
import com.chint.infrastructure.repository.jdbc.JdbcUserRepository;
|
||||||
import com.chint.infrastructure.util.PageResult;
|
import com.chint.infrastructure.util.PageResult;
|
||||||
import com.chint.infrastructure.util.Result;
|
|
||||||
import com.chint.manage.entity.OrderExceedStandard;
|
import com.chint.manage.entity.OrderExceedStandard;
|
||||||
import com.chint.manage.entity.dto.OrderPageDto;
|
import com.chint.manage.entity.dto.OrderPageDto;
|
||||||
import com.chint.manage.entity.excel.BaseExcel;
|
import com.chint.manage.entity.excel.BaseExcel;
|
||||||
import com.chint.manage.entity.excel.OrderExceedStandardExcel;
|
import com.chint.manage.entity.excel.OrderExceedStandardExcel;
|
||||||
import com.chint.manage.entity.query.ConsumptionDetailQuery;
|
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.query.StandardQuery;
|
||||||
import com.chint.manage.mapper.JdbcOrderExceedStandardRepository;
|
import com.chint.manage.mapper.JdbcOrderExceedStandardRepository;
|
||||||
import com.chint.manage.mapper.impl.JdbcConsumptionDetailRepositoryImpl;
|
import com.chint.manage.mapper.impl.JdbcConsumptionDetailRepositoryImpl;
|
||||||
|
@ -34,8 +33,6 @@ import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static com.chint.infrastructure.constant.CommonMessageConstant.SUCCESS;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @Author:nxj
|
* @Author:nxj
|
||||||
|
@ -86,7 +83,7 @@ public class ManageServiceImpl implements ManageService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<OrderPageDto> orderPageQuery(OrderPageQuery dto) {
|
public PageResult<OrderPageDto> orderPageQuery(ItineraryPageQuery dto) {
|
||||||
List<User> users=jdbcUserRepository.findAllByNameContains(dto.getApplicant());
|
List<User> users=jdbcUserRepository.findAllByNameContains(dto.getApplicant());
|
||||||
if (users==null||users.isEmpty()){
|
if (users==null||users.isEmpty()){
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.chint.manage.entity.OrderExceedStandard;
|
||||||
import com.chint.manage.entity.dto.OrderPageDto;
|
import com.chint.manage.entity.dto.OrderPageDto;
|
||||||
import com.chint.manage.entity.excel.BaseExcel;
|
import com.chint.manage.entity.excel.BaseExcel;
|
||||||
import com.chint.manage.entity.query.ConsumptionDetailQuery;
|
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.JdbcOrderExceedStandardRepository;
|
||||||
import com.chint.manage.mapper.impl.JdbcConsumptionDetailRepositoryImpl;
|
import com.chint.manage.mapper.impl.JdbcConsumptionDetailRepositoryImpl;
|
||||||
import com.chint.manage.service.ManageService;
|
import com.chint.manage.service.ManageService;
|
||||||
|
@ -32,7 +32,7 @@ public class ManageTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void pageQuery(){
|
void pageQuery(){
|
||||||
OrderPageQuery dto=new OrderPageQuery();
|
ItineraryPageQuery dto=new ItineraryPageQuery();
|
||||||
Page<OrderPageDto> page= jdbcConsumptionDetailRepository.orderPageQueryByDto(dto);
|
Page<OrderPageDto> page= jdbcConsumptionDetailRepository.orderPageQueryByDto(dto);
|
||||||
System.out.println(page);
|
System.out.println(page);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue