Преглед изворни кода

【修改】数据字典:列表增加对无效数据的显示;

娄底高职分支
dyy пре 2 година
committed by ndbs
родитељ
комит
acf400b0c0
1 измењених фајлова са 36 додато и 2 уклоњено
  1. +36
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs

+ 36
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs Прегледај датотеку

@@ -24,6 +24,7 @@ namespace Learun.Application.Base.SystemModule
t.F_ItemId,
t.F_ParentId,
t.F_ItemCode,
t.F_ItemCodeGB,
t.F_ItemName,
t.F_IsTree,
t.F_IsNav,
@@ -43,6 +44,7 @@ namespace Learun.Application.Base.SystemModule
t.F_ItemId,
t.F_ParentId,
t.F_ItemCode,
t.F_ItemCodeGB,
t.F_ItemName,
t.F_ItemValue,
t.F_QuickQuery,
@@ -72,7 +74,7 @@ namespace Learun.Application.Base.SystemModule
try
{
StringBuilder strSql = new StringBuilder();
strSql.Append("SELECT " + fieldSql + " FROM LR_Base_DataItem t WHERE t.F_DeleteMark = 0 Order By t.F_ParentId,t.F_SortCode ");
strSql.Append("SELECT " + fieldSql + " FROM LR_Base_DataItem t WHERE t.F_DeleteMark = 0 and t.F_EnabledMark=1 Order By t.F_ParentId,t.F_SortCode ");
return this.BaseRepository().FindList<DataItemEntity>(strSql.ToString());
}
catch (Exception ex)
@@ -147,6 +149,38 @@ namespace Learun.Application.Base.SystemModule
#endregion

#region 数据字典明细

/// <summary>
/// 获取数据字典明细
/// </summary>
/// <returns></returns>
public IEnumerable<DataItemDetailEntity> GetAllDetailList()
{
try
{
StringBuilder strSql = new StringBuilder();
strSql.Append("SELECT " + @"t.F_ItemId,
t.F_ParentId,
t2.F_ItemCode,
t.F_ItemName,
t.F_ItemValue " + @" FROM LR_Base_DataItemDetail t
INNER JOIN LR_Base_DataItem t2 ON t.F_ItemId = t2.F_ItemId
WHERE t.F_DeleteMark = 0 and t.F_EnabledMark=1 Order By t.F_SortCode
");
return this.BaseRepository().FindList<DataItemDetailEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取数据字典明显根据分类编号
/// </summary>
@@ -159,7 +193,7 @@ namespace Learun.Application.Base.SystemModule
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 Order By t.F_SortCode
WHERE t2.F_ItemCode = @itemCode AND t.F_DeleteMark = 0 Order By t.F_SortCode
");
return this.BaseRepository().FindList<DataItemDetailEntity>(strSql.ToString(), new { itemCode = itemCode });
}


Loading…
Откажи
Сачувај