赛事教练筛选

This commit is contained in:
马梓彭 2026-04-14 15:20:12 +08:00
parent 5a86989ec5
commit f7aedcce91
2 changed files with 22 additions and 4 deletions

View File

@ -140,13 +140,18 @@ public class CoachLeaderListOutput
/// <summary> /// <summary>
/// 年龄 /// 年龄
/// </summary> /// </summary>
public int Age { get; set; } public int? Age { get; set; }
/// <summary> /// <summary>
/// 性别 /// 性别
/// </summary> /// </summary>
public string Gender { get; set; } public string Gender { get; set; }
/// <summary>
/// 出生日期
/// </summary>
public DateTime? BirthDate { get; set; }
/// <summary> /// <summary>
/// 身份证号 /// 身份证号
/// </summary> /// </summary>

View File

@ -10,6 +10,8 @@ using SqlSugar;
using OfficeOpenXml; using OfficeOpenXml;
using OfficeOpenXml.Style; using OfficeOpenXml.Style;
using System.Drawing; using System.Drawing;
using static SKIT.FlurlHttpClient.Wechat.TenpayV3.Models.DepositMarketingMemberCardOpenCardCodesResponse.Types;
using YD_Event.Application.AppUser.Dtos;
namespace YD_Event.Application.Event; namespace YD_Event.Application.Event;
@ -180,13 +182,24 @@ public class EventScoreService : BaseService<EventResult>, ITransient
Id = p.Id, Id = p.Id,
Name = p.Name, Name = p.Name,
Age = p.Age, Age = p.Age,
Gender = p.Gender.Description(), IdCardNumber = p.IdCardImageUrl,
IdCardNumber = p.IdCard, Mobile = p.Mobile,
Mobile = p.Phone,
CertificateId = 0 // 需要单独查询,此处先设为0 CertificateId = 0 // 需要单独查询,此处先设为0
}) })
.ToPagedListAsync(input); .ToPagedListAsync(input);
foreach (var item in pageResult.Rows)
{
if (item.Age.HasValue)
{
continue;
}
if (item.BirthDate.HasValue)
{
item.Age = MemberOutput.CalculateAgeFromBirthDate(item.BirthDate);
}
}
return pageResult; return pageResult;
} }