革博士V2程序
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

175 рядки
5.9 KiB

  1. using SqlSugar;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace Models
  9. {
  10. [SugarIndex("index_{table}_code", nameof(Product.Code), OrderByType.Asc, isUnique: true)]
  11. //[SugarIndex("index_{table}_m_c",
  12. // nameof(Product.Material), OrderByType.Asc,
  13. // nameof(Product.Color), OrderByType.Asc, isUnique: false)]
  14. public class Product : BaseTable
  15. {
  16. public string Code { get; set; }
  17. //0-绒面 1/其它-非绒面
  18. public string Material { get; set; }//材质code
  19. public int Color { get; set; }//颜色code
  20. /// <summary>
  21. /// 名称
  22. /// </summary>
  23. [SugarColumn(IsNullable = true)]
  24. public string Name { get; set; }
  25. /// <summary>
  26. /// 规格
  27. /// </summary>
  28. [SugarColumn(IsNullable = true)]
  29. public string Spec { get; set; }
  30. /// <summary>
  31. /// 颜色名称
  32. /// </summary>
  33. [SugarColumn(IsNullable = true)]
  34. public string ColorName { get; set; }//颜色code
  35. /// <summary>
  36. /// 颜色值
  37. /// </summary>
  38. [SugarColumn(IsNullable = true)]
  39. public string ColorValue { get; set; }//颜色code
  40. //类别
  41. //public int ClassesId { get; set; }
  42. //[Navigate(NavigateType.ManyToOne, nameof(ClassesId))]
  43. //public Classes ClassesInfo { get; set; }
  44. //public int Len { get; set; }//数量/长度
  45. // ----
  46. public int LightValue { get; set; }//亮度
  47. public double ExposureTime { get; set; }//曝光时长
  48. public double Gain { get; set; }//增益
  49. public double TensionValue { get; set; }//张力
  50. //
  51. [SugarColumn(IsNullable = true)]
  52. public string Note { get; set; }
  53. /// <summary>
  54. /// 合格判断标准
  55. /// </summary>
  56. [Navigate(NavigateType.OneToMany, nameof(QualifiedLimit.Pid))]
  57. public List<QualifiedLimit> QualifiedLimitList { get; set; }
  58. /// <summary>
  59. /// 等级划分标准
  60. /// </summary>
  61. [Navigate(NavigateType.OneToMany, nameof(GradeLimit.Pid))]
  62. public List<GradeLimit> GradeLimitList { get; set; }
  63. //可能不用
  64. //public int MiddleSuperposition { get; set; }
  65. //public int MarginLeft { get; set; }
  66. //public int MarginRight { get; set; }
  67. //模型算法
  68. [SugarColumn(IsNullable = true)]
  69. public string ModelName { get; set; }
  70. //告警limit
  71. public double DefectAreaLimit { get; set; }//面积
  72. public int DefectCountLimit { get; set; }//瑕疵数
  73. public bool DefectPauseForUser { get; set; }//瑕疵二次确认
  74. [SqlSugar.SugarColumn(IsJson = true, IsNullable = true)]//, ColumnDataType = StaticConfig.CodeFirst_BigString)]
  75. public List<string> DefectPauseOption { get; set; } = new List<string>();//二次确认过滤瑕疵
  76. /// <summary>
  77. /// 缺陷计数长度
  78. /// </summary>
  79. [SugarColumn(IsNullable = true)]
  80. public double DefectCntLength { get; set; }
  81. /// <summary>
  82. /// 缺陷警告
  83. /// </summary>
  84. [SugarColumn(IsNullable = true)]
  85. public string WarnDefect { get; set; }
  86. /// <summary>
  87. /// 开启厚度检测
  88. /// </summary>
  89. [SugarColumn(IsNullable = true)]
  90. public bool OpenThicknessDetection { get; set; }
  91. /// <summary>
  92. /// 厚度检测暂停距离m
  93. /// </summary>
  94. [SugarColumn(IsNullable = true)]
  95. public int ThicknessDetectionStopDis { get; set; }
  96. /// <summary>
  97. /// 剩余长度提醒
  98. /// </summary>
  99. [SugarColumn(IsNullable = true)]
  100. public double residueWarnningLen { get; set; }
  101. }
  102. /// <summary>
  103. /// //合格判断标准
  104. /// </summary>
  105. [SugarIndex("index_{table}_Pid_Code",
  106. nameof(QualifiedLimit.Pid), OrderByType.Asc,
  107. nameof(QualifiedLimit.Code), OrderByType.Asc, isUnique: true)]
  108. public class QualifiedLimit : BaseTable
  109. {
  110. public int Pid { get; set; }
  111. /// <summary>
  112. /// dk,xws,...
  113. /// </summary>
  114. public string Code { get; set; }
  115. public double ZXD { get; set; }//置信度
  116. public double Area { get; set; }//面积mm
  117. public double ContrastTop { get; set; }//对比度
  118. public double ContrastLower { get; set; }//对比度
  119. public bool IsOR { get; set; }//面积 or 对比度
  120. //临时显示用
  121. [SugarColumn(IsIgnore = true)]
  122. public string Name { get; set; }
  123. [SugarColumn(IsNullable = true)]
  124. public string NameCode { get; set; }
  125. [SugarColumn(IsNullable = true)]
  126. public int DefectWarnLength { get; set; }
  127. [SugarColumn(IsNullable = true)]
  128. public int DefectWarnCnt { get; set; }
  129. }
  130. /// <summary>
  131. /// 等级划分标准
  132. /// </summary>
  133. //[SugarIndex("index_{table}_Pid_Code",
  134. // nameof(GradeLimit.Pid), OrderByType.Asc,
  135. // nameof(GradeLimit.Code), OrderByType.Asc, isUnique: true)]
  136. [SugarIndex("index_{table}_Pid",
  137. nameof(GradeLimit.Pid), OrderByType.Asc, isUnique: true)]
  138. public class GradeLimit : BaseTable
  139. {
  140. public int Pid { get; set; }
  141. /// <summary>
  142. /// dk,xws,...
  143. /// </summary>
  144. public string Code { get; set; }
  145. //此等级上限缺陷数
  146. public int A { get; set; }
  147. public int B { get; set; }
  148. public int C { get; set; }
  149. public int D { get; set; }
  150. public int E { get; set; }
  151. //临时显示用
  152. [SugarColumn(IsIgnore = true)]
  153. public string Name { get; set; }
  154. }
  155. }