|
|
@@ -130,6 +130,11 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers |
|
|
|
|
|
|
|
list = list.Where(m => m.F_CompanyId != keyValue).ToList(); |
|
|
|
} |
|
|
|
if (keyValue == entity.F_ParentId) |
|
|
|
{ |
|
|
|
return Fail("操作失败,当前项不允许"); |
|
|
|
} |
|
|
|
|
|
|
|
if (list.Any(a => a.F_FullName == entity.F_FullName)) |
|
|
|
{ |
|
|
|
return Fail("学校名称重复"); |
|
|
@@ -156,8 +161,16 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult DeleteForm(string keyValue) |
|
|
|
{ |
|
|
|
companyIBLL.VirtualDelete(keyValue); |
|
|
|
return Success("删除成功!", "公司信息", OperationType.Delete, keyValue, ""); |
|
|
|
var list = companyIBLL.GetList().Where(x => x.F_ParentId == keyValue && x.F_EnabledMark == 1 && x.F_DeleteMark == 0); |
|
|
|
if (list.Count() > 0) |
|
|
|
{ |
|
|
|
return Fail("删除失败!拥有下辖项不可直接删除"); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
companyIBLL.VirtualDelete(keyValue); |
|
|
|
return Success("删除成功!", "公司信息", OperationType.Delete, keyValue, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
} |