|
@@ -56,8 +56,8 @@ namespace Hotline.Api.Controllers
|
|
|
/// 获取部门
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- [HttpGet("getorglist")]
|
|
|
- public async Task<List<IndustrialOrgs>> GetOrgList()
|
|
|
+ [HttpGet("getorglist/{id}")]
|
|
|
+ public async Task<List<IndustrialOrgs>> GetOrgList(string id)
|
|
|
{
|
|
|
var list = await _systemOrganizeRepository.Queryable()
|
|
|
.Select(p => new IndustrialOrgs
|
|
@@ -66,7 +66,7 @@ namespace Hotline.Api.Controllers
|
|
|
OrgName = p.Name,
|
|
|
ParentId = p.ParentId,
|
|
|
ParentName = p.ParentId,
|
|
|
- IsDisable = SqlFunc.Subqueryable<IndustryAssociations>().Where(d => d.OrganizeId == p.Id).Any()
|
|
|
+ IsDisable = SqlFunc.Subqueryable<IndustryAssociations>().Where(d => d.OrganizeId == p.Id).WhereIF(!string.IsNullOrEmpty(id), d => d.IndustrialManagementId != id).Any()
|
|
|
})
|
|
|
.ToTreeAsync(d => d.Children, it => it.ParentId, null);
|
|
|
|