fix 补充被分配人校验
This commit is contained in:
@@ -161,6 +161,11 @@ public class WorkGridService : IWorkGridService
|
||||
/// <inheritdoc />
|
||||
public async Task ChangeAsync(string from, string to)
|
||||
{
|
||||
if (await _dbContext.Queryable<WorkGridEntity>().Where(x => x.LeaderUserCode == to).AnyAsync())
|
||||
{
|
||||
true.ThrowIfTrue($"{to}已存在网格,不可操作");
|
||||
}
|
||||
|
||||
var workGrid = await _dbContext.Queryable<WorkGridEntity>().Where(x => x.LeaderUserCode == from).SingleAsync();
|
||||
workGrid.ThrowIfNull($"{from}管理的网格不存在");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user