项目完成人数改为范围值和单值均可
This commit is contained in:
parent
82c000e3f5
commit
a09be1975d
@ -451,6 +451,31 @@ public class EventProjectDto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? ProjectLimitCount { get; set; }
|
public int? ProjectLimitCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数模式(0=单一值,1=范围值)
|
||||||
|
/// </summary>
|
||||||
|
public int CompletionCountType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数(单一值模式时有效)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最小值(范围值模式时有效)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最大值(范围值模式时有效)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMax { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数显示文本(如"5人"或"3-7人")
|
||||||
|
/// </summary>
|
||||||
|
public string? CompletionCountDisplay { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 组别列表
|
/// 组别列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -342,7 +342,11 @@ public class EventClientController : IDynamicApiController
|
|||||||
.Select(p => new {
|
.Select(p => new {
|
||||||
p.Id,
|
p.Id,
|
||||||
p.Name,
|
p.Name,
|
||||||
p.ProjectType
|
p.ProjectType,
|
||||||
|
p.CompletionCountType,
|
||||||
|
p.CompletionCount,
|
||||||
|
p.CompletionCountMin,
|
||||||
|
p.CompletionCountMax
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
@ -496,6 +500,23 @@ public class EventClientController : IDynamicApiController
|
|||||||
var bp = baseProjects.FirstOrDefault(b => b.Id == ep.ProjectId);
|
var bp = baseProjects.FirstOrDefault(b => b.Id == ep.ProjectId);
|
||||||
var pl = projectLimits.FirstOrDefault(x => x.ProjectId == ep.Id);
|
var pl = projectLimits.FirstOrDefault(x => x.ProjectId == ep.Id);
|
||||||
var epGroups = eventProjectGroups.Where(g => g.EventProjectId == ep.Id).ToList();
|
var epGroups = eventProjectGroups.Where(g => g.EventProjectId == ep.Id).ToList();
|
||||||
|
|
||||||
|
// 生成完成人数显示文本
|
||||||
|
string completionCountDisplay = "";
|
||||||
|
if (bp != null)
|
||||||
|
{
|
||||||
|
if (bp.CompletionCountType == 1)
|
||||||
|
{
|
||||||
|
var min = bp.CompletionCountMin ?? 0;
|
||||||
|
var max = bp.CompletionCountMax ?? 0;
|
||||||
|
completionCountDisplay = $"{min}-{max}人";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
completionCountDisplay = $"{bp.CompletionCount}人";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new EventProjectDto
|
return new EventProjectDto
|
||||||
{
|
{
|
||||||
Id = ep.Id,
|
Id = ep.Id,
|
||||||
@ -504,6 +525,11 @@ public class EventClientController : IDynamicApiController
|
|||||||
ProjectType = (long)(bp?.ProjectType ?? 0),
|
ProjectType = (long)(bp?.ProjectType ?? 0),
|
||||||
Fee = ep.Price,
|
Fee = ep.Price,
|
||||||
ProjectLimitCount = pl?.LimitCount,
|
ProjectLimitCount = pl?.LimitCount,
|
||||||
|
CompletionCountType = bp?.CompletionCountType ?? 0,
|
||||||
|
CompletionCount = bp?.CompletionCount,
|
||||||
|
CompletionCountMin = bp?.CompletionCountMin,
|
||||||
|
CompletionCountMax = bp?.CompletionCountMax,
|
||||||
|
CompletionCountDisplay = completionCountDisplay,
|
||||||
Groups = epGroups.Select(eg =>
|
Groups = epGroups.Select(eg =>
|
||||||
{
|
{
|
||||||
var baseGroup = baseGroups.FirstOrDefault(bg => bg.Id == eg.ProjectGroupId);
|
var baseGroup = baseGroups.FirstOrDefault(bg => bg.Id == eg.ProjectGroupId);
|
||||||
|
|||||||
@ -365,6 +365,31 @@ public class EventProjectInput
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? DurationSeconds { get; set; }
|
public int? DurationSeconds { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数模式 (显示用) 0=单一值, 1=范围值
|
||||||
|
/// </summary>
|
||||||
|
public int CompletionCountType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数 (显示用) 单一值模式时有效
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最小值 (显示用) 范围值模式时有效
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最大值 (显示用) 范围值模式时有效
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMax { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数显示文本 (显示用) 如:5人 或 3-5人
|
||||||
|
/// </summary>
|
||||||
|
public string? CompletionCountDisplay { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 项目费用(Step 4)
|
/// 项目费用(Step 4)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -397,6 +397,26 @@ public class UserEventProjectListOutput
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int CompletionCount { get; set; }
|
public int CompletionCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数模式 (0=单一值, 1=范围值)
|
||||||
|
/// </summary>
|
||||||
|
public int CompletionCountType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最小值(范围值模式)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最大值(范围值模式)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMax { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数显示文本(如"5人"或"3-7人")
|
||||||
|
/// </summary>
|
||||||
|
public string? CompletionCountDisplay { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 项目类型
|
/// 项目类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -207,12 +207,28 @@ public class EventService : BaseService<EventInfo>, ITransient
|
|||||||
Name = baseProj?.Name,
|
Name = baseProj?.Name,
|
||||||
ProjectTypeId = (long?)baseProj?.ProjectType,
|
ProjectTypeId = (long?)baseProj?.ProjectType,
|
||||||
DurationMinutes = baseProj?.DurationMinutes,
|
DurationMinutes = baseProj?.DurationMinutes,
|
||||||
DurationSeconds = baseProj?.DurationSeconds
|
DurationSeconds = baseProj?.DurationSeconds,
|
||||||
|
// 填充完成人数相关字段
|
||||||
|
CompletionCountType = baseProj?.CompletionCountType ?? 0,
|
||||||
|
CompletionCount = baseProj?.CompletionCount,
|
||||||
|
CompletionCountMin = baseProj?.CompletionCountMin,
|
||||||
|
CompletionCountMax = baseProj?.CompletionCountMax
|
||||||
};
|
};
|
||||||
|
|
||||||
if (baseProj != null)
|
if (baseProj != null)
|
||||||
{
|
{
|
||||||
dto.ProjectTypeName = baseProj.ProjectType.Description();
|
dto.ProjectTypeName = baseProj.ProjectType.Description();
|
||||||
|
// 生成完成人数显示文本
|
||||||
|
if (baseProj.CompletionCountType == 0)
|
||||||
|
{
|
||||||
|
dto.CompletionCountDisplay = baseProj.CompletionCount > 0 ? $"{baseProj.CompletionCount}人" : "0人";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var min = baseProj.CompletionCountMin ?? 0;
|
||||||
|
var max = baseProj.CompletionCountMax ?? 0;
|
||||||
|
dto.CompletionCountDisplay = $"{min}-{max}人";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var epGroups = eventProjectGroups.Where(g => g.EventProjectId == ep.Id).ToList();
|
var epGroups = eventProjectGroups.Where(g => g.EventProjectId == ep.Id).ToList();
|
||||||
|
|||||||
@ -1543,7 +1543,8 @@ public class UnifiedRegistrationService : ITransient
|
|||||||
|
|
||||||
// 获取项目限报配置
|
// 获取项目限报配置
|
||||||
var projectLimit = projectLimits.FirstOrDefault(pl => pl.ProjectId == eventProject.Id);
|
var projectLimit = projectLimits.FirstOrDefault(pl => pl.ProjectId == eventProject.Id);
|
||||||
if (projectLimit == null) continue;
|
// 限报数量 <= 0 表示不限制,跳过验证
|
||||||
|
if (projectLimit == null || projectLimit.LimitCount <= 0) continue;
|
||||||
|
|
||||||
if (isTeamProject)
|
if (isTeamProject)
|
||||||
{
|
{
|
||||||
@ -2026,19 +2027,36 @@ public class UnifiedRegistrationService : ITransient
|
|||||||
var project = projects.FirstOrDefault(p => p.Id == eventProject.ProjectId);
|
var project = projects.FirstOrDefault(p => p.Id == eventProject.ProjectId);
|
||||||
if (project == null) continue;
|
if (project == null) continue;
|
||||||
|
|
||||||
// 判断是否为团队项目
|
// ==================== 项目完成人数验证 ====================
|
||||||
var isTeamProject = project.IsTeamProject();
|
// 只要项目配置了完成人数(单一值或范围值),就进行验证
|
||||||
|
// 不再依赖 isTeamProject 判断,确保所有类型的项目都能正确验证
|
||||||
|
bool hasValidCompletionConfig = false;
|
||||||
|
int completionMin = 0;
|
||||||
|
int completionMax = 0;
|
||||||
|
|
||||||
// ==================== 项目组别条件判断逻辑 ====================
|
if (project.CompletionCountType == 0)
|
||||||
// 当且仅当某个项目组别中已选择至少一名人员时,才对该项目组别执行后续条件判断流程
|
|
||||||
// 个人项目不进行完成人数限制,仅适用项目报名限制规则
|
|
||||||
if (!isTeamProject)
|
|
||||||
{
|
{
|
||||||
continue;
|
// 单一值模式
|
||||||
|
if (project.CompletionCount > 0)
|
||||||
|
{
|
||||||
|
hasValidCompletionConfig = true;
|
||||||
|
completionMin = project.CompletionCount;
|
||||||
|
completionMax = project.CompletionCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 范围值模式
|
||||||
|
if (project.CompletionCountMin.HasValue && project.CompletionCountMax.HasValue &&
|
||||||
|
project.CompletionCountMin.Value > 0 && project.CompletionCountMax.Value > 0)
|
||||||
|
{
|
||||||
|
hasValidCompletionConfig = true;
|
||||||
|
completionMin = project.CompletionCountMin.Value;
|
||||||
|
completionMax = project.CompletionCountMax.Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================== 团队项目完成人数验证 ====================
|
if (!hasValidCompletionConfig)
|
||||||
if (project.CompletionCount <= 0)
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2047,20 +2065,36 @@ public class UnifiedRegistrationService : ITransient
|
|||||||
if (teams.Count > 0)
|
if (teams.Count > 0)
|
||||||
{
|
{
|
||||||
// ========== 多团队模式 ==========
|
// ========== 多团队模式 ==========
|
||||||
// 对每个团队单独验证人数是否等于 CompletionCount
|
// 对每个团队单独验证人数是否在范围内(或等于单一值)
|
||||||
foreach (var team in teams)
|
foreach (var team in teams)
|
||||||
{
|
{
|
||||||
var teamMemberCount = team.Persons?.Count ?? 0;
|
var teamMemberCount = team.Persons?.Count ?? 0;
|
||||||
if (teamMemberCount != project.CompletionCount)
|
if (teamMemberCount < completionMin || teamMemberCount > completionMax)
|
||||||
{
|
{
|
||||||
string errorMessage;
|
string errorMessage;
|
||||||
if (teamMemberCount < project.CompletionCount)
|
if (completionMin == completionMax)
|
||||||
{
|
{
|
||||||
errorMessage = $"{project.Name}{GetTeamNumber(team.TeamIndex)}参赛人数错误(少{project.CompletionCount - teamMemberCount}人)";
|
// 单一值模式
|
||||||
|
if (teamMemberCount < completionMin)
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}{GetTeamNumber(team.TeamIndex)}参赛人数错误(少{completionMin - teamMemberCount}人)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}{GetTeamNumber(team.TeamIndex)}参赛人数错误(多{teamMemberCount - completionMax}人)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMessage = $"{project.Name}{GetTeamNumber(team.TeamIndex)}参赛人数错误(多{teamMemberCount - project.CompletionCount}人)";
|
// 范围值模式
|
||||||
|
if (teamMemberCount < completionMin)
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}{GetTeamNumber(team.TeamIndex)}参赛人数错误(最少{completionMin}人,当前{teamMemberCount}人)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}{GetTeamNumber(team.TeamIndex)}参赛人数错误(最多{completionMax}人,当前{teamMemberCount}人)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result.HasLimit = true;
|
result.HasLimit = true;
|
||||||
@ -2082,16 +2116,32 @@ public class UnifiedRegistrationService : ITransient
|
|||||||
.Distinct()
|
.Distinct()
|
||||||
.Count();
|
.Count();
|
||||||
|
|
||||||
if (totalAssignedMembers != project.CompletionCount)
|
if (totalAssignedMembers < completionMin || totalAssignedMembers > completionMax)
|
||||||
{
|
{
|
||||||
string errorMessage;
|
string errorMessage;
|
||||||
if (totalAssignedMembers < project.CompletionCount)
|
if (completionMin == completionMax)
|
||||||
{
|
{
|
||||||
errorMessage = $"{project.Name}参赛人数错误(少{project.CompletionCount - totalAssignedMembers}人)";
|
// 单一值模式
|
||||||
|
if (totalAssignedMembers < completionMin)
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}参赛人数错误(少{completionMin - totalAssignedMembers}人)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}参赛人数错误(多{totalAssignedMembers - completionMax}人)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMessage = $"{project.Name}参赛人数错误(多{totalAssignedMembers - project.CompletionCount}人)";
|
// 范围值模式
|
||||||
|
if (totalAssignedMembers < completionMin)
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}参赛人数错误(最少{completionMin}人,当前{totalAssignedMembers}人)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}参赛人数错误(最多{completionMax}人,当前{totalAssignedMembers}人)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result.HasLimit = true;
|
result.HasLimit = true;
|
||||||
|
|||||||
@ -330,12 +330,32 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient
|
|||||||
{
|
{
|
||||||
var p = baseProjects.FirstOrDefault(b => b.Id == ep.ProjectId);
|
var p = baseProjects.FirstOrDefault(b => b.Id == ep.ProjectId);
|
||||||
|
|
||||||
|
// 生成完成人数显示文本
|
||||||
|
string completionCountDisplay = "";
|
||||||
|
if (p != null)
|
||||||
|
{
|
||||||
|
if (p.CompletionCountType == 1)
|
||||||
|
{
|
||||||
|
var min = p.CompletionCountMin ?? 0;
|
||||||
|
var max = p.CompletionCountMax ?? 0;
|
||||||
|
completionCountDisplay = $"{min}-{max}人";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
completionCountDisplay = $"{p.CompletionCount}人";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var dto = new UserEventProjectListOutput
|
var dto = new UserEventProjectListOutput
|
||||||
{
|
{
|
||||||
Id = ep.Id,
|
Id = ep.Id,
|
||||||
Name = p?.Name ?? "",
|
Name = p?.Name ?? "",
|
||||||
Fee = ep.Price,
|
Fee = ep.Price,
|
||||||
CompletionCount = p?.CompletionCount ?? 0
|
CompletionCount = p?.CompletionCount ?? 0,
|
||||||
|
CompletionCountType = p?.CompletionCountType ?? 0,
|
||||||
|
CompletionCountMin = p?.CompletionCountMin,
|
||||||
|
CompletionCountMax = p?.CompletionCountMax,
|
||||||
|
CompletionCountDisplay = completionCountDisplay
|
||||||
};
|
};
|
||||||
|
|
||||||
if (p != null)
|
if (p != null)
|
||||||
@ -399,13 +419,33 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient
|
|||||||
{
|
{
|
||||||
var p = baseProjects.FirstOrDefault(b => b.Id == ep.ProjectId);
|
var p = baseProjects.FirstOrDefault(b => b.Id == ep.ProjectId);
|
||||||
|
|
||||||
|
// 生成完成人数显示文本
|
||||||
|
string completionCountDisplay = "";
|
||||||
|
if (p != null)
|
||||||
|
{
|
||||||
|
if (p.CompletionCountType == 1)
|
||||||
|
{
|
||||||
|
var min = p.CompletionCountMin ?? 0;
|
||||||
|
var max = p.CompletionCountMax ?? 0;
|
||||||
|
completionCountDisplay = $"{min}-{max}人";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
completionCountDisplay = $"{p.CompletionCount}人";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var dto = new UserEventProjectListOutput
|
var dto = new UserEventProjectListOutput
|
||||||
{
|
{
|
||||||
Id = ep.Id,
|
Id = ep.Id,
|
||||||
Name = p?.Name ?? "",
|
Name = p?.Name ?? "",
|
||||||
Fee = ep.Price,
|
Fee = ep.Price,
|
||||||
TeamSize = 1,
|
TeamSize = 1,
|
||||||
CompletionCount = p?.CompletionCount ?? 0
|
CompletionCount = p?.CompletionCount ?? 0,
|
||||||
|
CompletionCountType = p?.CompletionCountType ?? 0,
|
||||||
|
CompletionCountMin = p?.CompletionCountMin,
|
||||||
|
CompletionCountMax = p?.CompletionCountMax,
|
||||||
|
CompletionCountDisplay = completionCountDisplay
|
||||||
};
|
};
|
||||||
|
|
||||||
if (p != null)
|
if (p != null)
|
||||||
@ -1350,10 +1390,37 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient
|
|||||||
// 检查是多团队模式还是单团队模式
|
// 检查是多团队模式还是单团队模式
|
||||||
var hasMultipleTeams = groupMemberAssignment.Teams != null && groupMemberAssignment.Teams.Count > 0;
|
var hasMultipleTeams = groupMemberAssignment.Teams != null && groupMemberAssignment.Teams.Count > 0;
|
||||||
|
|
||||||
|
// ========== 获取完成人数配置 ==========
|
||||||
|
int completionMin = 0;
|
||||||
|
int completionMax = 0;
|
||||||
|
bool hasValidCompletionConfig = false;
|
||||||
|
|
||||||
|
if (project.CompletionCountType == 0)
|
||||||
|
{
|
||||||
|
// 单一值模式
|
||||||
|
if (project.CompletionCount > 0)
|
||||||
|
{
|
||||||
|
hasValidCompletionConfig = true;
|
||||||
|
completionMin = project.CompletionCount;
|
||||||
|
completionMax = project.CompletionCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 范围值模式
|
||||||
|
if (project.CompletionCountMin.HasValue && project.CompletionCountMax.HasValue &&
|
||||||
|
project.CompletionCountMin.Value > 0 && project.CompletionCountMax.Value > 0)
|
||||||
|
{
|
||||||
|
hasValidCompletionConfig = true;
|
||||||
|
completionMin = project.CompletionCountMin.Value;
|
||||||
|
completionMax = project.CompletionCountMax.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (hasMultipleTeams && isTeamProject)
|
if (hasMultipleTeams && isTeamProject)
|
||||||
{
|
{
|
||||||
// ========== 多团队模式验证 ==========
|
// ========== 多团队模式验证 ==========
|
||||||
// 验证每个团队的人数是否等于 CompletionCount
|
// 验证每个团队的人数是否在范围内(或等于单一值)
|
||||||
foreach (var team in groupMemberAssignment.Teams)
|
foreach (var team in groupMemberAssignment.Teams)
|
||||||
{
|
{
|
||||||
var teamMemberCount = team.MemberIds?.Distinct().Count() ?? 0;
|
var teamMemberCount = team.MemberIds?.Distinct().Count() ?? 0;
|
||||||
@ -1361,17 +1428,33 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient
|
|||||||
// 如果该团队没有选择任何人员,跳过验证
|
// 如果该团队没有选择任何人员,跳过验证
|
||||||
if (teamMemberCount == 0) continue;
|
if (teamMemberCount == 0) continue;
|
||||||
|
|
||||||
// 验证该团队的人数是否等于 CompletionCount
|
// 验证该团队的人数是否在有效范围内
|
||||||
if (project.CompletionCount > 0 && teamMemberCount != project.CompletionCount)
|
if (hasValidCompletionConfig && (teamMemberCount < completionMin || teamMemberCount > completionMax))
|
||||||
{
|
{
|
||||||
string errorMessage;
|
string errorMessage;
|
||||||
if (teamMemberCount < project.CompletionCount)
|
if (completionMin == completionMax)
|
||||||
{
|
{
|
||||||
errorMessage = $"团队{team.TeamIndex}参赛人数错误(少{project.CompletionCount - teamMemberCount}人)";
|
// 单一值模式
|
||||||
|
if (teamMemberCount < completionMin)
|
||||||
|
{
|
||||||
|
errorMessage = $"团队{team.TeamIndex}参赛人数错误(少{completionMin - teamMemberCount}人)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = $"团队{team.TeamIndex}参赛人数错误(多{teamMemberCount - completionMax}人)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMessage = $"团队{team.TeamIndex}参赛人数错误(多{teamMemberCount - project.CompletionCount}人)";
|
// 范围值模式
|
||||||
|
if (teamMemberCount < completionMin)
|
||||||
|
{
|
||||||
|
errorMessage = $"团队{team.TeamIndex}参赛人数错误(最少{completionMin}人,当前{teamMemberCount}人)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = $"团队{team.TeamIndex}参赛人数错误(最多{completionMax}人,当前{teamMemberCount}人)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result.HasError = true;
|
result.HasError = true;
|
||||||
@ -1379,7 +1462,7 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient
|
|||||||
{
|
{
|
||||||
ProjectId = eventProject.Id,
|
ProjectId = eventProject.Id,
|
||||||
ProjectName = project.Name ?? "未知项目",
|
ProjectName = project.Name ?? "未知项目",
|
||||||
ErrorType = teamMemberCount < project.CompletionCount ? "Insufficient" : "Excessive",
|
ErrorType = teamMemberCount < completionMin ? "Insufficient" : "Excessive",
|
||||||
ErrorMessage = errorMessage
|
ErrorMessage = errorMessage
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1394,17 +1477,33 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient
|
|||||||
// 如果该组别没有选择任何人员,跳过验证
|
// 如果该组别没有选择任何人员,跳过验证
|
||||||
if (assignedCount == 0) continue;
|
if (assignedCount == 0) continue;
|
||||||
|
|
||||||
// 只对团队项目进行完成人数验证
|
// 验证人数是否在有效范围内
|
||||||
if (isTeamProject && project.CompletionCount > 0 && assignedCount != project.CompletionCount)
|
if (isTeamProject && hasValidCompletionConfig && (assignedCount < completionMin || assignedCount > completionMax))
|
||||||
{
|
{
|
||||||
string errorMessage;
|
string errorMessage;
|
||||||
if (assignedCount < project.CompletionCount)
|
if (completionMin == completionMax)
|
||||||
{
|
{
|
||||||
errorMessage = $"{project.Name}参赛人数错误(少{project.CompletionCount - assignedCount}人)";
|
// 单一值模式
|
||||||
|
if (assignedCount < completionMin)
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}参赛人数错误(少{completionMin - assignedCount}人)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}参赛人数错误(多{assignedCount - completionMax}人)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMessage = $"{project.Name}参赛人数错误(多{assignedCount - project.CompletionCount}人)";
|
// 范围值模式
|
||||||
|
if (assignedCount < completionMin)
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}参赛人数错误(最少{completionMin}人,当前{assignedCount}人)";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorMessage = $"{project.Name}参赛人数错误(最多{completionMax}人,当前{assignedCount}人)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result.HasError = true;
|
result.HasError = true;
|
||||||
@ -1412,7 +1511,7 @@ public class UserEventRegistrationService : IDynamicApiController, ITransient
|
|||||||
{
|
{
|
||||||
ProjectId = eventProject.Id,
|
ProjectId = eventProject.Id,
|
||||||
ProjectName = project.Name ?? "未知项目",
|
ProjectName = project.Name ?? "未知项目",
|
||||||
ErrorType = assignedCount < project.CompletionCount ? "Insufficient" : "Excessive",
|
ErrorType = assignedCount < completionMin ? "Insufficient" : "Excessive",
|
||||||
ErrorMessage = errorMessage
|
ErrorMessage = errorMessage
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -194,10 +194,19 @@ public class OrderService : BaseService<YD_Event.Core.Entities.Order>, ITransien
|
|||||||
.WhereIF(input.EndTime.HasValue, (o, e, m, r, ro) => o.PaymentTime <= input.EndTime)
|
.WhereIF(input.EndTime.HasValue, (o, e, m, r, ro) => o.PaymentTime <= input.EndTime)
|
||||||
.OrderByDescending((o, e, m, r, ro) => o.CreatedTime);
|
.OrderByDescending((o, e, m, r, ro) => o.CreatedTime);
|
||||||
|
|
||||||
// 权限判断:如果是单位认证用户,只能查看自己单位认证的订单
|
// 权限判断:非超级管理员必须过滤订单
|
||||||
if (certification != null && !_authManager.IsSuperAdmin)
|
if (!_authManager.IsSuperAdmin)
|
||||||
{
|
{
|
||||||
query = query.Where((o, e, m, r, ro) => o.MerchantCertificationId == certification.Id);
|
if (certification != null)
|
||||||
|
{
|
||||||
|
// 有单位认证的用户,按单位认证ID过滤(只能看自己单位的订单)
|
||||||
|
query = query.Where((o, e, m, r, ro) => o.MerchantCertificationId == certification.Id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 无单位认证的用户(包括新注册用户),只能查看自己创建的订单
|
||||||
|
query = query.Where((o, e, m, r, ro) => o.CreatedUserId == userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = await query.Select((o, e, m, r, ro) => new OrderListOutput
|
var result = await query.Select((o, e, m, r, ro) => new OrderListOutput
|
||||||
@ -593,10 +602,19 @@ public class OrderService : BaseService<YD_Event.Core.Entities.Order>, ITransien
|
|||||||
.WhereIF(input.EndTime.HasValue, (o, e, m, r, ro) => o.CreatedTime <= input.EndTime)
|
.WhereIF(input.EndTime.HasValue, (o, e, m, r, ro) => o.CreatedTime <= input.EndTime)
|
||||||
.OrderByDescending((o, e, m, r, ro) => o.CreatedTime);
|
.OrderByDescending((o, e, m, r, ro) => o.CreatedTime);
|
||||||
|
|
||||||
// 权限判断:如果是单位认证用户,只能查看自己单位认证的订单
|
// 权限判断:非超级管理员必须过滤订单
|
||||||
if (certification != null && !_authManager.IsSuperAdmin)
|
if (!_authManager.IsSuperAdmin)
|
||||||
{
|
{
|
||||||
query = query.Where((o, e, m, r, ro) => o.MerchantCertificationId == certification.Id);
|
if (certification != null)
|
||||||
|
{
|
||||||
|
// 有单位认证的用户,按单位认证ID过滤(只能看自己单位的订单)
|
||||||
|
query = query.Where((o, e, m, r, ro) => o.MerchantCertificationId == certification.Id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 无单位认证的用户(包括新注册用户),只能查看自己创建的订单
|
||||||
|
query = query.Where((o, e, m, r, ro) => o.CreatedUserId == userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var list = await query.Select((o, e, m, r, ro) => new OrderListOutput
|
var list = await query.Select((o, e, m, r, ro) => new OrderListOutput
|
||||||
@ -846,10 +864,19 @@ public class OrderService : BaseService<YD_Event.Core.Entities.Order>, ITransien
|
|||||||
.WhereIF(input.StartTime.HasValue, (o, e, m, r, ro) => o.CreatedTime >= input.StartTime)
|
.WhereIF(input.StartTime.HasValue, (o, e, m, r, ro) => o.CreatedTime >= input.StartTime)
|
||||||
.WhereIF(input.EndTime.HasValue, (o, e, m, r, ro) => o.CreatedTime <= input.EndTime);
|
.WhereIF(input.EndTime.HasValue, (o, e, m, r, ro) => o.CreatedTime <= input.EndTime);
|
||||||
|
|
||||||
// 权限判断:如果是单位认证用户,只能查看自己单位认证的订单
|
// 权限判断:非超级管理员必须过滤订单
|
||||||
if (certification != null && !_authManager.IsSuperAdmin)
|
if (!_authManager.IsSuperAdmin)
|
||||||
{
|
{
|
||||||
query = query.Where((o, e, m, r, ro) => o.MerchantCertificationId == certification.Id);
|
if (certification != null)
|
||||||
|
{
|
||||||
|
// 有单位认证的用户,按单位认证ID过滤(只能看自己单位的订单)
|
||||||
|
query = query.Where((o, e, m, r, ro) => o.MerchantCertificationId == certification.Id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 无单位认证的用户(包括新注册用户),只能查看自己创建的订单
|
||||||
|
query = query.Where((o, e, m, r, ro) => o.CreatedUserId == userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var list = await query.Select((o, e, m, r, ro) => new OrderListOutput
|
var list = await query.Select((o, e, m, r, ro) => new OrderListOutput
|
||||||
|
|||||||
@ -36,9 +36,24 @@ public class AddProjectInput
|
|||||||
public long ProjectType { get; set; }
|
public long ProjectType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 完成人数
|
/// 完成人数模式(0=单一值, 1=范围值)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int CompletionCount { get; set; }
|
public int CompletionCountType { get; set; } = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数(单一值模式时必填)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最小值(范围值模式时必填)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最大值(范围值模式时必填)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMax { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 费用(元)
|
/// 费用(元)
|
||||||
@ -130,9 +145,29 @@ public class ProjectDto
|
|||||||
public string ProjectTypeName { get; set; }
|
public string ProjectTypeName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 完成人数
|
/// 完成人数模式(0=单一值, 1=范围值)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int CompletionCount { get; set; }
|
public int CompletionCountType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数(单一值模式时有效)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最小值(范围值模式时有效)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最大值(范围值模式时有效)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMax { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数显示文本(用于前端显示,如 "5人" 或 "3-5人")
|
||||||
|
/// </summary>
|
||||||
|
public string CompletionCountDisplay { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 费用(元)
|
/// 费用(元)
|
||||||
|
|||||||
@ -52,7 +52,10 @@ public class ProjectService : BaseService<YD_Event.Core.Entities.Project>, ITran
|
|||||||
Id = p.Id,
|
Id = p.Id,
|
||||||
Name = p.Name,
|
Name = p.Name,
|
||||||
ProjectType = (long)p.ProjectType,
|
ProjectType = (long)p.ProjectType,
|
||||||
|
CompletionCountType = p.CompletionCountType,
|
||||||
CompletionCount = p.CompletionCount,
|
CompletionCount = p.CompletionCount,
|
||||||
|
CompletionCountMin = p.CompletionCountMin,
|
||||||
|
CompletionCountMax = p.CompletionCountMax,
|
||||||
Fee = p.Fee,
|
Fee = p.Fee,
|
||||||
DurationMinutes = p.DurationMinutes,
|
DurationMinutes = p.DurationMinutes,
|
||||||
DurationSeconds = p.DurationSeconds,
|
DurationSeconds = p.DurationSeconds,
|
||||||
@ -70,6 +73,17 @@ public class ProjectService : BaseService<YD_Event.Core.Entities.Project>, ITran
|
|||||||
foreach (var item in list.Rows)
|
foreach (var item in list.Rows)
|
||||||
{
|
{
|
||||||
item.ProjectTypeName = ((ProjectTypeEnum)item.ProjectType).Description();
|
item.ProjectTypeName = ((ProjectTypeEnum)item.ProjectType).Description();
|
||||||
|
// 生成完成人数显示文本
|
||||||
|
if (item.CompletionCountType == 0)
|
||||||
|
{
|
||||||
|
item.CompletionCountDisplay = item.CompletionCount.HasValue ? $"{item.CompletionCount.Value}人" : "0人";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var min = item.CompletionCountMin ?? 0;
|
||||||
|
var max = item.CompletionCountMax ?? 0;
|
||||||
|
item.CompletionCountDisplay = $"{min}-{max}人";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
@ -82,6 +96,32 @@ public class ProjectService : BaseService<YD_Event.Core.Entities.Project>, ITran
|
|||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task Add(AddProjectInput input)
|
public async Task Add(AddProjectInput input)
|
||||||
{
|
{
|
||||||
|
// 验证完成人数字段
|
||||||
|
if (input.CompletionCountType == 0)
|
||||||
|
{
|
||||||
|
// 单一值模式
|
||||||
|
if (!input.CompletionCount.HasValue || input.CompletionCount.Value < 0)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("请填写有效的完成人数");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 范围值模式
|
||||||
|
if (!input.CompletionCountMin.HasValue || !input.CompletionCountMax.HasValue)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("请填写完成人数最小值和最大值");
|
||||||
|
}
|
||||||
|
if (input.CompletionCountMin.Value < 0 || input.CompletionCountMax.Value < 0)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("完成人数不能为负数");
|
||||||
|
}
|
||||||
|
if (input.CompletionCountMin.Value > input.CompletionCountMax.Value)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("完成人数最小值不能大于最大值");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var entity = input.Adapt<YD_Event.Core.Entities.Project>();
|
var entity = input.Adapt<YD_Event.Core.Entities.Project>();
|
||||||
entity.Id = _idGenerator.NewLong();
|
entity.Id = _idGenerator.NewLong();
|
||||||
entity.CreatedTime = DateTime.Now;
|
entity.CreatedTime = DateTime.Now;
|
||||||
@ -112,6 +152,32 @@ public class ProjectService : BaseService<YD_Event.Core.Entities.Project>, ITran
|
|||||||
var entity = await _repository.GetByIdAsync(input.Id);
|
var entity = await _repository.GetByIdAsync(input.Id);
|
||||||
if (entity == null) throw new InvalidOperationException("项目不存在");
|
if (entity == null) throw new InvalidOperationException("项目不存在");
|
||||||
|
|
||||||
|
// 验证完成人数字段
|
||||||
|
if (input.CompletionCountType == 0)
|
||||||
|
{
|
||||||
|
// 单一值模式
|
||||||
|
if (!input.CompletionCount.HasValue || input.CompletionCount.Value < 0)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("请填写有效的完成人数");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 范围值模式
|
||||||
|
if (!input.CompletionCountMin.HasValue || !input.CompletionCountMax.HasValue)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("请填写完成人数最小值和最大值");
|
||||||
|
}
|
||||||
|
if (input.CompletionCountMin.Value < 0 || input.CompletionCountMax.Value < 0)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("完成人数不能为负数");
|
||||||
|
}
|
||||||
|
if (input.CompletionCountMin.Value > input.CompletionCountMax.Value)
|
||||||
|
{
|
||||||
|
throw Oops.Bah("完成人数最小值不能大于最大值");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
input.Adapt(entity);
|
input.Adapt(entity);
|
||||||
entity.UpdatedTime = DateTime.Now;
|
entity.UpdatedTime = DateTime.Now;
|
||||||
await _repository.UpdateAsync(entity);
|
await _repository.UpdateAsync(entity);
|
||||||
@ -186,6 +252,18 @@ public class ProjectService : BaseService<YD_Event.Core.Entities.Project>, ITran
|
|||||||
dto.ProjectType = (long)p.ProjectType;
|
dto.ProjectType = (long)p.ProjectType;
|
||||||
dto.ProjectTypeName = p.ProjectType.Description();
|
dto.ProjectTypeName = p.ProjectType.Description();
|
||||||
|
|
||||||
|
// 生成完成人数显示文本
|
||||||
|
if (dto.CompletionCountType == 0)
|
||||||
|
{
|
||||||
|
dto.CompletionCountDisplay = dto.CompletionCount.HasValue ? $"{dto.CompletionCount.Value}人" : "0人";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var min = dto.CompletionCountMin ?? 0;
|
||||||
|
var max = dto.CompletionCountMax ?? 0;
|
||||||
|
dto.CompletionCountDisplay = $"{min}-{max}人";
|
||||||
|
}
|
||||||
|
|
||||||
var groups = await _groupRepository.GetListAsync(x => x.ProjectId == id);
|
var groups = await _groupRepository.GetListAsync(x => x.ProjectId == id);
|
||||||
dto.Groups = groups.Adapt<List<ProjectGroupDto>>();
|
dto.Groups = groups.Adapt<List<ProjectGroupDto>>();
|
||||||
|
|
||||||
|
|||||||
@ -2204,6 +2204,31 @@
|
|||||||
项目限报数量
|
项目限报数量
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Client.Dtos.EventProjectDto.CompletionCountType">
|
||||||
|
<summary>
|
||||||
|
完成人数模式(0=单一值,1=范围值)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Client.Dtos.EventProjectDto.CompletionCount">
|
||||||
|
<summary>
|
||||||
|
完成人数(单一值模式时有效)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Client.Dtos.EventProjectDto.CompletionCountMin">
|
||||||
|
<summary>
|
||||||
|
完成人数最小值(范围值模式时有效)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Client.Dtos.EventProjectDto.CompletionCountMax">
|
||||||
|
<summary>
|
||||||
|
完成人数最大值(范围值模式时有效)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Client.Dtos.EventProjectDto.CompletionCountDisplay">
|
||||||
|
<summary>
|
||||||
|
完成人数显示文本(如"5人"或"3-7人")
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YD_Event.Application.Client.Dtos.EventProjectDto.Groups">
|
<member name="P:YD_Event.Application.Client.Dtos.EventProjectDto.Groups">
|
||||||
<summary>
|
<summary>
|
||||||
组别列表
|
组别列表
|
||||||
@ -4795,6 +4820,31 @@
|
|||||||
比赛时长(秒) (显示用)
|
比赛时长(秒) (显示用)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.EventProjectInput.CompletionCountType">
|
||||||
|
<summary>
|
||||||
|
完成人数模式 (显示用) 0=单一值, 1=范围值
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.EventProjectInput.CompletionCount">
|
||||||
|
<summary>
|
||||||
|
完成人数 (显示用) 单一值模式时有效
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.EventProjectInput.CompletionCountMin">
|
||||||
|
<summary>
|
||||||
|
完成人数最小值 (显示用) 范围值模式时有效
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.EventProjectInput.CompletionCountMax">
|
||||||
|
<summary>
|
||||||
|
完成人数最大值 (显示用) 范围值模式时有效
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.EventProjectInput.CompletionCountDisplay">
|
||||||
|
<summary>
|
||||||
|
完成人数显示文本 (显示用) 如:5人 或 3-5人
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YD_Event.Application.Event.Dtos.EventProjectInput.Fee">
|
<member name="P:YD_Event.Application.Event.Dtos.EventProjectInput.Fee">
|
||||||
<summary>
|
<summary>
|
||||||
项目费用(Step 4)
|
项目费用(Step 4)
|
||||||
@ -7688,6 +7738,26 @@
|
|||||||
完成人数
|
完成人数
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.UserEventProjectListOutput.CompletionCountType">
|
||||||
|
<summary>
|
||||||
|
完成人数模式 (0=单一值, 1=范围值)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.UserEventProjectListOutput.CompletionCountMin">
|
||||||
|
<summary>
|
||||||
|
完成人数最小值(范围值模式)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.UserEventProjectListOutput.CompletionCountMax">
|
||||||
|
<summary>
|
||||||
|
完成人数最大值(范围值模式)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Event.Dtos.UserEventProjectListOutput.CompletionCountDisplay">
|
||||||
|
<summary>
|
||||||
|
完成人数显示文本(如"5人"或"3-7人")
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YD_Event.Application.Event.Dtos.UserEventProjectListOutput.ProjectType">
|
<member name="P:YD_Event.Application.Event.Dtos.UserEventProjectListOutput.ProjectType">
|
||||||
<summary>
|
<summary>
|
||||||
项目类型
|
项目类型
|
||||||
@ -11979,9 +12049,24 @@
|
|||||||
项目类型
|
项目类型
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Project.Dtos.AddProjectInput.CompletionCountType">
|
||||||
|
<summary>
|
||||||
|
完成人数模式(0=单一值, 1=范围值)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YD_Event.Application.Project.Dtos.AddProjectInput.CompletionCount">
|
<member name="P:YD_Event.Application.Project.Dtos.AddProjectInput.CompletionCount">
|
||||||
<summary>
|
<summary>
|
||||||
完成人数
|
完成人数(单一值模式时必填)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Project.Dtos.AddProjectInput.CompletionCountMin">
|
||||||
|
<summary>
|
||||||
|
完成人数最小值(范围值模式时必填)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Project.Dtos.AddProjectInput.CompletionCountMax">
|
||||||
|
<summary>
|
||||||
|
完成人数最大值(范围值模式时必填)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:YD_Event.Application.Project.Dtos.AddProjectInput.Fee">
|
<member name="P:YD_Event.Application.Project.Dtos.AddProjectInput.Fee">
|
||||||
@ -12064,9 +12149,29 @@
|
|||||||
项目类型名称
|
项目类型名称
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Project.Dtos.ProjectDto.CompletionCountType">
|
||||||
|
<summary>
|
||||||
|
完成人数模式(0=单一值, 1=范围值)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YD_Event.Application.Project.Dtos.ProjectDto.CompletionCount">
|
<member name="P:YD_Event.Application.Project.Dtos.ProjectDto.CompletionCount">
|
||||||
<summary>
|
<summary>
|
||||||
完成人数
|
完成人数(单一值模式时有效)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Project.Dtos.ProjectDto.CompletionCountMin">
|
||||||
|
<summary>
|
||||||
|
完成人数最小值(范围值模式时有效)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Project.Dtos.ProjectDto.CompletionCountMax">
|
||||||
|
<summary>
|
||||||
|
完成人数最大值(范围值模式时有效)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Application.Project.Dtos.ProjectDto.CompletionCountDisplay">
|
||||||
|
<summary>
|
||||||
|
完成人数显示文本(用于前端显示,如 "5人" 或 "3-5人")
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:YD_Event.Application.Project.Dtos.ProjectDto.Fee">
|
<member name="P:YD_Event.Application.Project.Dtos.ProjectDto.Fee">
|
||||||
|
|||||||
@ -22,10 +22,25 @@ public class Project : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime,
|
|||||||
public ProjectTypeEnum ProjectType { get; set; }
|
public ProjectTypeEnum ProjectType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 完成人数
|
/// 完成人数模式(0=单一值, 1=范围值)
|
||||||
|
/// </summary>
|
||||||
|
public int CompletionCountType { get; set; } = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数(单一值模式时有效)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int CompletionCount { get; set; }
|
public int CompletionCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最小值(范围值模式时有效)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 完成人数最大值(范围值模式时有效)
|
||||||
|
/// </summary>
|
||||||
|
public int? CompletionCountMax { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 费用(元)
|
/// 费用(元)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -3043,9 +3043,24 @@
|
|||||||
项目类型(枚举)
|
项目类型(枚举)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YD_Event.Core.Entities.Project.CompletionCountType">
|
||||||
|
<summary>
|
||||||
|
完成人数模式(0=单一值, 1=范围值)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YD_Event.Core.Entities.Project.CompletionCount">
|
<member name="P:YD_Event.Core.Entities.Project.CompletionCount">
|
||||||
<summary>
|
<summary>
|
||||||
完成人数
|
完成人数(单一值模式时有效)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Core.Entities.Project.CompletionCountMin">
|
||||||
|
<summary>
|
||||||
|
完成人数最小值(范围值模式时有效)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YD_Event.Core.Entities.Project.CompletionCountMax">
|
||||||
|
<summary>
|
||||||
|
完成人数最大值(范围值模式时有效)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:YD_Event.Core.Entities.Project.Fee">
|
<member name="P:YD_Event.Core.Entities.Project.Fee">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user