diff --git a/YD_Event.Application/Client/Dtos/EventClientDtos.cs b/YD_Event.Application/Client/Dtos/EventClientDtos.cs index 9b817ed..5c9b29c 100644 --- a/YD_Event.Application/Client/Dtos/EventClientDtos.cs +++ b/YD_Event.Application/Client/Dtos/EventClientDtos.cs @@ -180,6 +180,11 @@ public class EventDetailDto : EventListDto /// 项目列表 /// public List Projects { get; set; } + + /// + /// 上级项目类型名称 + /// + public string? ParentProjectTypeName { get; set; } } /// diff --git a/YD_Event.Application/Client/EventClientController.cs b/YD_Event.Application/Client/EventClientController.cs index 4a1816e..c4eb00a 100644 --- a/YD_Event.Application/Client/EventClientController.cs +++ b/YD_Event.Application/Client/EventClientController.cs @@ -26,6 +26,7 @@ public class EventClientController : IDynamicApiController private readonly ISqlSugarRepository _unitRepository; private readonly ISqlSugarRepository _personRepository; private readonly ISqlSugarRepository _limitRepository; + private readonly ISqlSugarRepository _projectTypeRepository; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IIdGenerator _idGenerator; @@ -40,6 +41,7 @@ public class EventClientController : IDynamicApiController ISqlSugarRepository unitRepository, ISqlSugarRepository personRepository, ISqlSugarRepository limitRepository, + ISqlSugarRepository projectTypeRepository, IHttpContextAccessor httpContextAccessor, IIdGenerator idGenerator) { @@ -53,6 +55,7 @@ public class EventClientController : IDynamicApiController _unitRepository = unitRepository; _personRepository = personRepository; _limitRepository = limitRepository; + _projectTypeRepository = projectTypeRepository; _httpContextAccessor = httpContextAccessor; _idGenerator = idGenerator; } @@ -179,6 +182,7 @@ public class EventClientController : IDynamicApiController .Select((p, t) => new { p.Id, p.Name, + ProjectTypeId = t.Id, TypeName = t.Name }) .ToListAsync(); @@ -186,6 +190,24 @@ public class EventClientController : IDynamicApiController var groups = await _groupRepository.AsQueryable() .Where(g => projectIds.Contains(g.ProjectId) && !g.DeleteMark) .ToListAsync(); + + // 获取所有项目类型 + var allProjectTypes = await _projectTypeRepository.AsQueryable() + .Where(t => !t.DeleteMark && t.Status == AvailabilityStatus.Enable) + .ToListAsync(); + + // 获取上级项目类型名称(如果有项目,取第一个项目的上级类型名称) + string? parentProjectTypeName = null; + if (baseProjects.Any()) + { + var firstProject = baseProjects.First(); + var currentProjectType = allProjectTypes.FirstOrDefault(t => t.Id == firstProject.ProjectTypeId); + if (currentProjectType != null && currentProjectType.ParentId > 0) + { + var parentProjectType = allProjectTypes.FirstOrDefault(t => t.Id == currentProjectType.ParentId); + parentProjectTypeName = parentProjectType?.Name; + } + } // 获取单位 var units = await _unitRepository.AsQueryable() @@ -221,6 +243,7 @@ public class EventClientController : IDynamicApiController IndividualProjectLimit = limit?.IndividualProjectLimit ?? 0, TeamProjectLimit = limit?.TeamProjectLimit ?? 0, + ParentProjectTypeName = parentProjectTypeName, Units = units.Select(u => new EventUnitDto { diff --git a/YD_Event.Application/Team/Dtos/TeamDtos.cs b/YD_Event.Application/Team/Dtos/TeamDtos.cs index ae29c6c..77e4da5 100644 --- a/YD_Event.Application/Team/Dtos/TeamDtos.cs +++ b/YD_Event.Application/Team/Dtos/TeamDtos.cs @@ -147,4 +147,14 @@ public class TeamMemberOutput /// 联系电话 /// public string? Mobile { get; set; } + + /// + /// 性别 + /// + public Gender Gender { get; set; } + + /// + /// 出生日期 + /// + public DateTime? BirthDate { get; set; } } diff --git a/YD_Event.Application/Team/TeamService.cs b/YD_Event.Application/Team/TeamService.cs index 446f3a7..c92a2e0 100644 --- a/YD_Event.Application/Team/TeamService.cs +++ b/YD_Event.Application/Team/TeamService.cs @@ -92,7 +92,9 @@ public class TeamService : BaseService, IDynamicApiControlle UserId = m.UserId, Name = u.Name, Mobile = u.Mobile, - PersonType = m.PersonType + PersonType = m.PersonType, + Gender = u.Gender, + BirthDate = u.BirthDate }) .ToListAsync(); diff --git a/YD_Event.Application/YD_Event.Application.xml b/YD_Event.Application/YD_Event.Application.xml index eabde81..310114b 100644 --- a/YD_Event.Application/YD_Event.Application.xml +++ b/YD_Event.Application/YD_Event.Application.xml @@ -1665,6 +1665,11 @@ 项目列表 + + + 上级项目类型名称 + + 赛事项目DTO @@ -8254,6 +8259,16 @@ 联系电话 + + + 性别 + + + + + 出生日期 + + 团队管理服务