【update】修复超标报表公司无法模糊查询问题,去除用户名查询临时逻辑

This commit is contained in:
nixj 2024-07-02 14:05:42 +08:00
parent 874bc75247
commit 0817f897f6
3 changed files with 3 additions and 15 deletions

View File

@ -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;//出发地

View File

@ -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());

View File

@ -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);
} }