Quellcode durchsuchen

字典绑定 分类编号 +条件

新疆警官学校中职
ndbs vor 1 Jahr
Ursprung
Commit
390d93893f
4 geänderte Dateien mit 90 neuen und 7 gelöschten Zeilen
  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 Datei anzeigen

@@ -44,7 +44,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public ActionResult ClassifyIndex() {
public ActionResult ClassifyIndex()
{
return View(); return View();
} }
/// <summary> /// <summary>
@@ -100,7 +101,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
[AjaxOnly] [AjaxOnly]
public ActionResult SaveClassifyForm(string keyValue, DataItemEntity entity) {
public ActionResult SaveClassifyForm(string keyValue, DataItemEntity entity)
{
dataItemIBLL.SaveClassifyEntity(keyValue, entity); dataItemIBLL.SaveClassifyEntity(keyValue, entity);
return Success("保存成功!"); return Success("保存成功!");
} }
@@ -111,7 +113,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[AjaxOnly] [AjaxOnly]
public ActionResult DeleteClassifyForm(string keyValue) {
public ActionResult DeleteClassifyForm(string keyValue)
{
dataItemIBLL.VirtualDeleteClassify(keyValue); dataItemIBLL.VirtualDeleteClassify(keyValue);
return Success("删除成功!"); return Success("删除成功!");
} }
@@ -173,6 +176,19 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
return JsonResult(data); return JsonResult(data);
} }
/// <summary> /// <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> /// </summary>
/// <param name="itemCode">分类编号</param> /// <param name="itemCode">分类编号</param>


+ 26
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs Datei anzeigen

@@ -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() public IEnumerable<DataItemDetailEntity> GetAllDetailList()
{ {
try try


+ 7
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemIBLL.cs Datei anzeigen

@@ -85,7 +85,13 @@ namespace Learun.Application.Base.SystemModule
/// <param name="keyword">关键词(名称/值)</param> /// <param name="keyword">关键词(名称/值)</param>
/// <returns></returns> /// <returns></returns>
List<DataItemDetailEntity> GetDetailList2(string itemCode, string keyword); 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>
/// 获取数据字典详细映射数据 /// 获取数据字典详细映射数据
/// </summary> /// </summary>


+ 38
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemService.cs Datei anzeigen

@@ -121,7 +121,8 @@ namespace Learun.Application.Base.SystemModule
/// </summary> /// </summary>
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>
/// <param name="entity">实体</param> /// <param name="entity">实体</param>
public void SaveClassifyEntity(string keyValue, DataItemEntity entity) {
public void SaveClassifyEntity(string keyValue, DataItemEntity entity)
{
try try
{ {
if (string.IsNullOrEmpty(keyValue)) if (string.IsNullOrEmpty(keyValue))
@@ -129,7 +130,8 @@ namespace Learun.Application.Base.SystemModule
entity.Create(); entity.Create();
this.BaseRepository().Insert(entity); this.BaseRepository().Insert(entity);
} }
else {
else
{
entity.Modify(keyValue); entity.Modify(keyValue);
this.BaseRepository().Update(entity); this.BaseRepository().Update(entity);
} }
@@ -238,11 +240,44 @@ namespace Learun.Application.Base.SystemModule
} }
} }
/// <summary> /// <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> /// </summary>
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>
/// <returns></returns> /// <returns></returns>
public DataItemDetailEntity GetDetailEntity(string keyValue) {
public DataItemDetailEntity GetDetailEntity(string keyValue)
{
try try
{ {
return this.BaseRepository().FindEntity<DataItemDetailEntity>(keyValue); return this.BaseRepository().FindEntity<DataItemDetailEntity>(keyValue);


Laden…
Abbrechen
Speichern