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 29148b91..129a723a 100644 --- a/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java +++ b/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java @@ -54,6 +54,9 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai } Map params = new HashMap<>(); + if (dto.getActualOrderNo()!=null&&dto.getActualOrderNo().isEmpty()){ + dto.setActualOrderNo(null); + } params.put("actualOrderNo", dto.getActualOrderNo()); params.put("userIds", dto.getUserIds()); PageRequest pageRequest = PageRequest 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 98f1de08..8b645400 100644 --- a/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java +++ b/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java @@ -89,9 +89,12 @@ public class ManageServiceImpl implements ManageService { @Override public PageResult itineraryPageQuery(ItineraryPageQuery dto) { - List users=jdbcUserRepository.findAllByNameContains(dto.getApplicant()); - if (users==null||users.isEmpty()){ - return null; + List users=new ArrayList<>(); + if (dto.getApplicant()!=null&&!dto.getApplicant().isEmpty()){ + users=jdbcUserRepository.findAllByNameContains(dto.getApplicant()); + if (users==null||users.isEmpty()){ + return null; + } } dto.setUserIds(users.stream().map(User::getEmployeeNo).toList()); Page page= jdbcConsumptionDetailRepository.itineraryPageQueryByDto(dto);