Ver código fonte

【修改】数字字典:显示无效项;

娄底高职分支
dyy 2 anos atrás
committed by ndbs
pai
commit
7e0ef9b48a
5 arquivos alterados com 126 adições e 11 exclusões
  1. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/DataItemController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/DataItem/Index.js
  3. +76
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs
  4. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemIBLL.cs
  5. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs

+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/DataItemController.cs Ver arquivo

@@ -160,6 +160,19 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
return JsonResult(data);
}
/// <summary>
/// 获取数据字典明显根据分类编号
/// </summary>
/// <param name="itemCode">分类编号</param>
/// <param name="keyword">查询条件</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetDetailList2(string itemCode, string keyword)
{
var data = dataItemIBLL.GetDetailList2(itemCode, keyword);
return JsonResult(data);
}
/// <summary>
/// 获取数据字典明显树形数据
/// </summary>
/// <param name="itemCode">分类编号</param>


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/DataItem/Index.js Ver arquivo

@@ -105,8 +105,8 @@ var bootstrap = function ($, learun) {
});
},
initGrid: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList',
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList2',
headData: [
{ label: '项目名', name: 'F_ItemName', width: 200, align: 'left' },
{ label: '项目值', name: 'F_ItemValue', width: 200, align: 'left' },


+ 76
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs Ver arquivo

@@ -300,6 +300,48 @@ namespace Learun.Application.Base.SystemModule
}
}
}
/// <summary>
/// 获取数据字典明显
/// </summary>
/// <param name="itemCode">分类编码</param>
/// <returns></returns>
public List<DataItemDetailEntity> GetDetailList2(string itemCode)
{
try
{
List<DataItemDetailEntity> list = (List<DataItemDetailEntity>)dataItemService.GetDetailList2(itemCode);
return list;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable<DataItemDetailEntity> GetAllDetailList()
{
try
{
return dataItemService.GetAllDetailList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取数据字典详细映射数据
@@ -323,16 +365,12 @@ namespace Learun.Application.Base.SystemModule
}
foreach (var detailItem in detailList)
{
if (!dic[item.F_ItemCode].ContainsKey(detailItem.F_ItemDetailId))
dic[item.F_ItemCode].Add(detailItem.F_ItemDetailId, new DataItemModel()
{
dic[item.F_ItemCode].Add(detailItem.F_ItemDetailId, new DataItemModel()
{
parentId = detailItem.F_ParentId,
text = detailItem.F_ItemName,
value = detailItem.F_ItemValue
});
}

parentId = detailItem.F_ParentId,
text = detailItem.F_ItemName,
value = detailItem.F_ItemValue
});
}
}
cache.Write(cacheKeyDetail + "dic", dic, CacheId.dataItem);
@@ -385,6 +423,35 @@ namespace Learun.Application.Base.SystemModule
/// <summary>
/// 获取数据字典明显
/// </summary>
/// <param name="itemCode">分类编码</param>
/// <param name="keyword">关键词(名称/值)</param>
/// <returns></returns>
public List<DataItemDetailEntity> GetDetailList2(string itemCode, string keyword)
{
try
{
List<DataItemDetailEntity> list = GetDetailList2(itemCode);
if (!string.IsNullOrEmpty(keyword))
{
list = list.FindAll(t => t.F_ItemName.Contains(keyword) || t.F_ItemValue.Contains(keyword));
}
return list;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取数据字典明显
/// </summary>
/// <param name="itemCode">分类编号</param>
/// <param name="parentId">父级主键</param>
/// <returns></returns>


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemIBLL.cs Ver arquivo

@@ -77,6 +77,13 @@ namespace Learun.Application.Base.SystemModule
/// <param name="keyword">关键词(名称/值)</param>
/// <returns></returns>
List<DataItemDetailEntity> GetDetailList(string itemCode, string keyword);
/// <summary>
/// 获取数据字典明显
/// </summary>
/// <param name="itemCode">分类编码</param>
/// <param name="keyword">关键词(名称/值)</param>
/// <returns></returns>
List<DataItemDetailEntity> GetDetailList2(string itemCode, string keyword);

/// <summary>
/// 获取数据字典详细映射数据


+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs Ver arquivo

@@ -187,6 +187,34 @@ namespace Learun.Application.Base.SystemModule
/// <param name="itemCode">分类编号</param>
/// <returns></returns>
public IEnumerable<DataItemDetailEntity> GetDetailList(string itemCode)
{
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 and t.F_EnabledMark=1 Order By t.F_SortCode
");
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="itemCode">分类编号</param>
/// <returns></returns>
public IEnumerable<DataItemDetailEntity> GetDetailList2(string itemCode)
{
try
{


Carregando…
Cancelar
Salvar