From eb3a2049a891a7b660161aed51f327c03cd5bbf8 Mon Sep 17 00:00:00 2001 From: Tongg Date: Wed, 28 May 2025 14:32:08 +0800 Subject: [PATCH] grade bugs --- Model/GradeLevel/Entity/Enum/RunMode.cs | 13 ++ Model/GradeLevel/Entity/Enum/Shape.cs | 13 ++ Model/GradeLevel/Entity/Enum/Statistics.cs | 13 ++ .../Entity/ImportEntity/BaseEntity.cs | 45 +++++++ .../Entity/ImportEntity/GradeSet.cs | 37 ++++++ .../Entity/ImportEntity/LevelSetEntity.cs | 46 +++++++ .../Entity/ImportEntity/MasterLevelEntity.cs | 122 ++++++++++++++++++ .../Entity/ImportEntity/TotalRuleSet.cs | 10 ++ .../Entity/ImportEntity/UseDataSet.cs | 47 +++++++ 9 files changed, 346 insertions(+) create mode 100644 Model/GradeLevel/Entity/Enum/RunMode.cs create mode 100644 Model/GradeLevel/Entity/Enum/Shape.cs create mode 100644 Model/GradeLevel/Entity/Enum/Statistics.cs create mode 100644 Model/GradeLevel/Entity/ImportEntity/BaseEntity.cs create mode 100644 Model/GradeLevel/Entity/ImportEntity/GradeSet.cs create mode 100644 Model/GradeLevel/Entity/ImportEntity/LevelSetEntity.cs create mode 100644 Model/GradeLevel/Entity/ImportEntity/MasterLevelEntity.cs create mode 100644 Model/GradeLevel/Entity/ImportEntity/TotalRuleSet.cs create mode 100644 Model/GradeLevel/Entity/ImportEntity/UseDataSet.cs diff --git a/Model/GradeLevel/Entity/Enum/RunMode.cs b/Model/GradeLevel/Entity/Enum/RunMode.cs new file mode 100644 index 0000000..f301da1 --- /dev/null +++ b/Model/GradeLevel/Entity/Enum/RunMode.cs @@ -0,0 +1,13 @@ +using System.ComponentModel; + +namespace BrilliantSightClient.Model.GradeLevel.Entity.Enum; + +public enum RunMode +{ + [Description("实验室模式")] + Laboratory = 0, + [Description("工厂模式")] + Factory = 1, + [Description("通用")] + Nor = -1, +} \ No newline at end of file diff --git a/Model/GradeLevel/Entity/Enum/Shape.cs b/Model/GradeLevel/Entity/Enum/Shape.cs new file mode 100644 index 0000000..f7be7c6 --- /dev/null +++ b/Model/GradeLevel/Entity/Enum/Shape.cs @@ -0,0 +1,13 @@ +using System.ComponentModel; + +namespace BrilliantSightClient.Model.GradeLevel.Entity.Enum; + +public enum Shape +{ + [Description("圆形")] + Round = 0, + [Description("椭圆形")] + Oval = 1, + [Description("梨形(水滴形)")] + Pear = 2, +} \ No newline at end of file diff --git a/Model/GradeLevel/Entity/Enum/Statistics.cs b/Model/GradeLevel/Entity/Enum/Statistics.cs new file mode 100644 index 0000000..6931567 --- /dev/null +++ b/Model/GradeLevel/Entity/Enum/Statistics.cs @@ -0,0 +1,13 @@ +using System.ComponentModel; + +namespace BrilliantSightClient.Model.GradeLevel.Entity.Enum; + +public enum Statistics +{ + [Description("最大值")] + Max = 0, + [Description("最小值")] + Min = 1, + [Description("平均值")] + Avg = 2, +} \ No newline at end of file diff --git a/Model/GradeLevel/Entity/ImportEntity/BaseEntity.cs b/Model/GradeLevel/Entity/ImportEntity/BaseEntity.cs new file mode 100644 index 0000000..0adec2e --- /dev/null +++ b/Model/GradeLevel/Entity/ImportEntity/BaseEntity.cs @@ -0,0 +1,45 @@ +namespace BrilliantSightClient.Model.GradeLevel.Entity; + +public class BaseEntity +{ + /// + /// 节点标题 + /// + public string Header { get; set; } + + public bool IsTops { get; set; } + + /// + /// 节点类型 0-Root 1-切工定级节点 2-对称定级节点 + /// + public int NodeType { get; set; } = 0; + /// + /// 状态标记: 0-无; 1-顶级定级(无子集);2-顶级维度(有子集);3-维度定级(末级) + /// + public int HasData { get; set; } = 0; + /// + /// 维度名称 + /// + public string DimensionName { get; set; } + /// + /// 维度Key + /// + public string DimensionKey { get; set; } + /// + /// 维度值 + /// + public string DimensionValue { get; set; } + /// + /// 定级设置 + /// + public List GradeSet { get; set; } + /// + /// 子集 + /// + public List Children { get; set; } = new List(); + + public override string ToString() + { + return Header; + } +} \ No newline at end of file diff --git a/Model/GradeLevel/Entity/ImportEntity/GradeSet.cs b/Model/GradeLevel/Entity/ImportEntity/GradeSet.cs new file mode 100644 index 0000000..30fadca --- /dev/null +++ b/Model/GradeLevel/Entity/ImportEntity/GradeSet.cs @@ -0,0 +1,37 @@ +namespace BrilliantSightClient.Model.GradeLevel.Entity; + + +public class GradeSet +{ + /// + /// 数据 + /// + public UseDataSet DataSet { get; set; } + + /// + /// 分级设定 + /// + public List NumSets { get; set; } +} + +public class NumSet +{ + /// + /// 评级名称 + /// + public string Name { get; set; } + /// + /// 评级设定 + /// + public LevelSetEntity LevelSet { get; set; } + /// + /// 最大值 + /// + public double MaxValue { get; set; } + /// + /// 最小值 + /// + public double MinValue { get; set; } +} + + diff --git a/Model/GradeLevel/Entity/ImportEntity/LevelSetEntity.cs b/Model/GradeLevel/Entity/ImportEntity/LevelSetEntity.cs new file mode 100644 index 0000000..09367e5 --- /dev/null +++ b/Model/GradeLevel/Entity/ImportEntity/LevelSetEntity.cs @@ -0,0 +1,46 @@ +namespace BrilliantSightClient.Model.GradeLevel.Entity; + +public class LevelSetEntity +{ + private string _name; + private string _eName; + private string _aName; + private int _short; + /// + /// 级别名称 + /// + public string Name + { + get => _name; + set { _name = value; } + } + /// + /// 英文名 + /// + public string EName + { + get => _eName; + set { _eName = value; } + } + /// + /// 简称 + /// + public string AName + { + get => _aName; + set { _aName = value; } + } + /// + /// 排序 + /// + public int Short + { + get => _short; + set { _short = value; } + } + /// + /// 签名 + /// + public string Sign { get; set; } + +} \ No newline at end of file diff --git a/Model/GradeLevel/Entity/ImportEntity/MasterLevelEntity.cs b/Model/GradeLevel/Entity/ImportEntity/MasterLevelEntity.cs new file mode 100644 index 0000000..4e84d33 --- /dev/null +++ b/Model/GradeLevel/Entity/ImportEntity/MasterLevelEntity.cs @@ -0,0 +1,122 @@ +using BrilliantSightClient.Model.GradeLevel.Entity.Enum; + +namespace BrilliantSightClient.Model.GradeLevel.Entity; + +public class MasterLevelEntity +{ + // 私有字段存储属性值(每个属性对应一个字段) + private string _name = string.Empty; + private string _eName = string.Empty; + private RunMode _runMode; + private Shape _shape; + private int _crown = 8; + private int _pavilion = 8; + private List _symLevelSet = new List(); + private List _cutLevelSet = new List(); + private string _sign = string.Empty; + private List _useDataSets = new List(); + private List _rulesTree = new List(); + private TotalRuleSet cutTotalRuleSet; + private TotalRuleSet symTotalRuleSet; + + /// + /// 名称 + /// + public string Name + { + get => _name; + set { _name = value; } + } + /// + /// 英文名称 + /// + public string EName + { + get => _eName; + set { _eName = value; } + } + /// + /// 运行模式 + /// + public RunMode RunMode + { + get => _runMode; + set { _runMode = value; } + } + /// + /// 形状 + /// + public Shape Shape + { + get => _shape; + set { _shape = value; } + } + /// + /// 冠数量 + /// + public int Crown + { + get => _crown; + set { _crown = value; } + } + /// + /// 亭数量 + /// + public int Pavilion + { + get => _pavilion; + set { _pavilion = value; } + } + + /// + /// 对称分级 + /// + public List SymLevelSet + { + get => _symLevelSet; + set { _symLevelSet = value; } + } + /// + /// 切工分级 + /// + public List CutLevelSet + { + get => _cutLevelSet; + set { _cutLevelSet = value; } + } + /// + /// 数据设置 + /// + public List UseDataSets + { + get => _useDataSets; + set { _useDataSets = value; } + } + /// + /// 规则树 + /// + public List RulesTree + { + get => _rulesTree; + set { _rulesTree = value; } + } + + public TotalRuleSet CutTotalRuleSet + { + get => cutTotalRuleSet; + set { cutTotalRuleSet = value; } + } + + public TotalRuleSet SymTotalRuleSet + { + get => symTotalRuleSet; + set { symTotalRuleSet = value; } + } + + + public string Sign + { + get => _sign; + set { _sign = value; } + } +} \ No newline at end of file diff --git a/Model/GradeLevel/Entity/ImportEntity/TotalRuleSet.cs b/Model/GradeLevel/Entity/ImportEntity/TotalRuleSet.cs new file mode 100644 index 0000000..97b3ed6 --- /dev/null +++ b/Model/GradeLevel/Entity/ImportEntity/TotalRuleSet.cs @@ -0,0 +1,10 @@ +using BrilliantSightClient.Model.GradeLevel.Entity.Enum; + +namespace BrilliantSightClient.Model.GradeLevel.Entity; + +public class TotalRuleSet +{ + public Statistics Type { get; set; } + + public List UserDataSets { get; set; } +} \ No newline at end of file diff --git a/Model/GradeLevel/Entity/ImportEntity/UseDataSet.cs b/Model/GradeLevel/Entity/ImportEntity/UseDataSet.cs new file mode 100644 index 0000000..e0ba644 --- /dev/null +++ b/Model/GradeLevel/Entity/ImportEntity/UseDataSet.cs @@ -0,0 +1,47 @@ +namespace BrilliantSightClient.Model.GradeLevel.Entity; + +public class UseDataSet +{ + private string _name; + private string _eName; + private string _key; + private string _unit; + private bool _hasCut; + private bool _hasSym; + + public string Name + { + get => _name; + set { _name = value; } + } + + public string EName + { + get => _eName; + set { _eName = value; } + } + + public string Key + { + get => _key; + set { _key = value; } + } + + public string Unit + { + get => _unit; + set { _unit = value; } + } + + public bool HasCut + { + get => _hasCut; + set { _hasCut = value; } + } + + public bool HasSym + { + get => _hasSym; + set { _hasSym = value; } + } +} \ No newline at end of file