下发设备修改
This commit is contained in:
parent
e003e303e1
commit
576f600850
@ -316,25 +316,7 @@ public class ProjectUfaceConfigServiceImpl extends ServiceImpl<ProjectUfaceConfi
|
||||
if (CollUtil.isNotEmpty(allList)) {
|
||||
notDevSns = StrUtil.join(",", allList.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||
}
|
||||
} else if (Objects.equals(workerInfo.getDevType(), 1)) {
|
||||
devSns = workerInfo.getUfaceDevId();
|
||||
if (StrUtil.isNotBlank(devSns)) {
|
||||
List<UfaceDev> existList = ufaceDevMapper.selectList(new LambdaQueryWrapper<UfaceDev>().eq(UfaceDev::getProjectSn, workerInfo.getProjectSn()).in(UfaceDev::getId, StrUtil.split(devSns, ",")));
|
||||
List<UfaceDev> notExistList = ufaceDevMapper.selectList(new LambdaQueryWrapper<UfaceDev>().eq(UfaceDev::getProjectSn, workerInfo.getProjectSn()).notIn(UfaceDev::getId, StrUtil.split(devSns, ",")));
|
||||
if (CollUtil.isNotEmpty(notExistList)) {
|
||||
notDevSns = StrUtil.join(",", notExistList.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(existList)) {
|
||||
devSns = StrUtil.join(",", existList.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||
}
|
||||
} else {
|
||||
//只删除
|
||||
List<UfaceDev> notExistList = ufaceDevMapper.selectList(new LambdaQueryWrapper<UfaceDev>().eq(UfaceDev::getProjectSn, workerInfo.getProjectSn()));
|
||||
if (CollUtil.isNotEmpty(notExistList)) {
|
||||
notDevSns = StrUtil.join(",", notExistList.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (Objects.equals(workerInfo.getDevType(), 2)) {
|
||||
//设备分组情况
|
||||
String ufaceDevGroupId = workerInfo.getUfaceDevGroupId();
|
||||
if (StrUtil.isNotBlank(ufaceDevGroupId)) {
|
||||
@ -353,6 +335,25 @@ public class ProjectUfaceConfigServiceImpl extends ServiceImpl<ProjectUfaceConfi
|
||||
notDevSns = StrUtil.join(",", notExistList.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//设备情况
|
||||
devSns = workerInfo.getUfaceDevId();
|
||||
if (StrUtil.isNotBlank(devSns)) {
|
||||
List<UfaceDev> existList = ufaceDevMapper.selectList(new LambdaQueryWrapper<UfaceDev>().eq(UfaceDev::getProjectSn, workerInfo.getProjectSn()).in(UfaceDev::getId, StrUtil.split(devSns, ",")));
|
||||
List<UfaceDev> notExistList = ufaceDevMapper.selectList(new LambdaQueryWrapper<UfaceDev>().eq(UfaceDev::getProjectSn, workerInfo.getProjectSn()).notIn(UfaceDev::getId, StrUtil.split(devSns, ",")));
|
||||
if (CollUtil.isNotEmpty(notExistList)) {
|
||||
notDevSns = StrUtil.join(",", notExistList.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(existList)) {
|
||||
devSns = StrUtil.join(",", existList.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||
}
|
||||
} else {
|
||||
//只删除
|
||||
List<UfaceDev> notExistList = ufaceDevMapper.selectList(new LambdaQueryWrapper<UfaceDev>().eq(UfaceDev::getProjectSn, workerInfo.getProjectSn()));
|
||||
if (CollUtil.isNotEmpty(notExistList)) {
|
||||
notDevSns = StrUtil.join(",", notExistList.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return new ImmutablePair<String, String>(devSns, notDevSns);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user