空号不能重复判断
This commit is contained in:
parent
b2e17409a8
commit
67312a9ff7
@ -558,13 +558,13 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
{
|
||||
throw new Exception("岗位不允许为空!");
|
||||
}
|
||||
|
||||
var isRepeat = allUsers.FirstOrDefault(t => t.CODE == entity.CODE);
|
||||
if (isRepeat != null)
|
||||
this.ThrowError("050001");
|
||||
if (isAdd == null)
|
||||
{
|
||||
userList = this.GetEntities<T_FM_USER>(t => (t.CODE == entity.CODE || t.APPROVE_ROLE_ID == entity.APPROVE_ROLE_ID) && t.ORG_ID == entity.ORG_ID, null, "Nav_Department").ToList();
|
||||
var isRepeat = userList.FirstOrDefault(t => t.CODE == entity.CODE);
|
||||
if (isRepeat != null)
|
||||
this.ThrowError("050001");
|
||||
|
||||
if (entity.ORG_ID != Guid.Parse("b043b28b-bbc3-c452-6052-4fba1457abfa"))
|
||||
{
|
||||
#region //
|
||||
@ -681,9 +681,9 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
{
|
||||
dbRuleStr = string.Join(',', isAdd.Nav_BelongRoles.OrderBy(x => x.BELONG_ROLE_ID).Select(x => x.BELONG_ROLE_ID).Distinct().ToList());
|
||||
userList = this.GetEntities<T_FM_USER>(t => (t.CODE == entity.CODE || t.APPROVE_ROLE_ID == entity.APPROVE_ROLE_ID) && t.ID != entity.ID && t.ORG_ID == entity.ORG_ID, null, "Nav_Department").ToList();
|
||||
var isRepeat = userList.FirstOrDefault(t => t.CODE == entity.CODE);
|
||||
if (isRepeat != null)
|
||||
this.ThrowError("050001");
|
||||
//var isRepeat = userList.FirstOrDefault(t => t.CODE == entity.CODE);
|
||||
//if (isRepeat != null)
|
||||
// this.ThrowError("050001");
|
||||
}
|
||||
if (entity.DEPARTMENT_ID == null)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user