using Tiobon.Core.IServices; using Tiobon.Core.Model.Models; using Tiobon.Core.Services.BASE; using Tiobon.Core.IRepository.Base; using Tiobon.Core.Common.Caches; namespace Tiobon.Core.Services { /// /// 考核指标 (服务) /// public class Ghrp_PerformanceItemServices : BaseServices, IGhrp_PerformanceItemServices { private readonly IBaseRepository _dal; public Ghrp_PerformanceItemServices(ICaching caching, IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; base._caching = caching; } public override async Task> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) { var result = await base.QueryFilterPage(filter, condition, IsEnable); result.result.DT_TableDataT1.ForEach(async x => { x.ItemType1 = await GetParaLabel("PerformanceItemType1", x.ItemType1); x.ItemType2 = await GetParaLabel("PerformanceItemType2", x.ItemType2); x.ItemType3 = await GetParaLabel("PerformanceItemType3", x.ItemType3); x.ItemKind = await GetParaLabel("PerformanceItemKind", x.ItemKind); x.DeptType = await GetParaLabel("PerformanceDeptType", x.DeptType); x.Tag1 = await GetParaLabel("PerformanceTag1", x.Tag1); x.Tag2 = await GetParaLabel("PerformanceTag2", x.Tag2); x.Tag3 = await GetParaLabel("PerformanceTag3", x.Tag3); }); return result; } } }