|
@@ -95,30 +95,30 @@ public class DmpDeviceInfoServiceImpl extends AbstractCrudService<DmpDeviceInfoM
|
|
|
commandUserId = SecurityUtils.getUserId();
|
|
|
commandUserName = SecurityUtils.getUsername();
|
|
|
}
|
|
|
-
|
|
|
- //人员设备权限校验,校验通过,可以下发命令控制设备
|
|
|
- Integer fid = baseMapper.getMeetingFaceData(commandUserId);
|
|
|
- if(fid == null){
|
|
|
- throw new BusinessException("人脸卡号信息未注册");
|
|
|
- }
|
|
|
- Integer[] deviceFid = baseMapper.getMeetingFaceDeviceList(fid);
|
|
|
- if(deviceFid.length == 0){
|
|
|
- throw new BusinessException("人员未绑定设备,请检查");
|
|
|
- }
|
|
|
-
|
|
|
- LambdaQueryWrapper<DmpDeviceInfo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
- queryWrapper.select(DmpDeviceInfo::getId)
|
|
|
- .eq(DmpDeviceInfo::getDeviceId,deviceUuid)
|
|
|
- .eq(DmpDeviceInfo::getDeleteFlag,0);
|
|
|
- DmpDeviceInfo one = this.getOne(queryWrapper);
|
|
|
- if(one != null){
|
|
|
- boolean exist = Arrays.asList(deviceFid).contains(one.getId());
|
|
|
- if(!exist){
|
|
|
- throw new BusinessException("暂无权限");
|
|
|
- }
|
|
|
- }else{
|
|
|
- throw new BusinessException("设备未注册,请先注册");
|
|
|
- }
|
|
|
+//
|
|
|
+// //人员设备权限校验,校验通过,可以下发命令控制设备
|
|
|
+// Integer fid = baseMapper.getMeetingFaceData(commandUserId);
|
|
|
+// if(fid == null){
|
|
|
+// throw new BusinessException("人脸卡号信息未注册");
|
|
|
+// }
|
|
|
+// Integer[] deviceFid = baseMapper.getMeetingFaceDeviceList(fid);
|
|
|
+// if(deviceFid.length == 0){
|
|
|
+// throw new BusinessException("人员未绑定设备,请检查");
|
|
|
+// }
|
|
|
+//
|
|
|
+// LambdaQueryWrapper<DmpDeviceInfo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
+// queryWrapper.select(DmpDeviceInfo::getId)
|
|
|
+// .eq(DmpDeviceInfo::getDeviceId,deviceUuid)
|
|
|
+// .eq(DmpDeviceInfo::getDeleteFlag,0);
|
|
|
+// DmpDeviceInfo one = this.getOne(queryWrapper);
|
|
|
+// if(one != null){
|
|
|
+// boolean exist = Arrays.asList(deviceFid).contains(one.getId());
|
|
|
+// if(!exist){
|
|
|
+// throw new BusinessException("暂无权限");
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// throw new BusinessException("设备未注册,请先注册");
|
|
|
+// }
|
|
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>();
|