Commit 29587672 by huangjy

fix: 修复bug

parent 4ad23145
...@@ -164,18 +164,27 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe ...@@ -164,18 +164,27 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
choiceOrgIdList.addAll(Lists.newArrayList(param.getOrgId().split(","))); choiceOrgIdList.addAll(Lists.newArrayList(param.getOrgId().split(",")));
} }
List<String> orgIdList = Lists.newArrayList(); List<String> orgIdList = Lists.newArrayList();
if (CollectionUtils.isNotEmpty(choiceOrgIdList)) { if (com.makeit.utils.old.StringUtils.isNotEmpty(param.getType()) && com.makeit.utils.old.StringUtils.isEmpty(param.getOrgId())) {
orgIdList = choiceOrgIdList; orgIdList = choiceOrgIdList;
if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1");
} }
if (CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = typeOrgIdList;
} }
if (com.makeit.utils.old.StringUtils.isNotEmpty(param.getOrgId()) && com.makeit.utils.old.StringUtils.isEmpty(param.getType())) {
orgIdList = choiceOrgIdList;
if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1");
}
}
if (com.makeit.utils.old.StringUtils.isNotEmpty(param.getOrgId()) && com.makeit.utils.old.StringUtils.isNotEmpty(param.getType())) {
if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) { if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList)); orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList));
}
if (CollectionUtils.isEmpty(orgIdList)) { if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1"); orgIdList.add("-1");
} }
}
}
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())
......
...@@ -129,19 +129,27 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -129,19 +129,27 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
choiceOrgIdList.addAll(Lists.newArrayList(dto.getOrgId().split(","))); choiceOrgIdList.addAll(Lists.newArrayList(dto.getOrgId().split(",")));
} }
List<String> orgIdList = Lists.newArrayList(); List<String> orgIdList = Lists.newArrayList();
if (CollectionUtils.isNotEmpty(choiceOrgIdList)) { if (StringUtils.isNotEmpty(dto.getType()) && StringUtils.isEmpty(dto.getOrgId())) {
orgIdList = choiceOrgIdList; orgIdList = choiceOrgIdList;
if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1");
}
}
if (StringUtils.isNotEmpty(dto.getOrgId()) && StringUtils.isEmpty(dto.getType())) {
orgIdList = choiceOrgIdList;
if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1");
} }
if (CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = typeOrgIdList;
} }
if (StringUtils.isNotEmpty(dto.getOrgId()) && StringUtils.isNotEmpty(dto.getType())) {
if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) { if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList)); orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList));
}
if (CollectionUtils.isEmpty(orgIdList)) { if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1"); orgIdList.add("-1");
} }
}
}
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())
.like(StringUtils.isNotBlank(dto.getPhone()), PlatElder::getPhone, dto.getPhone()) .like(StringUtils.isNotBlank(dto.getPhone()), PlatElder::getPhone, dto.getPhone())
......
...@@ -171,18 +171,28 @@ public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> impl ...@@ -171,18 +171,28 @@ public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> impl
choiceOrgIdList.addAll(Lists.newArrayList(dto.getOrgId().split(","))); choiceOrgIdList.addAll(Lists.newArrayList(dto.getOrgId().split(",")));
} }
List<String> orgIdList = Lists.newArrayList(); List<String> orgIdList = Lists.newArrayList();
if (CollectionUtils.isNotEmpty(choiceOrgIdList)) { if (com.makeit.utils.old.StringUtils.isNotEmpty(dto.getType()) && com.makeit.utils.old.StringUtils.isEmpty(dto.getOrgId())) {
orgIdList = choiceOrgIdList; orgIdList = choiceOrgIdList;
if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1");
}
}
if (com.makeit.utils.old.StringUtils.isNotEmpty(dto.getOrgId()) && com.makeit.utils.old.StringUtils.isEmpty(dto.getType())) {
orgIdList = choiceOrgIdList;
if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1");
} }
if (CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = typeOrgIdList;
} }
if (com.makeit.utils.old.StringUtils.isNotEmpty(dto.getOrgId()) && com.makeit.utils.old.StringUtils.isNotEmpty(dto.getType())) {
if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) { if (CollectionUtils.isNotEmpty(choiceOrgIdList) && CollectionUtils.isNotEmpty(typeOrgIdList)) {
orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList)); orgIdList = new ArrayList<>(CollectionUtils.intersection(typeOrgIdList, choiceOrgIdList));
}
if (CollectionUtils.isEmpty(orgIdList)) { if (CollectionUtils.isEmpty(orgIdList)) {
orgIdList.add("-1"); orgIdList.add("-1");
} }
}
}
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