|
|
@@ -338,24 +338,24 @@ namespace OASystem.Domain.Entities.Resource
|
|
|
/// </summary>
|
|
|
public class OrgScale
|
|
|
{
|
|
|
- public string Label { get; init; }
|
|
|
+ public string Name { get; init; }
|
|
|
public int MinStaff { get; init; }
|
|
|
public int MaxStaff { get; init; }
|
|
|
|
|
|
- public static List<OrgScale> GetScales() => new()
|
|
|
+ public static List<OrgScale> BuildInitialData() => new()
|
|
|
{
|
|
|
- new() { Label = "微型 (1-10人)", MinStaff = 1, MaxStaff = 10 },
|
|
|
- new() { Label = "小型 (11-50人)", MinStaff = 11, MaxStaff = 50 },
|
|
|
- new() { Label = "中型 (51-200人)", MinStaff = 51, MaxStaff = 200 },
|
|
|
- new() { Label = "大型 (201-1000人)", MinStaff = 201, MaxStaff = 1000 },
|
|
|
- new() { Label = "超大型 (1000人以上)", MinStaff = 1001, MaxStaff = int.MaxValue }
|
|
|
+ new() { Name = "微型 (1-10人)", MinStaff = 1, MaxStaff = 10 },
|
|
|
+ new() { Name = "小型 (11-50人)", MinStaff = 11, MaxStaff = 50 },
|
|
|
+ new() { Name = "中型 (51-200人)", MinStaff = 51, MaxStaff = 200 },
|
|
|
+ new() { Name = "大型 (201-1000人)", MinStaff = 201, MaxStaff = 1000 },
|
|
|
+ new() { Name = "超大型 (1000人以上)", MinStaff = 1001, MaxStaff = int.MaxValue }
|
|
|
};
|
|
|
|
|
|
/// <summary>
|
|
|
/// 根据人数自动匹配规模标签
|
|
|
/// </summary>
|
|
|
public static string GetLabel(int count) =>
|
|
|
- GetScales().FirstOrDefault(s => count >= s.MinStaff && count <= s.MaxStaff)?.Label ?? "未知规模";
|
|
|
+ BuildInitialData().FirstOrDefault(s => count >= s.MinStaff && count <= s.MaxStaff)?.Label ?? "未知规模";
|
|
|
}
|
|
|
|
|
|
#endregion
|