|
|
@@ -16,7 +16,7 @@ namespace Learun.Application.Organization |
|
|
|
{ |
|
|
|
private PostService postService = new PostService(); |
|
|
|
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 缓存定义 |
|
|
|
private ICache cache = CacheFactory.CaChe(); |
|
|
@@ -34,7 +34,8 @@ namespace Learun.Application.Organization |
|
|
|
try |
|
|
|
{ |
|
|
|
List<PostEntity> list = cache.Read<List<PostEntity>>(cacheKey + companyId, CacheId.post); |
|
|
|
if (list == null) { |
|
|
|
if (list == null) |
|
|
|
{ |
|
|
|
list = (List<PostEntity>)postService.GetList(companyId); |
|
|
|
cache.Write<List<PostEntity>>(cacheKey + companyId, list, CacheId.post); |
|
|
|
} |
|
|
@@ -134,7 +135,7 @@ namespace Learun.Application.Organization |
|
|
|
TreeModel node = new TreeModel(); |
|
|
|
node.id = item.F_PostId; |
|
|
|
node.text = item.F_Name; |
|
|
|
DepartmentEntity departmentEntity = departmentList.Find(t=>t.F_DepartmentId == item.F_DepartmentId); |
|
|
|
DepartmentEntity departmentEntity = departmentList.Find(t => t.F_DepartmentId == item.F_DepartmentId); |
|
|
|
if (departmentEntity != null) |
|
|
|
{ |
|
|
|
node.text = "【" + departmentEntity.F_FullName + "】" + node.text; |
|
|
@@ -167,7 +168,8 @@ namespace Learun.Application.Organization |
|
|
|
/// </summary> |
|
|
|
/// <param name="keyValue">主键</param> |
|
|
|
/// <returns></returns> |
|
|
|
public PostEntity GetEntity(string keyValue) { |
|
|
|
public PostEntity GetEntity(string keyValue) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
return postService.GetEntity(keyValue); |
|
|
@@ -217,7 +219,7 @@ namespace Learun.Application.Organization |
|
|
|
{ |
|
|
|
PostEntity entity = GetEntity(keyValue); |
|
|
|
cache.Remove(cacheKey + entity.F_CompanyId, CacheId.post); |
|
|
|
postService.VirtualDelete(keyValue); |
|
|
|
postService.VirtualDelete(keyValue); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
@@ -320,7 +322,8 @@ namespace Learun.Application.Organization |
|
|
|
parentId = "0", |
|
|
|
hasChildren = true, |
|
|
|
ChildNodes = departmentTree, |
|
|
|
complete = true |
|
|
|
complete = true, |
|
|
|
isCompany = true |
|
|
|
}; |
|
|
|
treeList.Add(node); |
|
|
|
} |
|
|
|