From acf400b0c0476286161be531d4a9921a68e4393b Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 17 Oct 2022 12:12:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AD=97=E5=85=B8=EF=BC=9A=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=E6=97=A0=E6=95=88=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SystemModule/DataItem/DataItemService.cs | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs index e53ae1d1e..2573255e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs +++ b/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(strSql.ToString()); } catch (Exception ex) @@ -147,6 +149,38 @@ namespace Learun.Application.Base.SystemModule #endregion #region 数据字典明细 + + /// + /// 获取数据字典明细 + /// + /// + public IEnumerable 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(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取数据字典明显根据分类编号 /// @@ -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(strSql.ToString(), new { itemCode = itemCode }); }