【fix】更改行程单查询接口为null为空时的判断逻辑
This commit is contained in:
parent
428990b6e8
commit
21470758cf
|
@ -54,6 +54,9 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
if (dto.getActualOrderNo()!=null&&dto.getActualOrderNo().isEmpty()){
|
||||||
|
dto.setActualOrderNo(null);
|
||||||
|
}
|
||||||
params.put("actualOrderNo", dto.getActualOrderNo());
|
params.put("actualOrderNo", dto.getActualOrderNo());
|
||||||
params.put("userIds", dto.getUserIds());
|
params.put("userIds", dto.getUserIds());
|
||||||
PageRequest pageRequest = PageRequest
|
PageRequest pageRequest = PageRequest
|
||||||
|
|
|
@ -89,9 +89,12 @@ public class ManageServiceImpl implements ManageService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<ItineraryPageDto> itineraryPageQuery(ItineraryPageQuery dto) {
|
public PageResult<ItineraryPageDto> itineraryPageQuery(ItineraryPageQuery dto) {
|
||||||
List<User> users=jdbcUserRepository.findAllByNameContains(dto.getApplicant());
|
List<User> users=new ArrayList<>();
|
||||||
if (users==null||users.isEmpty()){
|
if (dto.getApplicant()!=null&&!dto.getApplicant().isEmpty()){
|
||||||
return null;
|
users=jdbcUserRepository.findAllByNameContains(dto.getApplicant());
|
||||||
|
if (users==null||users.isEmpty()){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dto.setUserIds(users.stream().map(User::getEmployeeNo).toList());
|
dto.setUserIds(users.stream().map(User::getEmployeeNo).toList());
|
||||||
Page<ItineraryPageDto> page= jdbcConsumptionDetailRepository.itineraryPageQueryByDto(dto);
|
Page<ItineraryPageDto> page= jdbcConsumptionDetailRepository.itineraryPageQueryByDto(dto);
|
||||||
|
|
Loading…
Reference in New Issue