Commit 9157358b by huangjy

fixbug

parent f8b24d5c
...@@ -151,7 +151,16 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe ...@@ -151,7 +151,16 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
if (StringUtils.isNotEmpty(param.getOrgId())) { if (StringUtils.isNotEmpty(param.getOrgId())) {
choiceOrgIdList.addAll(Lists.newArrayList(param.getOrgId().split(","))); choiceOrgIdList.addAll(Lists.newArrayList(param.getOrgId().split(",")));
} }
List<String> orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList)); List<String> orgIdList = Lists.newArrayList();
if (CollectionUtils.isNotEmpty(choiceOrgIdList)) {
orgIdList = choiceOrgIdList;
}
if (CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = typeOrgIdList;
}
if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList));
}
return new LambdaQueryWrapper<PlatAlarmRecord>().ge(Objects.nonNull(param.getCreateDateFrom()), BaseEntity::getCreateDate, param.getCreateDateFrom()) return new LambdaQueryWrapper<PlatAlarmRecord>().ge(Objects.nonNull(param.getCreateDateFrom()), BaseEntity::getCreateDate, param.getCreateDateFrom())
.eq(StringUtils.isNotBlank(param.getId()),BaseEntity::getId,param.getId()) .eq(StringUtils.isNotBlank(param.getId()),BaseEntity::getId,param.getId())
......
...@@ -117,7 +117,16 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -117,7 +117,16 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
if (StringUtils.isNotEmpty(dto.getOrgId())) { if (StringUtils.isNotEmpty(dto.getOrgId())) {
choiceOrgIdList.addAll(Lists.newArrayList(dto.getOrgId().split(","))); choiceOrgIdList.addAll(Lists.newArrayList(dto.getOrgId().split(",")));
} }
List<String> orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList)); List<String> orgIdList = Lists.newArrayList();
if (CollectionUtils.isNotEmpty(choiceOrgIdList)) {
orgIdList = choiceOrgIdList;
}
if (CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = typeOrgIdList;
}
if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList));
}
return new QueryWrapper<PlatElder>().lambda() return new QueryWrapper<PlatElder>().lambda()
.like(StringUtils.isNotBlank(dto.getName()), PlatElder::getName, dto.getName()) .like(StringUtils.isNotBlank(dto.getName()), PlatElder::getName, dto.getName())
......
...@@ -170,7 +170,16 @@ public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> impl ...@@ -170,7 +170,16 @@ public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> impl
if (StringUtil.isNotEmpty(dto.getOrgId())) { if (StringUtil.isNotEmpty(dto.getOrgId())) {
choiceOrgIdList.addAll(Lists.newArrayList(dto.getOrgId().split(","))); choiceOrgIdList.addAll(Lists.newArrayList(dto.getOrgId().split(",")));
} }
List<String> orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList)); List<String> orgIdList = Lists.newArrayList();
if (CollectionUtils.isNotEmpty(choiceOrgIdList)) {
orgIdList = choiceOrgIdList;
}
if (CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = typeOrgIdList;
}
if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList));
}
return baseMapper.selectBySpaceIdAndStatus(new Page<>(pageReqDTO.getPage(),pageReqDTO.getLimit()),dto,orgIdList); return baseMapper.selectBySpaceIdAndStatus(new Page<>(pageReqDTO.getPage(),pageReqDTO.getLimit()),dto,orgIdList);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment