AdoS0MfgBomAndRouting.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. namespace Admin.NET.Plugin.AiDOP.Entity.S0.Manufacturing;
  2. [SugarTable("ado_s0_mfg_bom", "S0 标准 BOM 头")]
  3. [SugarIndex("uk_ado_s0_mfg_bom_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
  4. public class AdoS0MfgBom
  5. {
  6. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  7. public long Id { get; set; }
  8. [SugarColumn(ColumnDescription = "公司", ColumnDataType = "bigint")]
  9. public long CompanyRefId { get; set; }
  10. [SugarColumn(ColumnDescription = "工厂", ColumnDataType = "bigint")]
  11. public long FactoryRefId { get; set; }
  12. [SugarColumn(ColumnDescription = "编码", Length = 100)]
  13. public string Code { get; set; } = string.Empty;
  14. [SugarColumn(ColumnDescription = "名称", Length = 200)]
  15. public string Name { get; set; } = string.Empty;
  16. [SugarColumn(ColumnDescription = "父物料", ColumnDataType = "bigint", IsNullable = true)]
  17. public long? MaterialId { get; set; }
  18. [SugarColumn(ColumnDescription = "业务版本", Length = 50)]
  19. public string BizVersion { get; set; } = "1.0";
  20. [SugarColumn(ColumnDescription = "文档状态", Length = 50)]
  21. public string DocStatus { get; set; } = "draft";
  22. [SugarColumn(ColumnDescription = "备注", Length = 500, IsNullable = true)]
  23. public string? Remark { get; set; }
  24. [SugarColumn(ColumnDescription = "启用", ColumnDataType = "boolean")]
  25. public bool IsEnabled { get; set; } = true;
  26. [SugarColumn(ColumnDescription = "创建时间")]
  27. public DateTime CreatedAt { get; set; } = DateTime.Now;
  28. [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
  29. public DateTime? UpdatedAt { get; set; }
  30. }
  31. [SugarTable("ado_s0_mfg_bom_item", "S0 BOM 行")]
  32. public class AdoS0MfgBomItem
  33. {
  34. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  35. public long Id { get; set; }
  36. [SugarColumn(ColumnDescription = "公司", ColumnDataType = "bigint")]
  37. public long CompanyRefId { get; set; }
  38. [SugarColumn(ColumnDescription = "工厂", ColumnDataType = "bigint")]
  39. public long FactoryRefId { get; set; }
  40. [SugarColumn(ColumnDescription = "BOM 头", ColumnDataType = "bigint")]
  41. public long BomId { get; set; }
  42. [SugarColumn(ColumnDescription = "子物料", ColumnDataType = "bigint")]
  43. public long MaterialId { get; set; }
  44. [SugarColumn(ColumnDescription = "数量", DecimalDigits = 5, Length = 18)]
  45. public decimal Qty { get; set; } = 1m;
  46. [SugarColumn(ColumnDescription = "数量分子", DecimalDigits = 5, Length = 18)]
  47. public decimal QtyNumerator { get; set; } = 1m;
  48. [SugarColumn(ColumnDescription = "数量分母", DecimalDigits = 5, Length = 18)]
  49. public decimal QtyDenominator { get; set; } = 1m;
  50. [SugarColumn(ColumnDescription = "损耗率", DecimalDigits = 5, Length = 18)]
  51. public decimal LossRate { get; set; }
  52. [SugarColumn(ColumnDescription = "固定损耗量", DecimalDigits = 5, Length = 18)]
  53. public decimal FixedLossQty { get; set; }
  54. [SugarColumn(ColumnDescription = "工序", ColumnDataType = "bigint", IsNullable = true)]
  55. public long? OperationId { get; set; }
  56. [SugarColumn(ColumnDescription = "虚拟件", ColumnDataType = "boolean")]
  57. public bool IsPhantom { get; set; }
  58. [SugarColumn(ColumnDescription = "单位", Length = 50, IsNullable = true)]
  59. public string? Unit { get; set; }
  60. [SugarColumn(ColumnDescription = "排序")]
  61. public int SortNo { get; set; }
  62. [SugarColumn(ColumnDescription = "备注", Length = 200, IsNullable = true)]
  63. public string? Remark { get; set; }
  64. [SugarColumn(ColumnDescription = "启用", ColumnDataType = "boolean")]
  65. public bool IsEnabled { get; set; } = true;
  66. [SugarColumn(ColumnDescription = "创建时间")]
  67. public DateTime CreatedAt { get; set; } = DateTime.Now;
  68. [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
  69. public DateTime? UpdatedAt { get; set; }
  70. }
  71. [SugarTable("ado_s0_mfg_standard_operation", "S0 标准工序")]
  72. [SugarIndex("uk_ado_s0_mfg_std_op_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
  73. public class AdoS0MfgStandardOperation
  74. {
  75. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  76. public long Id { get; set; }
  77. [SugarColumn(ColumnDescription = "公司", ColumnDataType = "bigint")]
  78. public long CompanyRefId { get; set; }
  79. [SugarColumn(ColumnDescription = "工厂", ColumnDataType = "bigint")]
  80. public long FactoryRefId { get; set; }
  81. [SugarColumn(ColumnDescription = "编码", Length = 100)]
  82. public string Code { get; set; } = string.Empty;
  83. [SugarColumn(ColumnDescription = "名称", Length = 200)]
  84. public string Name { get; set; } = string.Empty;
  85. [SugarColumn(ColumnDescription = "关键工序", ColumnDataType = "boolean")]
  86. public bool IsKeyOperation { get; set; }
  87. [SugarColumn(ColumnDescription = "工序类型", Length = 50, IsNullable = true)]
  88. public string? OperationType { get; set; }
  89. [SugarColumn(ColumnDescription = "标准工时", DecimalDigits = 5, Length = 18, IsNullable = true)]
  90. public decimal? StdTime { get; set; }
  91. [SugarColumn(ColumnDescription = "备注", Length = 500, IsNullable = true)]
  92. public string? Remark { get; set; }
  93. [SugarColumn(ColumnDescription = "启用", ColumnDataType = "boolean")]
  94. public bool IsEnabled { get; set; } = true;
  95. [SugarColumn(ColumnDescription = "创建时间")]
  96. public DateTime CreatedAt { get; set; } = DateTime.Now;
  97. [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
  98. public DateTime? UpdatedAt { get; set; }
  99. }
  100. [SugarTable("ado_s0_mfg_production_line", "S0 产线")]
  101. [SugarIndex("uk_ado_s0_mfg_pl_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
  102. public class AdoS0MfgProductionLine
  103. {
  104. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  105. public long Id { get; set; }
  106. [SugarColumn(ColumnDescription = "公司", ColumnDataType = "bigint")]
  107. public long CompanyRefId { get; set; }
  108. [SugarColumn(ColumnDescription = "工厂", ColumnDataType = "bigint")]
  109. public long FactoryRefId { get; set; }
  110. [SugarColumn(ColumnDescription = "编码", Length = 100)]
  111. public string Code { get; set; } = string.Empty;
  112. [SugarColumn(ColumnDescription = "名称", Length = 200)]
  113. public string Name { get; set; } = string.Empty;
  114. [SugarColumn(ColumnDescription = "线体类型", Length = 50, IsNullable = true)]
  115. public string? LineType { get; set; }
  116. [SugarColumn(ColumnDescription = "线体分类", Length = 50, IsNullable = true)]
  117. public string? LineCategory { get; set; }
  118. [SugarColumn(ColumnDescription = "库位", ColumnDataType = "bigint", IsNullable = true)]
  119. public long? LocationId { get; set; }
  120. [SugarColumn(ColumnDescription = "车间", ColumnDataType = "bigint", IsNullable = true)]
  121. public long? WorkshopId { get; set; }
  122. [SugarColumn(ColumnDescription = "产能", DecimalDigits = 5, Length = 18, IsNullable = true)]
  123. public decimal? Capacity { get; set; }
  124. [SugarColumn(ColumnDescription = "备注", Length = 500, IsNullable = true)]
  125. public string? Remark { get; set; }
  126. [SugarColumn(ColumnDescription = "启用", ColumnDataType = "boolean")]
  127. public bool IsEnabled { get; set; } = true;
  128. [SugarColumn(ColumnDescription = "创建时间")]
  129. public DateTime CreatedAt { get; set; } = DateTime.Now;
  130. [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
  131. public DateTime? UpdatedAt { get; set; }
  132. }
  133. [SugarTable("ado_s0_mfg_routing", "S0 工艺路线头")]
  134. [SugarIndex("uk_ado_s0_mfg_routing_code", nameof(CompanyRefId), OrderByType.Asc, nameof(FactoryRefId), OrderByType.Asc, nameof(Code), OrderByType.Asc, IsUnique = true)]
  135. public class AdoS0MfgRouting
  136. {
  137. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  138. public long Id { get; set; }
  139. [SugarColumn(ColumnDescription = "公司", ColumnDataType = "bigint")]
  140. public long CompanyRefId { get; set; }
  141. [SugarColumn(ColumnDescription = "工厂", ColumnDataType = "bigint")]
  142. public long FactoryRefId { get; set; }
  143. [SugarColumn(ColumnDescription = "编码", Length = 100)]
  144. public string Code { get; set; } = string.Empty;
  145. [SugarColumn(ColumnDescription = "名称", Length = 200)]
  146. public string Name { get; set; } = string.Empty;
  147. [SugarColumn(ColumnDescription = "物料", ColumnDataType = "bigint", IsNullable = true)]
  148. public long? MaterialId { get; set; }
  149. [SugarColumn(ColumnDescription = "业务版本", Length = 50)]
  150. public string BizVersion { get; set; } = "1.0";
  151. [SugarColumn(ColumnDescription = "文档状态", Length = 50)]
  152. public string DocStatus { get; set; } = "draft";
  153. [SugarColumn(ColumnDescription = "备注", Length = 500, IsNullable = true)]
  154. public string? Remark { get; set; }
  155. [SugarColumn(ColumnDescription = "启用", ColumnDataType = "boolean")]
  156. public bool IsEnabled { get; set; } = true;
  157. [SugarColumn(ColumnDescription = "创建时间")]
  158. public DateTime CreatedAt { get; set; } = DateTime.Now;
  159. [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
  160. public DateTime? UpdatedAt { get; set; }
  161. }
  162. [SugarTable("ado_s0_mfg_routing_operation", "S0 工艺路线工序行")]
  163. public class AdoS0MfgRoutingOperation
  164. {
  165. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  166. public long Id { get; set; }
  167. [SugarColumn(ColumnDescription = "公司", ColumnDataType = "bigint")]
  168. public long CompanyRefId { get; set; }
  169. [SugarColumn(ColumnDescription = "工厂", ColumnDataType = "bigint")]
  170. public long FactoryRefId { get; set; }
  171. [SugarColumn(ColumnDescription = "路线", ColumnDataType = "bigint")]
  172. public long RoutingId { get; set; }
  173. [SugarColumn(ColumnDescription = "工序", ColumnDataType = "bigint")]
  174. public long OperationId { get; set; }
  175. [SugarColumn(ColumnDescription = "排序")]
  176. public int SortNo { get; set; }
  177. [SugarColumn(ColumnDescription = "工作中心", ColumnDataType = "bigint", IsNullable = true)]
  178. public long? WorkCenterId { get; set; }
  179. [SugarColumn(ColumnDescription = "产线", ColumnDataType = "bigint", IsNullable = true)]
  180. public long? ProductionLineId { get; set; }
  181. [SugarColumn(ColumnDescription = "标准工时", DecimalDigits = 5, Length = 18, IsNullable = true)]
  182. public decimal? StdTime { get; set; }
  183. [SugarColumn(ColumnDescription = "备注", Length = 500, IsNullable = true)]
  184. public string? Remark { get; set; }
  185. [SugarColumn(ColumnDescription = "报工工序", ColumnDataType = "boolean")]
  186. public bool IsReportOperation { get; set; }
  187. [SugarColumn(ColumnDescription = "活动1", Length = 100, IsNullable = true)]
  188. public string? Activity1 { get; set; }
  189. [SugarColumn(ColumnDescription = "活动1数量", DecimalDigits = 5, Length = 18, IsNullable = true)]
  190. public decimal? Activity1Qty { get; set; }
  191. [SugarColumn(ColumnDescription = "活动1单位", Length = 50, IsNullable = true)]
  192. public string? Activity1Unit { get; set; }
  193. [SugarColumn(ColumnDescription = "活动2", Length = 100, IsNullable = true)]
  194. public string? Activity2 { get; set; }
  195. [SugarColumn(ColumnDescription = "活动2数量", DecimalDigits = 5, Length = 18, IsNullable = true)]
  196. public decimal? Activity2Qty { get; set; }
  197. [SugarColumn(ColumnDescription = "活动2单位", Length = 50, IsNullable = true)]
  198. public string? Activity2Unit { get; set; }
  199. [SugarColumn(ColumnDescription = "活动3", Length = 100, IsNullable = true)]
  200. public string? Activity3 { get; set; }
  201. [SugarColumn(ColumnDescription = "活动3数量", DecimalDigits = 5, Length = 18, IsNullable = true)]
  202. public decimal? Activity3Qty { get; set; }
  203. [SugarColumn(ColumnDescription = "活动3单位", Length = 50, IsNullable = true)]
  204. public string? Activity3Unit { get; set; }
  205. [SugarColumn(ColumnDescription = "基准数量", DecimalDigits = 5, Length = 18)]
  206. public decimal BaseQty { get; set; } = 1m;
  207. [SugarColumn(ColumnDescription = "委外", ColumnDataType = "boolean")]
  208. public bool IsOutsourced { get; set; }
  209. [SugarColumn(ColumnDescription = "供应商", ColumnDataType = "bigint", IsNullable = true)]
  210. public long? SupplierId { get; set; }
  211. [SugarColumn(ColumnDescription = "委外提前期")]
  212. public int OutsourcedLeadTime { get; set; }
  213. [SugarColumn(ColumnDescription = "启用", ColumnDataType = "boolean")]
  214. public bool IsEnabled { get; set; } = true;
  215. [SugarColumn(ColumnDescription = "创建时间")]
  216. public DateTime CreatedAt { get; set; } = DateTime.Now;
  217. [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
  218. public DateTime? UpdatedAt { get; set; }
  219. }