diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdDeptController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdDeptController.cs
index 9e6e7d06c..b7875fbfd 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdDeptController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdDeptController.cs
@@ -42,7 +42,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
#endregion
#region 获取数据
-
+ ///
+ /// 获取树形数据
+ ///
+ /// 父级id
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetTree(string parentId)
+ {
+ var data = cdDeptIBLL.GetTree(parentId);
+ return JsonResult(data);
+ }
///
/// 获取页面显示列表数据
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptBLL.cs
index 761e51319..7f1f837a3 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptBLL.cs
@@ -20,6 +20,68 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#region 获取数据
+ public List GetTree(string parentId)
+ {
+ try
+ {
+ List list = GetList();
+ List treeList = new List();
+ foreach (var item in list)
+ {
+ TreeModel node = new TreeModel
+ {
+ id = item.DeptNo,
+ text = item.DeptName,
+ value = item.DeptNo,
+ showcheck = false,
+ checkstate = 0,
+ isexpand = true,
+ parentId = item.DeptId
+ };
+ treeList.Add(node);
+ }
+ return treeList.ToTree();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ ///
+ /// 获取列表数据
+ ///
+ ///
+ public List GetList()
+ {
+ try
+ {
+ //List list = cache.Read>(cacheKey);
+ //if (list == null)
+ //{
+ // list = (List)cdDeptService.GetList();
+ // cache.Write>(cacheKey, list, CacheId.company);
+ //}
+ return list;
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
///
/// 获取页面显示列表数据
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptIBLL.cs
index f78a44803..065acaa4a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptIBLL.cs
@@ -15,6 +15,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
#region 获取数据
+ ///
+ /// 获取树形数据
+ ///
+ /// 父级id
+ ///
+ List GetTree(string parentId);
///
/// 获取页面显示列表数据
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs
index dc46d1853..e32b67cd3 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs
@@ -20,6 +20,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
#region 获取数据
+ ///
+ /// 获取公司列表信息(全部)
+ ///
+ ///
+ public IEnumerable GetList()
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(" * ");
+ strSql.Append(" FROM CdDept t WHERE 1=1 order by t.deptSort ");
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString());
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
///
/// 获取页面显示列表数据
///