革博士程序V1仓库
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.

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