diff --git a/system/Tnb.Systems/Permission/DepartmentService.cs b/system/Tnb.Systems/Permission/DepartmentService.cs index 2233e3db..98f97aa8 100644 --- a/system/Tnb.Systems/Permission/DepartmentService.cs +++ b/system/Tnb.Systems/Permission/DepartmentService.cs @@ -394,6 +394,8 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra { // 删除该组织和角色关联数据 await _repository.AsSugarClient().Deleteable().Where(x => x.OrganizeId == id && x.ObjectType == "Role").ExecuteCommandAsync(); + // 删除该组织和设备关联数据 + await _repository.AsSugarClient().Deleteable().Where(x => x.OrganizeId == id && x.ObjectType == "Eqp").ExecuteCommandAsync(); } #region 第三方数据删除