fix 档案组分配人员控制
This commit is contained in:
@@ -53,7 +53,7 @@ public class GainfoGroupService : IGainfoGroupService
|
||||
{
|
||||
_dbContext.Client.QueryFilter.Restore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!request.Id.HasValue)
|
||||
{
|
||||
@@ -86,6 +86,9 @@ public class GainfoGroupService : IGainfoGroupService
|
||||
|
||||
public async Task AssignGainfosAsync(GainfoAssignRequest request)
|
||||
{
|
||||
var existsNextGroup = await _dbContext.Queryable<GainfoGroupEntity>().Where(x => x.PCode == request.GroupCode).AnyAsync();
|
||||
existsNextGroup.ThrowIfTrue("存在下级分组,无法分配人员");
|
||||
|
||||
var relations = await _dbContext.Queryable<GainfoGroupRelationshipEntity>().Where(x => x.GroupCode == request.GroupCode).ToListAsync();
|
||||
await _dbContext.DeleteReallyAsync(relations);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user