diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index 43cb4adf..c83e0b59 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -197,12 +197,13 @@ namespace BLL public static List GetChildrenUnitId(string unitId) { List unitIdList = new List(); - var unit = Funs.DB.Base_Unit.FirstOrDefault(e => e.IsBranch == true); //本单位 - if (unit != null) - { - unitIdList.Add(unit.UnitId); - GetChildrenUnitId(unit.UnitId); - } + unitIdList = (from x in Funs.DB.Base_Unit where x.IsBranch == true select x.UnitId).ToList(); + //var unit = Funs.DB.Base_Unit.FirstOrDefault(e => e.IsBranch == true); //本单位 + //if (unit != null) + //{ + // unitIdList.Add(unit.UnitId); + // GetChildrenUnitId(unit.UnitId); + //} return unitIdList; } #endregion