소스 검색

字典绑定 分类编号 +条件

新疆警官学校中职
ndbs 1 년 전
부모
커밋
390d93893f
4개의 변경된 파일90개의 추가작업 그리고 7개의 파일을 삭제
  1. +19
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/DataItemController.cs
  2. +26
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs
  3. +7
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemIBLL.cs
  4. +38
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs

+ 19
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/DataItemController.cs 파일 보기

@@ -44,7 +44,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult ClassifyIndex() {
public ActionResult ClassifyIndex()
{
return View();
}
/// <summary>
@@ -100,7 +101,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveClassifyForm(string keyValue, DataItemEntity entity) {
public ActionResult SaveClassifyForm(string keyValue, DataItemEntity entity)
{
dataItemIBLL.SaveClassifyEntity(keyValue, entity);
return Success("保存成功!");
}
@@ -111,7 +113,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteClassifyForm(string keyValue) {
public ActionResult DeleteClassifyForm(string keyValue)
{
dataItemIBLL.VirtualDeleteClassify(keyValue);
return Success("删除成功!");
}
@@ -173,6 +176,19 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
return JsonResult(data);
}
/// <summary>
/// 获取数据字典明显根据分类编号 +条件
/// </summary>
/// <param name="itemCode"></param>
/// <param name="strWhere">条件</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetDetailList3(string itemCode, string strWhere)
{
var data = dataItemIBLL.GetDetailList3(itemCode, strWhere);
return JsonResult(data);
}
/// <summary>
/// 获取数据字典明显树形数据
/// </summary>
/// <param name="itemCode">分类编号</param>


+ 26
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs 파일 보기

@@ -324,6 +324,32 @@ namespace Learun.Application.Base.SystemModule
}
}
}

/// <summary>
/// 获取数据字典明显根据分类编号 +条件
/// </summary>
/// <param name="itemCode"></param>
/// <param name="StrWhere"></param>
/// <returns></returns>
public List<DataItemDetailEntity> GetDetailList3(string itemCode, string StrWhere)
{
try
{
List<DataItemDetailEntity> list = (List<DataItemDetailEntity>)dataItemService.GetDetailList3(itemCode, StrWhere);
return list;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable<DataItemDetailEntity> GetAllDetailList()
{
try


+ 7
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemIBLL.cs 파일 보기

@@ -85,7 +85,13 @@ namespace Learun.Application.Base.SystemModule
/// <param name="keyword">关键词(名称/值)</param>
/// <returns></returns>
List<DataItemDetailEntity> GetDetailList2(string itemCode, string keyword);

/// <summary>
/// 获取数据字典明显根据分类编号 +条件
/// </summary>
/// <param name="itemCode"></param>
/// <param name="StrWhere"></param>
/// <returns></returns>
List<DataItemDetailEntity> GetDetailList3(string itemCode, string StrWhere);
/// <summary>
/// 获取数据字典详细映射数据
/// </summary>


+ 38
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs 파일 보기

@@ -121,7 +121,8 @@ namespace Learun.Application.Base.SystemModule
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveClassifyEntity(string keyValue, DataItemEntity entity) {
public void SaveClassifyEntity(string keyValue, DataItemEntity entity)
{
try
{
if (string.IsNullOrEmpty(keyValue))
@@ -129,7 +130,8 @@ namespace Learun.Application.Base.SystemModule
entity.Create();
this.BaseRepository().Insert(entity);
}
else {
else
{
entity.Modify(keyValue);
this.BaseRepository().Update(entity);
}
@@ -238,11 +240,44 @@ namespace Learun.Application.Base.SystemModule
}
}
/// <summary>
/// 获取数据字典明显根据分类编号 +条件
/// </summary>
/// <param name="itemCode"></param>
/// <param name="strWhere"></param>
/// <returns></returns>
public IEnumerable<DataItemDetailEntity> GetDetailList3(string itemCode, string strWhere)
{
try
{
StringBuilder strSql = new StringBuilder();
strSql.Append(" SELECT " + detailFieldSql + @" FROM LR_Base_DataItemDetail t
INNER JOIN LR_Base_DataItem t2 ON t.F_ItemId = t2.F_ItemId
WHERE t2.F_ItemCode = @itemCode AND t.F_DeleteMark = 0 ");
if (!string.IsNullOrEmpty(strWhere))
{
strSql.Append(strWhere);
}
return this.BaseRepository().FindList<DataItemDetailEntity>(strSql.ToString(), new { itemCode = itemCode });
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取数据字典明细实体类
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public DataItemDetailEntity GetDetailEntity(string keyValue) {
public DataItemDetailEntity GetDetailEntity(string keyValue)
{
try
{
return this.BaseRepository().FindEntity<DataItemDetailEntity>(keyValue);


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