mirror of
				https://gitee.com/ThingsGateway/ThingsGateway.git
				synced 2025-10-31 15:43:59 +08:00 
			
		
		
		
	导入变量时写入机构id
This commit is contained in:
		| @@ -445,6 +445,8 @@ internal class ChannelService : BaseService<Channel>, IChannelService | ||||
|                             { | ||||
|                                 channel.Id = CommonUtils.GetSingleId(); | ||||
|                                 channel.IsUp = false; | ||||
|                                 channel.CreateOrgId = UserManager.OrgId; | ||||
|                                 channel.CreateUserId = UserManager.UserId; | ||||
|                             } | ||||
|  | ||||
|                             if (channel.IsUp && ((dataScope != null && dataScope?.Count > 0 && !dataScope.Contains(channel.CreateOrgId)) || dataScope?.Count == 0 && channel.CreateUserId != UserManager.UserId)) | ||||
|   | ||||
| @@ -726,6 +726,8 @@ internal class DeviceService : BaseService<Device>, IDeviceService | ||||
|                             { | ||||
|                                 device.Id = CommonUtils.GetSingleId(); | ||||
|                                 device.IsUp = false; | ||||
|                                 device.CreateOrgId = UserManager.OrgId; | ||||
|                                 device.CreateUserId = UserManager.UserId; | ||||
|                             } | ||||
|  | ||||
|                             // 将设备添加到设备列表中,并添加成功信息到导入预览结果 | ||||
|   | ||||
| @@ -669,6 +669,8 @@ internal class VariableService : BaseService<Variable>, IVariableService | ||||
|                             else | ||||
|                             { | ||||
|                                 variable.IsUp = false; | ||||
|                                 variable.CreateOrgId = UserManager.OrgId; | ||||
|                                 variable.CreateUserId = UserManager.UserId; | ||||
|                             } | ||||
|  | ||||
|                             if (device.IsUp && ((dataScope != null && dataScope?.Count > 0 && !dataScope.Contains(variable.CreateOrgId)) || dataScope?.Count == 0 && variable.CreateUserId != UserManager.UserId)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Diego
					Diego