|
|
@@ -133,10 +133,15 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers |
|
|
|
public ActionResult SaveForm(string keyValue, PostEntity entity) |
|
|
|
{ |
|
|
|
var list = postIBLL.GetList(entity.F_CompanyId); |
|
|
|
if (list.Any(a => a.F_EnCode == entity.F_EnCode)) |
|
|
|
if (string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode)) |
|
|
|
{ |
|
|
|
return Fail("岗位编号重复"); |
|
|
|
return Fail("岗位编号重复!"); |
|
|
|
} |
|
|
|
else if (!string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode && a.F_PostId != keyValue)) |
|
|
|
{ |
|
|
|
return Fail("岗位编号重复!"); |
|
|
|
} |
|
|
|
|
|
|
|
postIBLL.SaveEntity(keyValue, entity); |
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|