fix 工号匹配

This commit is contained in:
2024-06-20 14:26:24 +08:00
parent 9e762e903b
commit bd04be5685

View File

@@ -30,10 +30,7 @@ public class GainfoGroupService : IGainfoGroupService
.ToListAsync();
var tops = gainfoGroups.Where(x => !x.PCode.HasValue).ToList();
tops.ForEach(x =>
{
RecursionGetNext(x, gainfoGroups);
});
tops.ForEach(x => { RecursionGetNext(x, gainfoGroups); });
return tops;
}
@@ -103,7 +100,10 @@ public class GainfoGroupService : IGainfoGroupService
var relations = await _dbContext.Queryable<GainfoGroupRelationshipEntity>().Where(x => x.GroupCode == request.GroupCode).ToListAsync();
await _dbContext.DeleteReallyAsync(relations);
request.UserNos = await _dbContext.Queryable<GainfoEntity>().Where(x => request.UserNos.Contains(x.No)).Select(x => x.No).ToListAsync();
request.UserNos = await _dbContext.Queryable<GainfoEntity>().Where(x => request.UserNos.Contains(x.No) || request.UserNos.Contains(x.Code))
.Select(x => x.No)
.ToListAsync();
var entities = request.UserNos.Select(x => new GainfoGroupRelationshipEntity
{
GroupCode = request.GroupCode,
@@ -111,7 +111,6 @@ public class GainfoGroupService : IGainfoGroupService
}).ToList();
await _dbContext.InsertAsync(entities);
}, null);
}
@@ -151,7 +150,6 @@ public class GainfoGroupService : IGainfoGroupService
}
return false;
}).ToList();
current.Next = next;
foreach (var item in next)