| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- namespace Admin.NET.Plugin.AiDOP.Entity.S0.Quality;
- /// <summary>
- /// 成品检验规范(FQC)主表 —— S7 FQC 运行链路的唯一事实源。
- ///
- /// 【为什么不是 qms_fqcjygf】S0 侧原 `qms_fqcjygf` 无任何下游消费者;S7 报检 → 生成检验单
- /// 实际读的是 `qms_ccjygf` / `qms_ccjygfzb`(`FqcApplyService` 经桥表 `ado_s7_fqc_spec_material_map`
- /// 精确解析)。本实体把 S0 维护入口直接落到运行链路的表上,见 `S7:D-002`。
- ///
- /// 【物理事实(2026-09-02 实测,勿假设)】
- /// · 本表**无 PRIMARY KEY、无任何索引、无唯一约束**;Id 由 SqlSugar `DataExecuting` AOP
- /// 在 `IsPrimaryKey=true && long==0` 时赋雪花值,不依赖 DB 自增;
- /// · 无 status / org / 审计列,字段就是下面这 9 个,不要凭空引用不存在的列;
- /// · 列名大小写混杂(`qms_ccjygfzb.UpperToleranceLimit` 为 PascalCase),
- /// 在 `EnableUnderLine=false` 下必须逐列显式 `ColumnName`,否则映射错列。
- ///
- /// 【租户】本实体**不实现 `ITenantIdFilter`**,全局租户过滤器对它不生效;
- /// 租户隔离 100% 依赖调用方显式谓词(见 `AdoS0QmsFqcInspectionSpecsController`)。
- /// </summary>
- [SugarTable("qms_ccjygf", "成品检验规范")]
- public class AdoS0QmsFinishedInspectionSpec
- {
- [SugarColumn(ColumnName = "id", ColumnDescription = "主键", IsPrimaryKey = true, ColumnDataType = "bigint")]
- public long Id { get; set; }
- [SugarColumn(ColumnName = "tenant_id", ColumnDescription = "租户Id", IsNullable = false, ColumnDataType = "bigint")]
- public long TenantId { get; set; }
- [SugarColumn(ColumnName = "wjbh", ColumnDescription = "文件编号", IsNullable = true, Length = 800)]
- public string? FileNumber { get; set; }
- [SugarColumn(ColumnName = "bb", ColumnDescription = "版本", IsNullable = true, Length = 800)]
- public string? VersionNo { get; set; }
- [SugarColumn(ColumnName = "cpmc", ColumnDescription = "产品名称", IsNullable = true, Length = 800)]
- public string? ProductName { get; set; }
- [SugarColumn(ColumnName = "cpxh", ColumnDescription = "产品型号", IsNullable = true, Length = 800)]
- public string? ProductModel { get; set; }
- /// <summary>生效日期。源列是 varchar(800) 自由文本(历史含 `2023..07.18`、`见受控章` 等脏值),
- /// 故保持 string,不改列类型;桥表侧由 NormalizeDate 归一为 datetime。</summary>
- [SugarColumn(ColumnName = "sxrq", ColumnDescription = "生效日期", IsNullable = true, Length = 800)]
- public string? EffectiveDate { get; set; }
- /// <summary>适用物料编码。历史为多物料脏串(分隔符不统一),新建议单码或分号分隔。</summary>
- [SugarColumn(ColumnName = "wlbm", ColumnDescription = "物料编码", IsNullable = true, ColumnDataType = "text")]
- public string? MaterialCode { get; set; }
- [SugarColumn(ColumnName = "fj", ColumnDescription = "附件", IsNullable = true, ColumnDataType = "text")]
- public string? Attachment { get; set; }
- }
- /// <summary>
- /// 成品检验规范-检验明细。列集合直接对齐 `FqcApplyService` 生成检验单时的快照读取集
- /// (`xh / jyxm / UpperToleranceLimit / LowerToleranceLimit / lrlx / jsyq / jyyqsbgj /
- /// jyff / jytk / jsbz / cyfa / jl / SizeSpecifications`),未被快照消费的历史列
- /// (`bztk` / `isPeel` / `isDisplay`)不纳入实体,避免 CodeFirst 误改结构。
- /// </summary>
- [SugarTable("qms_ccjygfzb", "成品检验规范-检验明细")]
- public class AdoS0QmsFinishedInspectionSpecEntry
- {
- [SugarColumn(ColumnName = "id", ColumnDescription = "主键", IsPrimaryKey = true, ColumnDataType = "bigint")]
- public long Id { get; set; }
- [SugarColumn(ColumnName = "tenant_id", ColumnDescription = "租户Id", IsNullable = false, ColumnDataType = "bigint")]
- public long TenantId { get; set; }
- [SugarColumn(ColumnName = "glid", ColumnDescription = "主表ID", IsNullable = true, ColumnDataType = "bigint")]
- public long? MasterId { get; set; }
- /// <summary>序号。源列为 varchar(800);`FqcApplyService.ParseXh` 会尝试解析为 int,
- /// 解析失败落 NULL(不报错),故此处保持 string。</summary>
- [SugarColumn(ColumnName = "xh", ColumnDescription = "序号", IsNullable = true, Length = 800)]
- public string? SeqNo { get; set; }
- [SugarColumn(ColumnName = "jyxm", ColumnDescription = "检验项目", IsNullable = true, ColumnDataType = "text")]
- public string? InspectionItem { get; set; }
- /// <summary>录入类型:NUMERIC / NON_NUMERIC / NULL(未设置)。判定开关——
- /// NUMERIC 走上下限自动判定,NON_NUMERIC 由检验员人工确认。</summary>
- [SugarColumn(ColumnName = "lrlx", ColumnDescription = "录入类型", IsNullable = true, Length = 20)]
- public string? ResultType { get; set; }
- [SugarColumn(ColumnName = "UpperToleranceLimit", ColumnDescription = "上限", IsNullable = true, Length = 800)]
- public string? UpperLimit { get; set; }
- [SugarColumn(ColumnName = "LowerToleranceLimit", ColumnDescription = "下限", IsNullable = true, Length = 800)]
- public string? LowerLimit { get; set; }
- [SugarColumn(ColumnName = "jsyq", ColumnDescription = "技术要求", IsNullable = true, ColumnDataType = "text")]
- public string? TechnicalRequirement { get; set; }
- [SugarColumn(ColumnName = "jyff", ColumnDescription = "检验方法", IsNullable = true, ColumnDataType = "text")]
- public string? InspectionMethod { get; set; }
- [SugarColumn(ColumnName = "jyyqsbgj", ColumnDescription = "检验仪器设备工具", IsNullable = true, ColumnDataType = "text")]
- public string? Instrument { get; set; }
- [SugarColumn(ColumnName = "jytk", ColumnDescription = "检验条款", IsNullable = true, ColumnDataType = "text")]
- public string? InspectionClause { get; set; }
- [SugarColumn(ColumnName = "jsbz", ColumnDescription = "技术标准", IsNullable = true, ColumnDataType = "text")]
- public string? TechnicalStandard { get; set; }
- [SugarColumn(ColumnName = "cyfa", ColumnDescription = "抽样方案", IsNullable = true, Length = 1000)]
- public string? SamplingPlan { get; set; }
- [SugarColumn(ColumnName = "jl", ColumnDescription = "记录", IsNullable = true, ColumnDataType = "text")]
- public string? Record { get; set; }
- [SugarColumn(ColumnName = "SizeSpecifications", ColumnDescription = "尺寸规格", IsNullable = true, Length = 800)]
- public string? SizeSpecifications { get; set; }
- [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", IsNullable = true, Length = 800)]
- public string? Remarks { get; set; }
- }
|