|
@@ -37,6 +37,7 @@ public class UserController : BaseController
|
|
private readonly IAccountRepository _accountRepository;
|
|
private readonly IAccountRepository _accountRepository;
|
|
private readonly IAccountDomainService _accountDomainService;
|
|
private readonly IAccountDomainService _accountDomainService;
|
|
private readonly IOptions<IdentityConfiguration> _identityConfigurationAccessor;
|
|
private readonly IOptions<IdentityConfiguration> _identityConfigurationAccessor;
|
|
|
|
+ private readonly ITelRestRepository _telRestRepository;
|
|
|
|
|
|
public UserController(
|
|
public UserController(
|
|
ISessionContext sessionContext,
|
|
ISessionContext sessionContext,
|
|
@@ -49,7 +50,8 @@ public class UserController : BaseController
|
|
IMapper mapper,
|
|
IMapper mapper,
|
|
IAccountRepository accountRepository,
|
|
IAccountRepository accountRepository,
|
|
IAccountDomainService accountDomainService,
|
|
IAccountDomainService accountDomainService,
|
|
- IOptions<IdentityConfiguration> identityConfigurationAccessor)
|
|
|
|
|
|
+ IOptions<IdentityConfiguration> identityConfigurationAccessor,
|
|
|
|
+ ITelRestRepository telRestRepository)
|
|
{
|
|
{
|
|
_sessionContext = sessionContext;
|
|
_sessionContext = sessionContext;
|
|
_userDomainService = userDomainService;
|
|
_userDomainService = userDomainService;
|
|
@@ -62,8 +64,37 @@ public class UserController : BaseController
|
|
_accountRepository = accountRepository;
|
|
_accountRepository = accountRepository;
|
|
_accountDomainService = accountDomainService;
|
|
_accountDomainService = accountDomainService;
|
|
_identityConfigurationAccessor = identityConfigurationAccessor;
|
|
_identityConfigurationAccessor = identityConfigurationAccessor;
|
|
|
|
+ _telRestRepository = telRestRepository;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ #region 小休申请
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 小休申请列表
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpGet("rest-apply-paged")]
|
|
|
|
+ public async Task<PagedDto<RestDto>> RestApplyList([FromQuery] RestPagedDto dto)
|
|
|
|
+ {
|
|
|
|
+ var (total, items) = await _telRestRepository.Queryable(includeDeleted: false)
|
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.KeyWords), d => d.UserName.Contains(dto.KeyWords) || d.StaffNo.Contains(dto.KeyWords))
|
|
|
|
+ .WhereIF(dto.BeginTime != null && dto.BeginTime != DateTime.MinValue, d => d.CreationTime >= dto.BeginTime)
|
|
|
|
+ .WhereIF(dto.EndTime != null && dto.EndTime != DateTime.MinValue, d => d.CreationTime <= dto.EndTime)
|
|
|
|
+ .OrderByDescending(d => d.CreationTime)
|
|
|
|
+ .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
|
+
|
|
|
|
+ return new PagedDto<RestDto>(total, _mapper.Map<IReadOnlyList<RestDto>>(items));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 上班
|
|
/// 上班
|
|
/// </summary>
|
|
/// </summary>
|