AdoS0QualityDtos.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. namespace Admin.NET.Plugin.AiDOP.Dto.S0.Quality;
  2. public class AdoS0QualityPagedQueryDto
  3. {
  4. public string? Keyword { get; set; }
  5. public int Page { get; set; } = 1;
  6. public int PageSize { get; set; } = 20;
  7. }
  8. public class AdoS0QualitySimpleOptionDto
  9. {
  10. public long Value { get; set; }
  11. public string Label { get; set; } = string.Empty;
  12. }
  13. public class AdoS0QmsRawWhitelistUpsertDto : IValidatableObject
  14. {
  15. public string? SupplierCode { get; set; }
  16. public string? SupplierName { get; set; }
  17. public string? MaterialCode { get; set; }
  18. public string? MaterialName { get; set; }
  19. public string? DimensionType { get; set; }
  20. public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
  21. {
  22. var dimensionType = string.IsNullOrWhiteSpace(DimensionType)
  23. ? "supplier"
  24. : DimensionType.Trim().ToLowerInvariant();
  25. if (dimensionType is not ("supplier" or "material" or "material_supplier"))
  26. {
  27. yield return new ValidationResult("维度类型仅支持 supplier/material/material_supplier", [nameof(DimensionType)]);
  28. yield break;
  29. }
  30. if ((dimensionType == "supplier" || dimensionType == "material_supplier")
  31. && string.IsNullOrWhiteSpace(SupplierCode))
  32. yield return new ValidationResult("供应商编码不能为空", [nameof(SupplierCode)]);
  33. if ((dimensionType == "supplier" || dimensionType == "material_supplier")
  34. && string.IsNullOrWhiteSpace(SupplierName))
  35. yield return new ValidationResult("供应商名称不能为空", [nameof(SupplierName)]);
  36. if ((dimensionType == "material" || dimensionType == "material_supplier")
  37. && string.IsNullOrWhiteSpace(MaterialCode))
  38. yield return new ValidationResult("物料编码不能为空", [nameof(MaterialCode)]);
  39. }
  40. }
  41. public class AdoS0QmsSamplingSchemeUpsertDto
  42. {
  43. [Required(ErrorMessage = "编号不能为空")]
  44. public string Number { get; set; } = string.Empty;
  45. [Required(ErrorMessage = "名称不能为空")]
  46. public string Name { get; set; } = string.Empty;
  47. public string? SamplingType { get; set; }
  48. public string? InspectionLevel { get; set; }
  49. public string? Strictness { get; set; }
  50. public string? AqlValue { get; set; }
  51. public string? InspectionType { get; set; }
  52. public long? InspectOrgId { get; set; }
  53. public string? InspectUserId { get; set; }
  54. public string? Status { get; set; }
  55. public string? EnableStatus { get; set; }
  56. public string? Comment { get; set; }
  57. public decimal? FixedSamplingRate { get; set; }
  58. }
  59. public class AdoS0QmsInspectionInstrumentUpsertDto
  60. {
  61. [Required(ErrorMessage = "编号不能为空")]
  62. public string Number { get; set; } = string.Empty;
  63. [Required(ErrorMessage = "名称不能为空")]
  64. public string Name { get; set; } = string.Empty;
  65. public string? Model { get; set; }
  66. public string? Specification { get; set; }
  67. public string? Manufacturer { get; set; }
  68. public string? Status { get; set; }
  69. public string? EnableStatus { get; set; }
  70. public string? Comment { get; set; }
  71. public string? GaugeCategory { get; set; }
  72. public int? CalibrationCycleDays { get; set; }
  73. public string? NextCalibrationDate { get; set; }
  74. }
  75. public class AdoS0QmsQualityBaseTypeUpsertDto
  76. {
  77. [Required(ErrorMessage = "类型分类不能为空")]
  78. public string TypeCategory { get; set; } = string.Empty;
  79. [Required(ErrorMessage = "类型编码不能为空")]
  80. public string TypeCode { get; set; } = string.Empty;
  81. [Required(ErrorMessage = "简称不能为空")]
  82. public string ShortName { get; set; } = string.Empty;
  83. public string? FullName { get; set; }
  84. public bool IsActive { get; set; } = true;
  85. public string? Remark { get; set; }
  86. }
  87. public class AdoS0QmsInspectionMethodUpsertDto
  88. {
  89. [Required(ErrorMessage = "编号不能为空")]
  90. public string Number { get; set; } = string.Empty;
  91. [Required(ErrorMessage = "名称不能为空")]
  92. public string Name { get; set; } = string.Empty;
  93. public string? ControlStrategy { get; set; }
  94. public string? Status { get; set; }
  95. public string? EnableStatus { get; set; }
  96. public string? Comment { get; set; }
  97. }
  98. public class AdoS0QmsInspectionItemUpsertDto
  99. {
  100. [Required(ErrorMessage = "编号不能为空")]
  101. public string Number { get; set; } = string.Empty;
  102. [Required(ErrorMessage = "名称不能为空")]
  103. public string Name { get; set; } = string.Empty;
  104. public long? CheckMethodId { get; set; }
  105. public long? CheckBasisId { get; set; }
  106. public long? CheckInstructId { get; set; }
  107. public string? RadioGroupField { get; set; }
  108. public string? RadioGroupField1 { get; set; }
  109. public long? MetricType { get; set; }
  110. public string? Status { get; set; }
  111. public string? EnableStatus { get; set; }
  112. public string? Comment { get; set; }
  113. }
  114. public class AdoS0QmsInspectionFrequencyUpsertDto
  115. {
  116. [Required(ErrorMessage = "编号不能为空")]
  117. public string Number { get; set; } = string.Empty;
  118. [Required(ErrorMessage = "名称不能为空")]
  119. public string Name { get; set; } = string.Empty;
  120. public string? Remark { get; set; }
  121. public string? Status { get; set; }
  122. public string? EnableStatus { get; set; }
  123. }
  124. public class AdoS0QmsInspectionBasisEntryDto
  125. {
  126. public long? Id { get; set; }
  127. public long? Seq { get; set; }
  128. public string? DocumentNumber { get; set; }
  129. public string? DocumentName { get; set; }
  130. public string? Attachment { get; set; }
  131. }
  132. public class AdoS0QmsInspectionBasisUpsertDto
  133. {
  134. [Required(ErrorMessage = "编号不能为空")]
  135. public string Number { get; set; } = string.Empty;
  136. [Required(ErrorMessage = "名称不能为空")]
  137. public string Name { get; set; } = string.Empty;
  138. public string? ControlStrategy { get; set; }
  139. public long? CreateOrgId { get; set; }
  140. public long? UseOrgId { get; set; }
  141. public string? Comment { get; set; }
  142. public string? Status { get; set; }
  143. public string? EnableStatus { get; set; }
  144. public List<AdoS0QmsInspectionBasisEntryDto> Items { get; set; } = [];
  145. }
  146. public class AdoS0QmsInspectionStandardEntryDto
  147. {
  148. public long? Id { get; set; }
  149. public long? Seq { get; set; }
  150. public string? CheckItems { get; set; }
  151. public string? CheckContent { get; set; }
  152. public string? NormType { get; set; }
  153. public string? SpecValue { get; set; }
  154. public decimal? TopValue { get; set; }
  155. public decimal? DownValue { get; set; }
  156. public long? CheckBasisId { get; set; }
  157. public long? CheckMethodId { get; set; }
  158. public long? CheckFrequencyId { get; set; }
  159. public long? CheckInstructId { get; set; }
  160. public string? Unit { get; set; }
  161. public long? KeyQuality { get; set; }
  162. }
  163. public class AdoS0QmsInspectionStandardUpsertDto
  164. {
  165. [Required(ErrorMessage = "编号不能为空")]
  166. public string Number { get; set; } = string.Empty;
  167. [Required(ErrorMessage = "名称不能为空")]
  168. public string Name { get; set; } = string.Empty;
  169. public string? Comment { get; set; }
  170. public string? ControlStrategy { get; set; }
  171. public long? CreateOrgId { get; set; }
  172. public long? UseOrgId { get; set; }
  173. public string? Status { get; set; }
  174. public string? EnableStatus { get; set; }
  175. public List<AdoS0QmsInspectionStandardEntryDto> Items { get; set; } = [];
  176. }
  177. public class AdoS0QmsInspectionPlanEntryDto
  178. {
  179. public long? Id { get; set; }
  180. public int? Seq { get; set; }
  181. public string? SetupType { get; set; }
  182. public string? MaterialCode { get; set; }
  183. public string? MaterialName { get; set; }
  184. public long? MaterialTypeId { get; set; }
  185. public string? SupplierId { get; set; }
  186. public long? SamplingSchemeId { get; set; }
  187. public long? InspectionStandardId { get; set; }
  188. public long? InspectOrgId { get; set; }
  189. public long? InspectUserId { get; set; }
  190. public long? QRouteId { get; set; }
  191. public string? OperationNo { get; set; }
  192. public long? OperationId { get; set; }
  193. public long? InspectionFrequencyId { get; set; }
  194. public string? ProcessSeq { get; set; }
  195. public long? InspectionType { get; set; }
  196. }
  197. public class AdoS0QmsInspectionPlanUpsertDto
  198. {
  199. [Required(ErrorMessage = "编号不能为空")]
  200. public string Number { get; set; } = string.Empty;
  201. [Required(ErrorMessage = "名称不能为空")]
  202. public string Name { get; set; } = string.Empty;
  203. public string? BizTypeId { get; set; }
  204. public string? Comment { get; set; }
  205. public string? ControlStrategy { get; set; }
  206. public long? CreateOrgId { get; set; }
  207. public long? UseOrgId { get; set; }
  208. public string? Status { get; set; }
  209. public string? EnableStatus { get; set; }
  210. public List<AdoS0QmsInspectionPlanEntryDto> Items { get; set; } = [];
  211. }
  212. public class AdoS0QmsRawInspectionSpecEntryDto
  213. {
  214. public long? Id { get; set; }
  215. public int? Seq { get; set; }
  216. public string? InspectionItem { get; set; }
  217. public string? InspectionStandard { get; set; }
  218. public string? InspectionMethod { get; set; }
  219. public string? ImageCategory { get; set; }
  220. public string? SamplingScheme { get; set; }
  221. public string? Remark { get; set; }
  222. public string? Attachment { get; set; }
  223. public string? UpperLimit { get; set; }
  224. public string? LowerLimit { get; set; }
  225. }
  226. public class AdoS0QmsRawInspectionSpecUpsertDto
  227. {
  228. [Required(ErrorMessage = "文件编号不能为空")]
  229. public string FileNumber { get; set; } = string.Empty;
  230. public string? VersionNo { get; set; }
  231. public string? DrawingNo { get; set; }
  232. public string? RawMaterialName { get; set; }
  233. public string? MaterialCode { get; set; }
  234. public string? EffectiveDate { get; set; }
  235. public string? DrawingVersion { get; set; }
  236. public string? MaterialGrade { get; set; }
  237. public string? CavityOrMold { get; set; }
  238. public string? Attachment { get; set; }
  239. public string? FileName { get; set; }
  240. public string? Title { get; set; }
  241. public List<AdoS0QmsRawInspectionSpecEntryDto> Items { get; set; } = [];
  242. }
  243. public class AdoS0QmsProcessInspectionSpecEntryDto
  244. {
  245. public long? Id { get; set; }
  246. public string? OperationCode { get; set; }
  247. public string? OperationName { get; set; }
  248. public string? InspectionItem { get; set; }
  249. public string? InspectionMethod { get; set; }
  250. public string? InspectionSpec { get; set; }
  251. public string? ImageCategory { get; set; }
  252. public string? InspectionFrequency { get; set; }
  253. public string? TechnicalStandard { get; set; }
  254. public long? PeelingForce { get; set; }
  255. public string? UpperLimit { get; set; }
  256. public string? LowerLimit { get; set; }
  257. }
  258. public class AdoS0QmsProcessInspectionSpecUpsertDto
  259. {
  260. public string? ApplicableModel { get; set; }
  261. [Required(ErrorMessage = "文件编号不能为空")]
  262. public string FileNumber { get; set; } = string.Empty;
  263. public string? VersionNo { get; set; }
  264. public string? EffectiveDate { get; set; }
  265. public string? Attachment { get; set; }
  266. public string? MaterialCode { get; set; }
  267. public string? Attachment2 { get; set; }
  268. public int? Version { get; set; }
  269. public List<AdoS0QmsProcessInspectionSpecEntryDto> Items { get; set; } = [];
  270. }
  271. public class AdoS0QmsFqcInspectionSpecEntryDto
  272. {
  273. public long? Id { get; set; }
  274. public string? OperationCode { get; set; }
  275. public string? OperationName { get; set; }
  276. public string? InspectionItem { get; set; }
  277. public string? InspectionMethod { get; set; }
  278. public string? InspectionSpec { get; set; }
  279. public string? ImageCategory { get; set; }
  280. public string? InspectionFrequency { get; set; }
  281. public string? TechnicalStandard { get; set; }
  282. public long? PeelingForce { get; set; }
  283. public string? UpperLimit { get; set; }
  284. public string? LowerLimit { get; set; }
  285. }
  286. public class AdoS0QmsFqcInspectionSpecUpsertDto
  287. {
  288. public string? ApplicableModel { get; set; }
  289. [Required(ErrorMessage = "文件编号不能为空")]
  290. public string FileNumber { get; set; } = string.Empty;
  291. public string? VersionNo { get; set; }
  292. public string? EffectiveDate { get; set; }
  293. public string? Attachment { get; set; }
  294. public string? MaterialCode { get; set; }
  295. public string? Attachment2 { get; set; }
  296. public int? Version { get; set; }
  297. public List<AdoS0QmsFqcInspectionSpecEntryDto> Items { get; set; } = [];
  298. }
  299. public class AdoS0QmsOqcInspectionSpecEntryDto
  300. {
  301. public long? Id { get; set; }
  302. public string? OperationCode { get; set; }
  303. public string? OperationName { get; set; }
  304. public string? InspectionItem { get; set; }
  305. public string? InspectionMethod { get; set; }
  306. public string? InspectionSpec { get; set; }
  307. public string? ImageCategory { get; set; }
  308. public string? InspectionFrequency { get; set; }
  309. public string? TechnicalStandard { get; set; }
  310. public long? PeelingForce { get; set; }
  311. public string? UpperLimit { get; set; }
  312. public string? LowerLimit { get; set; }
  313. }
  314. public class AdoS0QmsOqcInspectionSpecUpsertDto
  315. {
  316. public string? ApplicableModel { get; set; }
  317. [Required(ErrorMessage = "文件编号不能为空")]
  318. public string FileNumber { get; set; } = string.Empty;
  319. public string? VersionNo { get; set; }
  320. public string? EffectiveDate { get; set; }
  321. public string? Attachment { get; set; }
  322. public string? MaterialCode { get; set; }
  323. public string? Attachment2 { get; set; }
  324. public int? Version { get; set; }
  325. public List<AdoS0QmsOqcInspectionSpecEntryDto> Items { get; set; } = [];
  326. }