using Microsoft.Extensions.Logging; namespace Tiobon.Core.Services; public partial class ReportServices : BaseServices>, IReportServices { IHttpContextAccessor _httpContextAccessor; ILogger _logger; public ICaching _caching; private readonly IGhra_StaffServices _staffServices; public ReportServices(ILogger logger, IHttpContextAccessor httpContextAccessor, ICaching caching = null, IGhra_StaffServices staffServices = null) { _logger = logger; _httpContextAccessor = httpContextAccessor; _caching = caching; _staffServices = staffServices; } #region 获取新入职人员列表 /// /// 获取新入职人员列表 /// /// /// /// /// public async Task> QueryNewStaffAsync(QueryBody filter, string condition, bool? IsEnable = true) { int month = 3; var config = await Db.Queryable().Where(x => x.ConfigCode == "New_Staff_Month").FirstAsync(); if (config != null) { try { month = Convert.ToInt32(config.ConfigValue); } catch (Exception) { } } var dateTime = DateTime.Now.AddMonths(-month); condition = $"Indate >= '{DateTimeHelper.ConvertToDayString(dateTime)}'"; var result = await _staffServices.QueryFilterPage(filter, condition, IsEnable); return result; } #endregion }