Browse Source

优化service-iot服务模块中下发设备控制命令接口,去除人员校验,界面按钮点击调用,用于设备调试

james 4 months ago
parent
commit
a0b44d9db5

+ 24 - 24
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/DmpDeviceInfoServiceImpl.java

@@ -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<>();