显示问题修复
This commit is contained in:
parent
7d8d1c2426
commit
c559033720
@ -442,7 +442,7 @@ public class EventClientController : IDynamicApiController
|
|||||||
feeConfigDto.ProjectPrices = new Dictionary<long, decimal>();
|
feeConfigDto.ProjectPrices = new Dictionary<long, decimal>();
|
||||||
foreach (var ep in eventProjects)
|
foreach (var ep in eventProjects)
|
||||||
{
|
{
|
||||||
feeConfigDto.ProjectPrices[ep.Id] = ep.Price / 100m;
|
feeConfigDto.ProjectPrices[ep.Id] = ep.Price;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -499,7 +499,7 @@ public class EventClientController : IDynamicApiController
|
|||||||
Name = bp?.Name ?? "",
|
Name = bp?.Name ?? "",
|
||||||
TypeName = bp?.ProjectType.Description() ?? "",
|
TypeName = bp?.ProjectType.Description() ?? "",
|
||||||
ProjectType = (long)(bp?.ProjectType ?? 0),
|
ProjectType = (long)(bp?.ProjectType ?? 0),
|
||||||
Fee = ep.Price / 100m,
|
Fee = ep.Price,
|
||||||
ProjectLimitCount = pl?.LimitCount,
|
ProjectLimitCount = pl?.LimitCount,
|
||||||
Groups = epGroups.Select(eg =>
|
Groups = epGroups.Select(eg =>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -212,6 +212,16 @@ public class EventRegistrationService : BaseService<EventRegistration>, ITransie
|
|||||||
// 获取当前报名的所有人员
|
// 获取当前报名的所有人员
|
||||||
var regPersons = persons.Where(p => p.RegistrationId == dto.Id).ToList();
|
var regPersons = persons.Where(p => p.RegistrationId == dto.Id).ToList();
|
||||||
|
|
||||||
|
// 计算去重后的人数(按UserId去重)
|
||||||
|
var uniqueUserIds = regPersons
|
||||||
|
.Where(p => p.PersonType == PersonType.Athlete && p.UserId > 0)
|
||||||
|
.Select(p => p.UserId)
|
||||||
|
.Distinct()
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
// 更新TotalPersonCount为去重后的人数
|
||||||
|
dto.TotalPersonCount = uniqueUserIds.Count > 0 ? uniqueUserIds.Count : regPersons.Count(p => p.PersonType == PersonType.Athlete);
|
||||||
|
|
||||||
// 根据报名记录的 MerchantCertificationId 获取单位名称
|
// 根据报名记录的 MerchantCertificationId 获取单位名称
|
||||||
if (dto.MerchantCertificationId.HasValue &&
|
if (dto.MerchantCertificationId.HasValue &&
|
||||||
merchantNameDict.TryGetValue(dto.MerchantCertificationId.Value, out var unitName))
|
merchantNameDict.TryGetValue(dto.MerchantCertificationId.Value, out var unitName))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user