namespace Admin.NET.Plugin.AiDOP.Dto.S0.Quality; public class AdoS0QualityPagedQueryDto { public string? Keyword { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0QualitySimpleOptionDto { public long Value { get; set; } public string Label { get; set; } = string.Empty; } public class AdoS0QmsRawWhitelistUpsertDto : IValidatableObject { public string? SupplierCode { get; set; } public string? SupplierName { get; set; } public string? MaterialCode { get; set; } public string? MaterialName { get; set; } public string? DimensionType { get; set; } public IEnumerable Validate(ValidationContext validationContext) { var dimensionType = string.IsNullOrWhiteSpace(DimensionType) ? "supplier" : DimensionType.Trim().ToLowerInvariant(); if (dimensionType is not ("supplier" or "material" or "material_supplier")) { yield return new ValidationResult("维度类型仅支持 supplier/material/material_supplier", [nameof(DimensionType)]); yield break; } if ((dimensionType == "supplier" || dimensionType == "material_supplier") && string.IsNullOrWhiteSpace(SupplierCode)) yield return new ValidationResult("供应商编码不能为空", [nameof(SupplierCode)]); if ((dimensionType == "supplier" || dimensionType == "material_supplier") && string.IsNullOrWhiteSpace(SupplierName)) yield return new ValidationResult("供应商名称不能为空", [nameof(SupplierName)]); if ((dimensionType == "material" || dimensionType == "material_supplier") && string.IsNullOrWhiteSpace(MaterialCode)) yield return new ValidationResult("物料编码不能为空", [nameof(MaterialCode)]); } } public class AdoS0QmsSamplingSchemeUpsertDto { [Required(ErrorMessage = "编号不能为空")] [MaxLength(255)] public string Number { get; set; } = string.Empty; [Required(ErrorMessage = "名称不能为空")] [MaxLength(255)] public string Name { get; set; } = string.Empty; [MaxLength(255)] public string? SamplingType { get; set; } [MaxLength(255)] public string? InspectionLevel { get; set; } [MaxLength(255)] public string? Strictness { get; set; } [MaxLength(255)] public string? AqlValue { get; set; } [MaxLength(255)] public string? InspectionType { get; set; } public long? InspectOrgId { get; set; } [MaxLength(255)] public string? InspectUserId { get; set; } [MaxLength(255)] public string? Status { get; set; } [MaxLength(255)] public string? EnableStatus { get; set; } [MaxLength(255)] public string? Comment { get; set; } public decimal? FixedSamplingRate { get; set; } } public class AdoS0QmsInspectionInstrumentUpsertDto { [Required(ErrorMessage = "编号不能为空")] [MaxLength(255)] public string Number { get; set; } = string.Empty; [Required(ErrorMessage = "名称不能为空")] [MaxLength(255)] public string Name { get; set; } = string.Empty; [MaxLength(255)] public string? Model { get; set; } [MaxLength(255)] public string? Specification { get; set; } [MaxLength(255)] public string? Manufacturer { get; set; } [MaxLength(255)] public string? Status { get; set; } [MaxLength(255)] public string? EnableStatus { get; set; } [MaxLength(255)] public string? Comment { get; set; } [MaxLength(255)] public string? GaugeCategory { get; set; } public int? CalibrationCycleDays { get; set; } [MaxLength(50)] public string? NextCalibrationDate { get; set; } } public class AdoS0QmsQualityBaseTypeUpsertDto { [Required(ErrorMessage = "类型分类不能为空")] [MaxLength(100)] public string TypeCategory { get; set; } = string.Empty; [Required(ErrorMessage = "类型编码不能为空")] [MaxLength(100)] public string TypeCode { get; set; } = string.Empty; [Required(ErrorMessage = "简称不能为空")] [MaxLength(200)] public string ShortName { get; set; } = string.Empty; [MaxLength(255)] public string? FullName { get; set; } public bool IsActive { get; set; } = true; [MaxLength(500)] public string? Remark { get; set; } } public class AdoS0QmsInspectionMethodUpsertDto { [Required(ErrorMessage = "编号不能为空")] [MaxLength(255)] public string Number { get; set; } = string.Empty; [Required(ErrorMessage = "名称不能为空")] [MaxLength(255)] public string Name { get; set; } = string.Empty; [MaxLength(255)] public string? ControlStrategy { get; set; } [MaxLength(255)] public string? Status { get; set; } [MaxLength(255)] public string? EnableStatus { get; set; } [MaxLength(255)] public string? Comment { get; set; } } public class AdoS0QmsInspectionItemUpsertDto { [Required(ErrorMessage = "编号不能为空")] [MaxLength(255)] public string Number { get; set; } = string.Empty; [Required(ErrorMessage = "名称不能为空")] [MaxLength(255)] public string Name { get; set; } = string.Empty; public long? CheckMethodId { get; set; } public long? CheckBasisId { get; set; } public long? CheckInstructId { get; set; } [MaxLength(255)] public string? RadioGroupField { get; set; } [MaxLength(255)] public string? RadioGroupField1 { get; set; } public long? MetricType { get; set; } [MaxLength(255)] public string? Status { get; set; } [MaxLength(255)] public string? EnableStatus { get; set; } [MaxLength(255)] public string? Comment { get; set; } } public class AdoS0QmsInspectionFrequencyUpsertDto { [Required(ErrorMessage = "编号不能为空")] [MaxLength(255)] public string Number { get; set; } = string.Empty; [Required(ErrorMessage = "名称不能为空")] [MaxLength(255)] public string Name { get; set; } = string.Empty; [MaxLength(255)] public string? Remark { get; set; } [MaxLength(255)] public string? Status { get; set; } [MaxLength(255)] public string? EnableStatus { get; set; } } public class AdoS0QmsInspectionBasisEntryDto { public long? Id { get; set; } public long? Seq { get; set; } public string? DocumentNumber { get; set; } public string? DocumentName { get; set; } public string? Attachment { get; set; } } public class AdoS0QmsInspectionBasisUpsertDto { [Required(ErrorMessage = "编号不能为空")] public string Number { get; set; } = string.Empty; [Required(ErrorMessage = "名称不能为空")] public string Name { get; set; } = string.Empty; public string? ControlStrategy { get; set; } public long? CreateOrgId { get; set; } public long? UseOrgId { get; set; } public string? Comment { get; set; } public string? Status { get; set; } public string? EnableStatus { get; set; } public List Items { get; set; } = []; } public class AdoS0QmsInspectionStandardEntryDto { public long? Id { get; set; } public long? Seq { get; set; } public string? CheckItems { get; set; } public string? CheckContent { get; set; } public string? NormType { get; set; } public string? SpecValue { get; set; } public decimal? TopValue { get; set; } public decimal? DownValue { get; set; } public long? CheckBasisId { get; set; } public long? CheckMethodId { get; set; } public long? CheckFrequencyId { get; set; } public long? CheckInstructId { get; set; } public string? Unit { get; set; } public long? KeyQuality { get; set; } } public class AdoS0QmsInspectionStandardUpsertDto { [Required(ErrorMessage = "编号不能为空")] public string Number { get; set; } = string.Empty; [Required(ErrorMessage = "名称不能为空")] public string Name { get; set; } = string.Empty; public string? Comment { get; set; } public string? ControlStrategy { get; set; } public long? CreateOrgId { get; set; } public long? UseOrgId { get; set; } public string? Status { get; set; } public string? EnableStatus { get; set; } public List Items { get; set; } = []; } public class AdoS0QmsInspectionPlanEntryDto { public long? Id { get; set; } public int? Seq { get; set; } public string? SetupType { get; set; } public string? MaterialCode { get; set; } public string? MaterialName { get; set; } public long? MaterialTypeId { get; set; } public string? SupplierId { get; set; } public long? SamplingSchemeId { get; set; } public long? InspectionStandardId { get; set; } public long? InspectOrgId { get; set; } public long? InspectUserId { get; set; } public long? QRouteId { get; set; } public string? OperationNo { get; set; } public long? OperationId { get; set; } public long? InspectionFrequencyId { get; set; } public string? ProcessSeq { get; set; } public long? InspectionType { get; set; } } public class AdoS0QmsInspectionPlanUpsertDto { [Required(ErrorMessage = "编号不能为空")] public string Number { get; set; } = string.Empty; [Required(ErrorMessage = "名称不能为空")] public string Name { get; set; } = string.Empty; public string? BizTypeId { get; set; } public string? Comment { get; set; } public string? ControlStrategy { get; set; } public long? CreateOrgId { get; set; } public long? UseOrgId { get; set; } public string? Status { get; set; } public string? EnableStatus { get; set; } public List Items { get; set; } = []; } public class AdoS0QmsRawInspectionSpecEntryDto { public long? Id { get; set; } public int? Seq { get; set; } public string? InspectionItem { get; set; } public string? InspectionStandard { get; set; } public string? InspectionMethod { get; set; } public string? ImageCategory { get; set; } public string? SamplingScheme { get; set; } public string? Remark { get; set; } public string? Attachment { get; set; } public string? UpperLimit { get; set; } public string? LowerLimit { get; set; } } public class AdoS0QmsRawInspectionSpecUpsertDto { [Required(ErrorMessage = "文件编号不能为空")] public string FileNumber { get; set; } = string.Empty; public string? VersionNo { get; set; } public string? DrawingNo { get; set; } public string? RawMaterialName { get; set; } public string? MaterialCode { get; set; } public string? EffectiveDate { get; set; } public string? DrawingVersion { get; set; } public string? MaterialGrade { get; set; } public string? CavityOrMold { get; set; } public string? Attachment { get; set; } public string? FileName { get; set; } public string? Title { get; set; } public List Items { get; set; } = []; } public class AdoS0QmsProcessInspectionSpecEntryDto { public long? Id { get; set; } public string? OperationCode { get; set; } public string? OperationName { get; set; } public string? InspectionItem { get; set; } public string? InspectionMethod { get; set; } public string? InspectionSpec { get; set; } public string? ImageCategory { get; set; } public string? InspectionFrequency { get; set; } public string? TechnicalStandard { get; set; } public long? PeelingForce { get; set; } public string? UpperLimit { get; set; } public string? LowerLimit { get; set; } } public class AdoS0QmsProcessInspectionSpecUpsertDto { public string? ApplicableModel { get; set; } [Required(ErrorMessage = "文件编号不能为空")] public string FileNumber { get; set; } = string.Empty; public string? VersionNo { get; set; } public string? EffectiveDate { get; set; } public string? Attachment { get; set; } public string? MaterialCode { get; set; } public string? Attachment2 { get; set; } public int? Version { get; set; } public List Items { get; set; } = []; } public class AdoS0QmsFqcInspectionSpecEntryDto { public long? Id { get; set; } public string? OperationCode { get; set; } public string? OperationName { get; set; } public string? InspectionItem { get; set; } public string? InspectionMethod { get; set; } public string? InspectionSpec { get; set; } public string? ImageCategory { get; set; } public string? InspectionFrequency { get; set; } public string? TechnicalStandard { get; set; } public long? PeelingForce { get; set; } public string? UpperLimit { get; set; } public string? LowerLimit { get; set; } } public class AdoS0QmsFqcInspectionSpecUpsertDto { public string? ApplicableModel { get; set; } [Required(ErrorMessage = "文件编号不能为空")] public string FileNumber { get; set; } = string.Empty; public string? VersionNo { get; set; } public string? EffectiveDate { get; set; } public string? Attachment { get; set; } public string? MaterialCode { get; set; } public string? Attachment2 { get; set; } public int? Version { get; set; } public List Items { get; set; } = []; } public class AdoS0QmsOqcInspectionSpecEntryDto { public long? Id { get; set; } public string? OperationCode { get; set; } public string? OperationName { get; set; } public string? InspectionItem { get; set; } public string? InspectionMethod { get; set; } public string? InspectionSpec { get; set; } public string? ImageCategory { get; set; } public string? InspectionFrequency { get; set; } public string? TechnicalStandard { get; set; } public long? PeelingForce { get; set; } public string? UpperLimit { get; set; } public string? LowerLimit { get; set; } } public class AdoS0QmsOqcInspectionSpecUpsertDto { public string? ApplicableModel { get; set; } [Required(ErrorMessage = "文件编号不能为空")] public string FileNumber { get; set; } = string.Empty; public string? VersionNo { get; set; } public string? EffectiveDate { get; set; } public string? Attachment { get; set; } public string? MaterialCode { get; set; } public string? Attachment2 { get; set; } public int? Version { get; set; } public List Items { get; set; } = []; }