Преглед на файлове

行政区域功能调整

西昌缴费二期
zhangli преди 2 години
родител
ревизия
045e701808
променени са 5 файла, в които са добавени 69 реда и са изтрити 4 реда
  1. +18
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/AreaController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Area/Index.js
  3. +24
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Area/AreaBLL.cs
  4. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Area/AreaIBLL.cs
  5. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Area/AreaService.cs

+ 18
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/AreaController.cs Целия файл

@@ -44,7 +44,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult Getlist(string parentId, string keyword) {
public ActionResult Getlist(string parentId, string keyword)
{
var data = areaIBLL.GetList(parentId, keyword);
return JsonResult(data);
}
@@ -74,6 +75,22 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
[AjaxOnly]
public ActionResult SaveForm(string keyValue, AreaEntity entity)
{
var model = areaIBLL.GetEntityByCode(entity.F_AreaCode);
if (string.IsNullOrEmpty(keyValue))
{
if (model.F_AreaCode == entity.F_AreaCode)
{
return Fail("编号重复,新重新输入!");
}
}
else
{
if (model.F_AreaCode == entity.F_AreaCode && model.F_AreaId != keyValue)
{
return Fail("编号重复,新重新输入!");
}
}

areaIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Area/Index.js Целия файл

@@ -75,7 +75,7 @@ var bootstrap = function ($, learun) {
$('#lr_left_tree').lrtree({
url: top.$.rootUrl + '/LR_SystemModule/Area/GetTree',
nodeClick: function (item) {
parentId = item.id;
parentId = item.value;
page.search();
$('#titleinfo').text(item.text);
}


+ 24
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Area/AreaBLL.cs Целия файл

@@ -114,6 +114,28 @@ namespace Learun.Application.Base.SystemModule
throw;
}
}

public AreaEntity GetEntityByCode(string code)
{
try
{
return areaService.GetEntityByCode(code);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
throw;
}
}


/// <summary>
/// 获取区域数据树(某一级的)
/// </summary>
@@ -129,12 +151,12 @@ namespace Learun.Application.Base.SystemModule
foreach (var item in list)
{
TreeModel node = new TreeModel();
node.id = item.F_AreaId;
node.id = item.F_AreaCode;
node.text = item.F_AreaName;
node.value = item.F_AreaCode;
node.showcheck = false;
node.checkstate = 0;
node.hasChildren = GetList(item.F_AreaId).Count > 0 ? true : false;
node.hasChildren = GetList(item.F_AreaCode).Count > 0 ? true : false;
node.isexpand = false;
node.complete = false;
treeList.Add(node);


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Area/AreaIBLL.cs Целия файл

@@ -38,6 +38,12 @@ namespace Learun.Application.Base.SystemModule
/// <param name="keyValue">主键值</param>
/// <returns></returns>
AreaEntity GetEntity(string keyValue);
/// <summary>
/// 根据编码获取实体
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
AreaEntity GetEntityByCode(string code);
#endregion

#region 提交数据


+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Area/AreaService.cs Целия файл

@@ -104,6 +104,26 @@ namespace Learun.Application.Base.SystemModule
}
}
}


public AreaEntity GetEntityByCode(string code)
{
try
{
return this.BaseRepository().FindEntity<AreaEntity>(x => x.F_AreaCode == code);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据


Зареждане…
Отказ
Запис