生产管理
This commit is contained in:
@@ -9,6 +9,7 @@ using JNPF.Systems.Entitys.Dto.Department;
|
||||
using JNPF.Systems.Entitys.Dto.Organize;
|
||||
using JNPF.Systems.Entitys.Dto.SysConfig;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using JNPF.Systems.Interfaces.Permission;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using Mapster;
|
||||
@@ -212,6 +213,9 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
var res = entity.Adapt<DepartmentInfoOutput>();
|
||||
if (entity.ParentId.Equals("-1")) res.organizeIdTree = new List<string>() { res.id };
|
||||
else res.organizeIdTree = (await _repository.GetSingleAsync(p => p.Id == entity.ParentId)).OrganizeIdTree.Split(",").ToList();
|
||||
//modified by ly on 20230421
|
||||
var dic = await _repository.AsSugarClient().Queryable<DictionaryDataEntity>().Where(it => it.DictionaryTypeId == "24754619407381").ToDictionaryAsync(x => x.EnCode, x => x.FullName);
|
||||
res.categoryName = dic.ContainsKey(res.category) ? dic[res.category].ToString() : "";
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -578,7 +582,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
/// <returns></returns>
|
||||
public async Task<List<OrganizeEntity>> GetCompanyAllDep(string id)
|
||||
{
|
||||
return await _repository.GetListAsync(x => x.OrganizeIdTree.Contains(id) && x.Category == "department" && x.EnabledMark == 1 && x.DeleteMark == null);
|
||||
return await _repository.GetListAsync(x => x.OrganizeIdTree.Contains(id) && x.Category == "department" && x.EnabledMark == 1 && x.DeleteMark == null);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user