소스 검색

专业开课计划左侧树结构

临城职教中职
zhangli 2 년 전
부모
커밋
4f2b6b7cf2
4개의 변경된 파일106개의 추가작업 그리고 1개의 파일을 삭제
  1. +12
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdDeptController.cs
  2. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptBLL.cs
  3. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptIBLL.cs
  4. +26
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs

+ 12
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdDeptController.cs 파일 보기

@@ -42,7 +42,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
#endregion #endregion


#region 获取数据 #region 获取数据

/// <summary>
/// 获取树形数据
/// </summary>
/// <param name="parentId">父级id</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree(string parentId)
{
var data = cdDeptIBLL.GetTree(parentId);
return JsonResult(data);
}
/// <summary> /// <summary>
/// 获取页面显示列表数据 /// 获取页面显示列表数据
/// <summary> /// <summary>


+ 62
- 0
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 获取数据 #region 获取数据


public List<TreeModel> GetTree(string parentId)
{
try
{
List<CdDeptEntity> list = GetList();
List<TreeModel> treeList = new List<TreeModel>();
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);
}
}
}
/// <summary>
/// 获取列表数据
/// </summary>
/// <returns></returns>
public List<CdDeptEntity> GetList()
{
try
{
//List<CdDeptEntity> list = cache.Read<List<CdDeptEntity>>(cacheKey);
//if (list == null)
//{
// list = (List<CdDeptEntity>)cdDeptService.GetList();
// cache.Write<List<CdDeptEntity>>(cacheKey, list, CacheId.company);
//}
return list;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary> /// <summary>
/// 获取页面显示列表数据 /// 获取页面显示列表数据
/// <summary> /// <summary>


+ 6
- 0
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 获取数据 #region 获取数据


/// <summary>
/// 获取树形数据
/// </summary>
/// <param name="parentId">父级id</param>
/// <returns></returns>
List<TreeModel> GetTree(string parentId);
/// <summary> /// <summary>
/// 获取页面显示列表数据 /// 获取页面显示列表数据
/// <summary> /// <summary>


+ 26
- 0
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 获取数据 #region 获取数据


/// <summary>
/// 获取公司列表信息(全部)
/// </summary>
/// <returns></returns>
public IEnumerable<CdDeptEntity> 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<CdDeptEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary> /// <summary>
/// 获取页面显示列表数据 /// 获取页面显示列表数据
/// <summary> /// <summary>


불러오는 중...
취소
저장