【fix】更改行程单查询接口为null为空时的判断逻辑

This commit is contained in:
nixj 2024-05-27 09:56:15 +08:00
parent 428990b6e8
commit 21470758cf
2 changed files with 9 additions and 3 deletions

View File

@ -54,6 +54,9 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
}
Map<String, Object> 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

View File

@ -89,10 +89,13 @@ public class ManageServiceImpl implements ManageService {
@Override
public PageResult<ItineraryPageDto> itineraryPageQuery(ItineraryPageQuery dto) {
List<User> users=jdbcUserRepository.findAllByNameContains(dto.getApplicant());
List<User> 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<ItineraryPageDto> page= jdbcConsumptionDetailRepository.itineraryPageQueryByDto(dto);
//处理信息