@ -206,5 +206,24 @@ namespace Tiobon.Core.Model.Models
/// 内置
/// </summary>
public int? BuiltIn { get; set; }
public string ItemStatus
{
get
DateTime now = DateTime.Now;
if (now < BeginDate)
return "2"; // 未生效
}
if (EndDate.HasValue)
return now > EndDate.Value ? "0" : "1"; // 0已失效 1生效中
return "1"; //生效中
@ -34,23 +34,4 @@ public class Ghrp_PerformanceItemDto : Ghrp_PerformanceItem
public string BeginDateStr => BeginDate?.ToString("yyyy-MM-dd") ?? string.Empty;
public string EndDateStr => EndDate?.ToString("yyyy-MM-dd") ?? string.Empty;
@ -22,6 +22,7 @@ namespace Tiobon.Core.Services
public override async Task<ServicePageResult<Ghrp_PerformanceItemDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true)
var result = await base.QueryFilterPage(filter, condition, IsEnable);
result.result.DT_TableDataT1.ForEach(async x =>