add 增加WorkGridCode优先使用
This commit is contained in:
@@ -243,7 +243,11 @@ public class WorkGridScheduleService : IWorkGridScheduleService
|
||||
public async Task<Pagination<WorkGridScheduleAttendancePageResponse>> GetAttendancePageAsync(WorkGridScheduleAttendancePageRequest request)
|
||||
{
|
||||
var jinkoCode = _currentUser.GetUserClaim(UserClaimConstants.JinkoCode);
|
||||
var workGrid = await _dbContext.Queryable<WorkGridEntity>().Where(x => x.LeaderUserCode == jinkoCode).SingleAsync();
|
||||
var workGrid = await _dbContext.Queryable<WorkGridEntity>()
|
||||
.WhereIF(request.WorkGridCode.HasValue, x => x.Code == request.WorkGridCode)
|
||||
.WhereIF(request.WorkGridCode.HasValue == false, x => x.LeaderUserCode == jinkoCode)
|
||||
.SingleAsync();
|
||||
|
||||
if (workGrid == null)
|
||||
{
|
||||
return new Pagination<WorkGridScheduleAttendancePageResponse>
|
||||
|
||||
Reference in New Issue
Block a user