fix 同步移除排班数据
This commit is contained in:
@@ -114,6 +114,7 @@ public class WorkGridsController : ControllerBase
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("user/remove")]
|
||||
[Transactional]
|
||||
public async Task RemoveUsersFromWorkGridAsync(WorkGridUserRemoveRequest request)
|
||||
{
|
||||
await _workGridService.RemoveAsync(request);
|
||||
|
||||
@@ -171,6 +171,11 @@ public class WorkGridService : IWorkGridService
|
||||
.Where(x => request.UserCodes.Contains(x.UserCode))
|
||||
.ToListAsync();
|
||||
|
||||
var workGridSchedules = await _dbContext.Queryable<WorkGridScheduleEntity>().Where(x => x.WorkGridCode == myWorkGrid.Code)
|
||||
.Where(x => request.UserCodes.Contains(x.UserCode))
|
||||
.ToListAsync();
|
||||
|
||||
await _dbContext.DeleteReallyAsync(workGridUsers);
|
||||
await _dbContext.DeleteReallyAsync(workGridSchedules);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user