diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/DataItemController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/DataItemController.cs index de0fe52d1..10a5c43df 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/DataItemController.cs +++ b/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 /// /// [HttpGet] - public ActionResult ClassifyIndex() { + public ActionResult ClassifyIndex() + { return View(); } /// @@ -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 /// [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); } /// + /// 获取数据字典明显根据分类编号 +条件 + /// + /// + /// 条件 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetDetailList3(string itemCode, string strWhere) + { + var data = dataItemIBLL.GetDetailList3(itemCode, strWhere); + return JsonResult(data); + } + /// /// 获取数据字典明显树形数据 /// /// 分类编号 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs index f4293a4d1..fd575ada8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs +++ b/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 } } } + + /// + /// 获取数据字典明显根据分类编号 +条件 + /// + /// + /// + /// + public List GetDetailList3(string itemCode, string StrWhere) + { + try + { + List list = (List)dataItemService.GetDetailList3(itemCode, StrWhere); + return list; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public IEnumerable GetAllDetailList() { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemIBLL.cs index a6255d2a7..5663aa472 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemIBLL.cs +++ b/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 /// 关键词(名称/值) /// List GetDetailList2(string itemCode, string keyword); - + /// + /// 获取数据字典明显根据分类编号 +条件 + /// + /// + /// + /// + List GetDetailList3(string itemCode, string StrWhere); /// /// 获取数据字典详细映射数据 /// 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 2f965041b..84dae8858 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 @@ -121,7 +121,8 @@ namespace Learun.Application.Base.SystemModule /// /// 主键 /// 实体 - 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 } } /// + /// 获取数据字典明显根据分类编号 +条件 + /// + /// + /// + /// + public IEnumerable 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(strSql.ToString(), new { itemCode = itemCode }); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取数据字典明细实体类 /// /// 主键 /// - public DataItemDetailEntity GetDetailEntity(string keyValue) { + public DataItemDetailEntity GetDetailEntity(string keyValue) + { try { return this.BaseRepository().FindEntity(keyValue);