|
@@ -72,15 +72,25 @@ public class EgDeviceServiceImpl extends AbstractCrudService<EgDeviceMapper, EgD
|
|
|
.orderByDesc(EgDevice::getId);
|
|
|
page = this.page(page,queryWrapper);
|
|
|
if(page.getRecords().size() > 0){
|
|
|
+
|
|
|
+ LambdaQueryWrapper<MeetingFace> meetingFaceQuery = Wrappers.lambdaQuery();
|
|
|
+ meetingFaceQuery.eq(MeetingFace::getTenantId,tenantId);
|
|
|
+ List<MeetingFace> meetingAllFaceList = meetingFaceMapper.selectList(meetingFaceQuery);
|
|
|
+
|
|
|
for (int i = 0; i < page.getRecords().size(); i++) {
|
|
|
if(Objects.nonNull(page.getRecords().get(i).getBindFace()) ||StringUtils.isNotBlank(page.getRecords().get(i).getBindFace())){
|
|
|
String[] fidListStr = page.getRecords().get(i).getBindFace().split(",");
|
|
|
Integer[] fidList = Arrays.stream(fidListStr).map(Integer::parseInt).toArray(Integer[]::new);
|
|
|
|
|
|
- LambdaQueryWrapper<MeetingFace> meetingFaceQuery = Wrappers.lambdaQuery();
|
|
|
- meetingFaceQuery.in(MeetingFace::getFid,Arrays.asList(fidList));
|
|
|
- List<MeetingFace> meetingFaceList = meetingFaceMapper.selectList(meetingFaceQuery);
|
|
|
-
|
|
|
+ List<MeetingFace> meetingFaceList = new ArrayList<>();
|
|
|
+ for (int j = 0; j < fidList.length; j++) {
|
|
|
+ for (int k = 0; k < meetingAllFaceList.size(); k++) {
|
|
|
+ if(fidList[j] == meetingAllFaceList.get(k).getFid()){
|
|
|
+ meetingFaceList.add(meetingAllFaceList.get(k));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
page.getRecords().get(i).setMeetingFaceList(meetingFaceList);
|
|
|
}
|
|
|
|
|
@@ -166,6 +176,18 @@ public class EgDeviceServiceImpl extends AbstractCrudService<EgDeviceMapper, EgD
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void attachUpdate(EgDevice egDevice){
|
|
|
+ if(checkNameUnique(egDevice)){
|
|
|
+ throw new BusinessException("更新门禁设备附加功能'"+egDevice.getDeviceId()+"'失败,设备已存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ egDevice.setUpdateBy(SecurityUtils.getUsername());
|
|
|
+ egDevice.setUpdateTime(LocalDateTime.now());
|
|
|
+
|
|
|
+ this.updateById(egDevice);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void remove(Integer id){
|
|
|
EgDevice egDevice = this.getById(id);
|