用户添加报错修改
This commit is contained in:
parent
a99df420ac
commit
93ab8a2858
@ -532,7 +532,7 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
{
|
{
|
||||||
//var allUsers = this.GetEntities<T_FM_USER>(t => t.IS_DELETED == false, null, "Nav_ApproveRole");
|
//var allUsers = this.GetEntities<T_FM_USER>(t => t.IS_DELETED == false, null, "Nav_ApproveRole");
|
||||||
var isAdd = this.GetEntity<T_FM_USER>(entity.ID.ToString(), "Nav_ApproveRole", "Nav_BelongRoles");
|
var isAdd = this.GetEntity<T_FM_USER>(entity.ID.ToString(), "Nav_ApproveRole", "Nav_BelongRoles");
|
||||||
var dbRuleStr = string.Join(',', isAdd.Nav_BelongRoles.OrderBy(x => x.BELONG_ROLE_ID).Select(x => x.BELONG_ROLE_ID).Distinct().ToList());
|
string dbRuleStr = string.Empty;
|
||||||
var userList = new List<T_FM_USER>();
|
var userList = new List<T_FM_USER>();
|
||||||
entity.CODE = entity.CODE.ToUpper();
|
entity.CODE = entity.CODE.ToUpper();
|
||||||
if (entity.ENTRYTIME == DateTime.Parse("0001/1/1 0:00:00"))
|
if (entity.ENTRYTIME == DateTime.Parse("0001/1/1 0:00:00"))
|
||||||
@ -679,6 +679,7 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
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();
|
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);
|
var isRepeat = userList.FirstOrDefault(t => t.CODE == entity.CODE);
|
||||||
if (isRepeat != null)
|
if (isRepeat != null)
|
||||||
@ -1161,7 +1162,7 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
if (dbRuleStr.CompareTo(nowRules) != 0)
|
if (dbRuleStr.CompareTo(nowRules) != 0)
|
||||||
{
|
{
|
||||||
var notificationService = ServiceLocator.Instance.GetService<IFMNotificatoinService>();
|
var notificationService = ServiceLocator.Instance.GetService<IFMNotificatoinService>();
|
||||||
notificationService.MenusChangeNotice(new List<Guid>() { isAdd.ID },WebSocketClientTypeEnum.WEB后台);
|
notificationService.MenusChangeNotice(new List<Guid>() { isAdd.ID }, WebSocketClientTypeEnum.WEB后台);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user