|
|
|
@ -440,13 +440,6 @@ public class IotGroupInfoServiceImpl extends BaseServiceImpl<IotGroupInfoMapper, |
|
|
|
if (GroupTypeEnum.noneMatch(type)) { |
|
|
|
throw new SysException("组类型不正确"); |
|
|
|
} |
|
|
|
//如果组已经绑定字典&物实体&物模板,不让其修改组类型 |
|
|
|
//List<IotThingDictEntity> thingDictEntities = dictService.findAllByGroupId(id); |
|
|
|
List<IotGroupRelationEntity> groupRelationEntities = groupRelationService.findAllByGroupId(id); |
|
|
|
if (/*(CollectionUtil.isNotEmpty(thingDictEntities) ||*/ CollectionUtil.isNotEmpty(groupRelationEntities)) |
|
|
|
/*&& !StringUtils.equals(groupInfoEntity.getType(), dto.getType()))*/ { |
|
|
|
throw new SysException("当前组关联了字典或者物实体,不能修改组类型"); |
|
|
|
} |
|
|
|
if (!UserContext.isAdmin() && ObjectUtil.equals(groupInfoEntity.getIsDefault(), IsDefaultEnum.Y.getValue())) { |
|
|
|
throw new SysException("暂无修改系统默认组的权限"); |
|
|
|
} |
|
|
|
|