【update】修复超标报表公司无法模糊查询问题,去除用户名查询临时逻辑
This commit is contained in:
parent
874bc75247
commit
0817f897f6
|
@ -15,7 +15,7 @@ public class ANExceedStandardDto {
|
||||||
private String applicant;//申请人
|
private String applicant;//申请人
|
||||||
private String applyNo;//差旅申请单号
|
private String applyNo;//差旅申请单号
|
||||||
private String orderNo;//商旅订单号
|
private String orderNo;//商旅订单号
|
||||||
private String orderType;//超标原因
|
private String orderType;//超标类型
|
||||||
private String orderSource;//订单来源
|
private String orderSource;//订单来源
|
||||||
private String legNo;//行程ID
|
private String legNo;//行程ID
|
||||||
private String startPlace;//出发地
|
private String startPlace;//出发地
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class ManageOrderDetailRepositoryImpl implements ManageOrderDetailReposit
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dto.getCompanyName().isEmpty()) {
|
if (!dto.getCompanyName().isEmpty()) {
|
||||||
|
dto.setCompanyName(dto.getCompanyName()+"%");
|
||||||
query+="AND oes.company_name LIKE (:companyName) ";
|
query+="AND oes.company_name LIKE (:companyName) ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ public class ManageOrderDetailRepositoryImpl implements ManageOrderDetailReposit
|
||||||
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
PageRequest pageRequest = PageRequest
|
PageRequest pageRequest = PageRequest
|
||||||
.of(dto.getPageNum() - 1, dto.getPageSize(), Sort.by("id").descending());
|
.of(dto.getPageNum() - 1, dto.getPageSize(), Sort.by("order_date").descending());
|
||||||
params.put("actualOrderNo", dto.getActualOrderNo());
|
params.put("actualOrderNo", dto.getActualOrderNo());
|
||||||
params.put("applicant", dto.getApplicant());
|
params.put("applicant", dto.getApplicant());
|
||||||
params.put("companyName", dto.getCompanyName());
|
params.put("companyName", dto.getCompanyName());
|
||||||
|
|
|
@ -106,19 +106,6 @@ public class ManageServiceImpl implements ManageService {
|
||||||
}
|
}
|
||||||
dto.setCompanyCods(companyCods);
|
dto.setCompanyCods(companyCods);
|
||||||
Page<OrderExceedStandard> page=manageOrderDetailRepository.OrderExceedStandard(dto);
|
Page<OrderExceedStandard> page=manageOrderDetailRepository.OrderExceedStandard(dto);
|
||||||
List<OrderExceedStandard> content = page.getContent();
|
|
||||||
Set<String> employees=new HashSet<>();
|
|
||||||
for (OrderExceedStandard orderExceedStandard : content) {
|
|
||||||
employees.add(orderExceedStandard.getEmployeeNo());
|
|
||||||
}
|
|
||||||
List<UserBasic> allByEmployeeNoIn = userBasicRepository.
|
|
||||||
findAllByEmployeeNoIn(employees.stream().toList());
|
|
||||||
for (OrderExceedStandard orderExceedStandard : content) {
|
|
||||||
for (UserBasic userBasic : allByEmployeeNoIn) {
|
|
||||||
if(userBasic.getEmployeeNo().equals(orderExceedStandard.getEmployeeNo())){}
|
|
||||||
orderExceedStandard.setApplicant(userBasic.getName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
List<OrderExceedStandardExcel> excelList = getOrderExceedStandardExcels(page);
|
List<OrderExceedStandardExcel> excelList = getOrderExceedStandardExcels(page);
|
||||||
return PageResult.totalPageNum(page.getTotalElements(), excelList);
|
return PageResult.totalPageNum(page.getTotalElements(), excelList);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue