革博士V2程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

191 regels
6.3 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, Length = 4096)]
  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. //相机使用
  48. public double ExposureTime { get; set; }//曝光时长
  49. public double Gain { get; set; }//增益
  50. public double TensionValue { get; set; }//张力
  51. //
  52. [SugarColumn(IsNullable = true)]
  53. public string Note { get; set; }
  54. /// <summary>
  55. /// 合格判断标准
  56. /// </summary>
  57. [Navigate(NavigateType.OneToMany, nameof(QualifiedLimit.Pid))]
  58. public List<QualifiedLimit> QualifiedLimitList { get; set; }
  59. /// <summary>
  60. /// 等级划分标准
  61. /// </summary>
  62. [Navigate(NavigateType.OneToMany, nameof(GradeLimit.Pid))]
  63. public List<GradeLimit> GradeLimitList { get; set; }
  64. //可能不用
  65. //public int MiddleSuperposition { get; set; }
  66. //public int MarginLeft { get; set; }
  67. //public int MarginRight { get; set; }
  68. //模型算法
  69. [SugarColumn(IsNullable = true)]
  70. public string ModelName { get; set; }
  71. //告警limit
  72. public double DefectAreaLimit { get; set; }//面积
  73. public int DefectCountLimit { get; set; }//瑕疵数
  74. public bool DefectPauseForUser { get; set; }//瑕疵二次确认
  75. [SqlSugar.SugarColumn(IsJson = true, IsNullable = true)]//, ColumnDataType = StaticConfig.CodeFirst_BigString)]
  76. public List<string> DefectPauseOption { get; set; } = new List<string>();//二次确认过滤瑕疵
  77. /// <summary>
  78. /// 缺陷计数长度
  79. /// </summary>
  80. [SugarColumn(IsNullable = true)]
  81. public double DefectCntLength { get; set; }
  82. /// <summary>
  83. /// 缺陷警告
  84. /// </summary>
  85. [SugarColumn(IsNullable = true)]
  86. public string WarnDefect { get; set; }
  87. /// <summary>
  88. /// 开启厚度检测
  89. /// </summary>
  90. [SugarColumn(IsNullable = true)]
  91. public bool OpenThicknessDetection { get; set; }
  92. /// <summary>
  93. /// 厚度检测暂停距离m
  94. /// </summary>
  95. [SugarColumn(IsNullable = true)]
  96. public int ThicknessDetectionStopDis { get; set; }
  97. /// <summary>
  98. /// 剩余长度提醒
  99. /// </summary>
  100. [SugarColumn(IsNullable = true)]
  101. public double residueWarnningLen { get; set; }
  102. /// <summary>
  103. /// 裁边算法
  104. /// </summary>
  105. public string EdgeDefectType { get; set; }
  106. /// <summary>
  107. /// 针孔裁边距离
  108. /// </summary>
  109. public int EdgeHoleCut { get; set; }
  110. /// <summary>
  111. /// 识别算法
  112. /// </summary>
  113. public string ImageDefectType { get; set; }
  114. }
  115. /// <summary>
  116. /// //合格判断标准
  117. /// </summary>
  118. [SugarIndex("index_{table}_Pid_Code",
  119. nameof(QualifiedLimit.Pid), OrderByType.Asc,
  120. nameof(QualifiedLimit.Code), OrderByType.Asc, isUnique: true)]
  121. public class QualifiedLimit : BaseTable
  122. {
  123. public int Pid { get; set; }
  124. /// <summary>
  125. /// dk,xws,...
  126. /// </summary>
  127. public string Code { get; set; }
  128. public double ZXD { get; set; }//置信度
  129. public double Area { get; set; }//面积mm
  130. public double ContrastTop { get; set; }//对比度
  131. public double ContrastLower { get; set; }//对比度
  132. public bool IsOR { get; set; }//面积 or 对比度
  133. //临时显示用
  134. [SugarColumn(IsIgnore = true)]
  135. public string Name { get; set; }
  136. [SugarColumn(IsNullable = true)]
  137. public string NameCode { get; set; }
  138. [SugarColumn(IsNullable = true)]
  139. public int DefectWarnLength { get; set; }
  140. [SugarColumn(IsNullable = true)]
  141. public int DefectWarnCnt { get; set; }
  142. }
  143. /// <summary>
  144. /// 等级划分标准
  145. /// </summary>
  146. //[SugarIndex("index_{table}_Pid_Code",
  147. // nameof(GradeLimit.Pid), OrderByType.Asc,
  148. // nameof(GradeLimit.Code), OrderByType.Asc, isUnique: true)]
  149. [SugarIndex("index_{table}_Pid",
  150. nameof(GradeLimit.Pid), OrderByType.Asc, isUnique: true)]
  151. public class GradeLimit : BaseTable
  152. {
  153. public int Pid { get; set; }
  154. /// <summary>
  155. /// dk,xws,...
  156. /// </summary>
  157. public string Code { get; set; }
  158. //此等级上限缺陷数
  159. public int A { get; set; }
  160. public int B { get; set; }
  161. public int C { get; set; }
  162. public int D { get; set; }
  163. public int E { get; set; }
  164. //临时显示用
  165. [SugarColumn(IsIgnore = true)]
  166. public string Name { get; set; }
  167. }
  168. }