AdoS0QualityDtos.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  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. [MaxLength(255)]
  45. public string Number { get; set; } = string.Empty;
  46. [Required(ErrorMessage = "名称不能为空")]
  47. [MaxLength(255)]
  48. public string Name { get; set; } = string.Empty;
  49. [MaxLength(255)]
  50. public string? SamplingType { get; set; }
  51. [MaxLength(255)]
  52. public string? InspectionLevel { get; set; }
  53. [MaxLength(255)]
  54. public string? Strictness { get; set; }
  55. [MaxLength(255)]
  56. public string? AqlValue { get; set; }
  57. [MaxLength(255)]
  58. public string? InspectionType { get; set; }
  59. public long? InspectOrgId { get; set; }
  60. [MaxLength(255)]
  61. public string? InspectUserId { get; set; }
  62. [MaxLength(255)]
  63. public string? Status { get; set; }
  64. [MaxLength(255)]
  65. public string? EnableStatus { get; set; }
  66. [MaxLength(255)]
  67. public string? Comment { get; set; }
  68. public decimal? FixedSamplingRate { get; set; }
  69. }
  70. public class AdoS0QmsInspectionInstrumentUpsertDto
  71. {
  72. [Required(ErrorMessage = "编号不能为空")]
  73. [MaxLength(255)]
  74. public string Number { get; set; } = string.Empty;
  75. [Required(ErrorMessage = "名称不能为空")]
  76. [MaxLength(255)]
  77. public string Name { get; set; } = string.Empty;
  78. [MaxLength(255)]
  79. public string? Model { get; set; }
  80. [MaxLength(255)]
  81. public string? Specification { get; set; }
  82. [MaxLength(255)]
  83. public string? Manufacturer { get; set; }
  84. [MaxLength(255)]
  85. public string? Status { get; set; }
  86. [MaxLength(255)]
  87. public string? EnableStatus { get; set; }
  88. [MaxLength(255)]
  89. public string? Comment { get; set; }
  90. [MaxLength(255)]
  91. public string? GaugeCategory { get; set; }
  92. public int? CalibrationCycleDays { get; set; }
  93. [MaxLength(50)]
  94. public string? NextCalibrationDate { get; set; }
  95. }
  96. public class AdoS0QmsQualityBaseTypeUpsertDto
  97. {
  98. [Required(ErrorMessage = "类型分类不能为空")]
  99. [MaxLength(100)]
  100. public string TypeCategory { get; set; } = string.Empty;
  101. [Required(ErrorMessage = "类型编码不能为空")]
  102. [MaxLength(100)]
  103. public string TypeCode { get; set; } = string.Empty;
  104. [Required(ErrorMessage = "简称不能为空")]
  105. [MaxLength(200)]
  106. public string ShortName { get; set; } = string.Empty;
  107. [MaxLength(255)]
  108. public string? FullName { get; set; }
  109. public bool IsActive { get; set; } = true;
  110. [MaxLength(500)]
  111. public string? Remark { get; set; }
  112. }
  113. public class AdoS0QmsInspectionMethodUpsertDto
  114. {
  115. [Required(ErrorMessage = "编号不能为空")]
  116. [MaxLength(255)]
  117. public string Number { get; set; } = string.Empty;
  118. [Required(ErrorMessage = "名称不能为空")]
  119. [MaxLength(255)]
  120. public string Name { get; set; } = string.Empty;
  121. [MaxLength(255)]
  122. public string? ControlStrategy { get; set; }
  123. [MaxLength(255)]
  124. public string? Status { get; set; }
  125. [MaxLength(255)]
  126. public string? EnableStatus { get; set; }
  127. [MaxLength(255)]
  128. public string? Comment { get; set; }
  129. }
  130. public class AdoS0QmsInspectionItemUpsertDto
  131. {
  132. [Required(ErrorMessage = "编号不能为空")]
  133. [MaxLength(255)]
  134. public string Number { get; set; } = string.Empty;
  135. [Required(ErrorMessage = "名称不能为空")]
  136. [MaxLength(255)]
  137. public string Name { get; set; } = string.Empty;
  138. public long? CheckMethodId { get; set; }
  139. public long? CheckBasisId { get; set; }
  140. public long? CheckInstructId { get; set; }
  141. [MaxLength(255)]
  142. public string? RadioGroupField { get; set; }
  143. [MaxLength(255)]
  144. public string? RadioGroupField1 { get; set; }
  145. public long? MetricType { get; set; }
  146. [MaxLength(255)]
  147. public string? Status { get; set; }
  148. [MaxLength(255)]
  149. public string? EnableStatus { get; set; }
  150. [MaxLength(255)]
  151. public string? Comment { get; set; }
  152. }
  153. public class AdoS0QmsInspectionFrequencyUpsertDto
  154. {
  155. [Required(ErrorMessage = "编号不能为空")]
  156. [MaxLength(255)]
  157. public string Number { get; set; } = string.Empty;
  158. [Required(ErrorMessage = "名称不能为空")]
  159. [MaxLength(255)]
  160. public string Name { get; set; } = string.Empty;
  161. [MaxLength(255)]
  162. public string? Remark { get; set; }
  163. [MaxLength(255)]
  164. public string? Status { get; set; }
  165. [MaxLength(255)]
  166. public string? EnableStatus { get; set; }
  167. }
  168. public class AdoS0QmsInspectionBasisEntryDto
  169. {
  170. public long? Id { get; set; }
  171. public long? Seq { get; set; }
  172. public string? DocumentNumber { get; set; }
  173. public string? DocumentName { get; set; }
  174. public string? Attachment { get; set; }
  175. }
  176. public class AdoS0QmsInspectionBasisUpsertDto
  177. {
  178. [Required(ErrorMessage = "编号不能为空")]
  179. public string Number { get; set; } = string.Empty;
  180. [Required(ErrorMessage = "名称不能为空")]
  181. public string Name { get; set; } = string.Empty;
  182. public string? ControlStrategy { get; set; }
  183. public long? CreateOrgId { get; set; }
  184. public long? UseOrgId { get; set; }
  185. public string? Comment { get; set; }
  186. public string? Status { get; set; }
  187. public string? EnableStatus { get; set; }
  188. public List<AdoS0QmsInspectionBasisEntryDto> Items { get; set; } = [];
  189. }
  190. public class AdoS0QmsInspectionStandardEntryDto
  191. {
  192. public long? Id { get; set; }
  193. public long? Seq { get; set; }
  194. public string? CheckItems { get; set; }
  195. public string? CheckContent { get; set; }
  196. public string? NormType { get; set; }
  197. public string? SpecValue { get; set; }
  198. public decimal? TopValue { get; set; }
  199. public decimal? DownValue { get; set; }
  200. public long? CheckBasisId { get; set; }
  201. public long? CheckMethodId { get; set; }
  202. public long? CheckFrequencyId { get; set; }
  203. public long? CheckInstructId { get; set; }
  204. public string? Unit { get; set; }
  205. public long? KeyQuality { get; set; }
  206. }
  207. public class AdoS0QmsInspectionStandardUpsertDto
  208. {
  209. [Required(ErrorMessage = "编号不能为空")]
  210. public string Number { get; set; } = string.Empty;
  211. [Required(ErrorMessage = "名称不能为空")]
  212. public string Name { get; set; } = string.Empty;
  213. public string? Comment { get; set; }
  214. public string? ControlStrategy { get; set; }
  215. public long? CreateOrgId { get; set; }
  216. public long? UseOrgId { get; set; }
  217. public string? Status { get; set; }
  218. public string? EnableStatus { get; set; }
  219. public List<AdoS0QmsInspectionStandardEntryDto> Items { get; set; } = [];
  220. }
  221. public class AdoS0QmsInspectionPlanEntryDto
  222. {
  223. public long? Id { get; set; }
  224. public int? Seq { get; set; }
  225. public string? SetupType { get; set; }
  226. public string? MaterialCode { get; set; }
  227. public string? MaterialName { get; set; }
  228. public long? MaterialTypeId { get; set; }
  229. public string? SupplierId { get; set; }
  230. public long? SamplingSchemeId { get; set; }
  231. public long? InspectionStandardId { get; set; }
  232. public long? InspectOrgId { get; set; }
  233. public long? InspectUserId { get; set; }
  234. public long? QRouteId { get; set; }
  235. public string? OperationNo { get; set; }
  236. public long? OperationId { get; set; }
  237. public long? InspectionFrequencyId { get; set; }
  238. public string? ProcessSeq { get; set; }
  239. public long? InspectionType { get; set; }
  240. }
  241. public class AdoS0QmsInspectionPlanUpsertDto
  242. {
  243. [Required(ErrorMessage = "编号不能为空")]
  244. public string Number { get; set; } = string.Empty;
  245. [Required(ErrorMessage = "名称不能为空")]
  246. public string Name { get; set; } = string.Empty;
  247. public string? BizTypeId { get; set; }
  248. public string? Comment { get; set; }
  249. public string? ControlStrategy { get; set; }
  250. public long? CreateOrgId { get; set; }
  251. public long? UseOrgId { get; set; }
  252. public string? Status { get; set; }
  253. public string? EnableStatus { get; set; }
  254. public List<AdoS0QmsInspectionPlanEntryDto> Items { get; set; } = [];
  255. }
  256. public class AdoS0QmsRawInspectionSpecEntryDto
  257. {
  258. public long? Id { get; set; }
  259. public int? Seq { get; set; }
  260. public string? InspectionItem { get; set; }
  261. public string? InspectionStandard { get; set; }
  262. public string? InspectionMethod { get; set; }
  263. public string? ImageCategory { get; set; }
  264. public string? SamplingScheme { get; set; }
  265. public string? Remark { get; set; }
  266. public string? Attachment { get; set; }
  267. public string? UpperLimit { get; set; }
  268. public string? LowerLimit { get; set; }
  269. }
  270. public class AdoS0QmsRawInspectionSpecUpsertDto
  271. {
  272. [Required(ErrorMessage = "文件编号不能为空")]
  273. public string FileNumber { get; set; } = string.Empty;
  274. public string? VersionNo { get; set; }
  275. public string? DrawingNo { get; set; }
  276. public string? RawMaterialName { get; set; }
  277. public string? MaterialCode { get; set; }
  278. public string? EffectiveDate { get; set; }
  279. public string? DrawingVersion { get; set; }
  280. public string? MaterialGrade { get; set; }
  281. public string? CavityOrMold { get; set; }
  282. public string? Attachment { get; set; }
  283. public string? FileName { get; set; }
  284. public string? Title { get; set; }
  285. public List<AdoS0QmsRawInspectionSpecEntryDto> Items { get; set; } = [];
  286. }
  287. public class AdoS0QmsProcessInspectionSpecEntryDto
  288. {
  289. public long? Id { get; set; }
  290. public string? OperationCode { get; set; }
  291. public string? OperationName { get; set; }
  292. public string? InspectionItem { get; set; }
  293. public string? InspectionMethod { get; set; }
  294. public string? InspectionSpec { get; set; }
  295. public string? ImageCategory { get; set; }
  296. public string? InspectionFrequency { get; set; }
  297. public string? TechnicalStandard { get; set; }
  298. public long? PeelingForce { get; set; }
  299. public string? UpperLimit { get; set; }
  300. public string? LowerLimit { get; set; }
  301. }
  302. public class AdoS0QmsProcessInspectionSpecUpsertDto
  303. {
  304. public string? ApplicableModel { get; set; }
  305. [Required(ErrorMessage = "文件编号不能为空")]
  306. public string FileNumber { get; set; } = string.Empty;
  307. public string? VersionNo { get; set; }
  308. public string? EffectiveDate { get; set; }
  309. public string? Attachment { get; set; }
  310. public string? MaterialCode { get; set; }
  311. public string? Attachment2 { get; set; }
  312. public int? Version { get; set; }
  313. public List<AdoS0QmsProcessInspectionSpecEntryDto> Items { get; set; } = [];
  314. }
  315. public class AdoS0QmsFqcInspectionSpecEntryDto
  316. {
  317. public long? Id { get; set; }
  318. public string? OperationCode { get; set; }
  319. public string? OperationName { get; set; }
  320. public string? InspectionItem { get; set; }
  321. public string? InspectionMethod { get; set; }
  322. public string? InspectionSpec { get; set; }
  323. public string? ImageCategory { get; set; }
  324. public string? InspectionFrequency { get; set; }
  325. public string? TechnicalStandard { get; set; }
  326. public long? PeelingForce { get; set; }
  327. public string? UpperLimit { get; set; }
  328. public string? LowerLimit { get; set; }
  329. }
  330. public class AdoS0QmsFqcInspectionSpecUpsertDto
  331. {
  332. public string? ApplicableModel { get; set; }
  333. [Required(ErrorMessage = "文件编号不能为空")]
  334. public string FileNumber { get; set; } = string.Empty;
  335. public string? VersionNo { get; set; }
  336. public string? EffectiveDate { get; set; }
  337. public string? Attachment { get; set; }
  338. public string? MaterialCode { get; set; }
  339. public string? Attachment2 { get; set; }
  340. public int? Version { get; set; }
  341. public List<AdoS0QmsFqcInspectionSpecEntryDto> Items { get; set; } = [];
  342. }
  343. public class AdoS0QmsOqcInspectionSpecEntryDto
  344. {
  345. public long? Id { get; set; }
  346. public string? OperationCode { get; set; }
  347. public string? OperationName { get; set; }
  348. public string? InspectionItem { get; set; }
  349. public string? InspectionMethod { get; set; }
  350. public string? InspectionSpec { get; set; }
  351. public string? ImageCategory { get; set; }
  352. public string? InspectionFrequency { get; set; }
  353. public string? TechnicalStandard { get; set; }
  354. public long? PeelingForce { get; set; }
  355. public string? UpperLimit { get; set; }
  356. public string? LowerLimit { get; set; }
  357. }
  358. public class AdoS0QmsOqcInspectionSpecUpsertDto
  359. {
  360. public string? ApplicableModel { get; set; }
  361. [Required(ErrorMessage = "文件编号不能为空")]
  362. public string FileNumber { get; set; } = string.Empty;
  363. public string? VersionNo { get; set; }
  364. public string? EffectiveDate { get; set; }
  365. public string? Attachment { get; set; }
  366. public string? MaterialCode { get; set; }
  367. public string? Attachment2 { get; set; }
  368. public int? Version { get; set; }
  369. public List<AdoS0QmsOqcInspectionSpecEntryDto> Items { get; set; } = [];
  370. }