namespace Admin.NET.Plugin.AiDOP.MaterialWarehouse.Dto;
/// S5 IQC 检规物料映射 列表查询入参(全部为等值/精确过滤,禁 LIKE 物料码)。
public class S5IqcSpecMapListInput
{
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
/// 物料编码(精确匹配 material_code,禁子串)。
public string? MaterialCode { get; set; }
/// 检规 id(qms_jygf.id)。
public long? SpecId { get; set; }
/// 检规文件编号 wjbh(精确)。
public string? SpecNo { get; set; }
/// EXACT / MANUAL / NOT_FOUND / GLUE_UNRESOLVED。
public string? MatchStatus { get; set; }
}
/// S5 IQC 检规物料映射 行。
public class S5IqcSpecMapRow
{
public long Id { get; set; }
public long SpecId { get; set; }
public string? SpecNo { get; set; }
public string? SpecVersion { get; set; }
public int Seq { get; set; }
public string? RawToken { get; set; }
public string? MaterialCode { get; set; }
public string? MatchStatus { get; set; }
public string? SourceRaw { get; set; }
public bool IsManual { get; set; }
public string? Note { get; set; }
public DateTime? CreateTime { get; set; }
public DateTime? UpdateTime { get; set; }
}
/// 人工绑定入参。
public class S5IqcSpecMapBindInput
{
/// 检规 id(qms_jygf.id),必须属当前租户。
public long SpecId { get; set; }
/// 物料编码,必须存在于当前租户 ItemMaster。
public string? MaterialCode { get; set; }
public string? Note { get; set; }
}
/// 人工解绑入参。
public class S5IqcSpecMapUnbindInput
{
/// 桥表行 id(仅允许删除 is_manual=1 的行)。
public long Id { get; set; }
}
/// 单检规同步结果摘要。
public class S5IqcSpecSyncSummary
{
public bool Ok { get; set; }
public long SpecId { get; set; }
/// 本次产生的 token 总数(去重后)。
public int TokenCount { get; set; }
public int Exact { get; set; }
public int NotFound { get; set; }
public int GlueUnresolved { get; set; }
/// spec 内重复 token 被丢弃的条数。
public int DuplicateDropped { get; set; }
/// 被删除并重建的自动派生行数。
public int AutoRowsReplaced { get; set; }
/// 保留未动的人工绑定行数。
public int ManualRowsPreserved { get; set; }
/// 检规已不存在(Purge 场景)。
public bool SpecMissing { get; set; }
public string? Message { get; set; }
}
/// 整租户重建结果摘要。
public class S5IqcSpecRebuildSummary
{
public bool Ok { get; set; }
public int SpecCount { get; set; }
public int TokenCount { get; set; }
public int Exact { get; set; }
public int NotFound { get; set; }
public int GlueUnresolved { get; set; }
public int DuplicateDropped { get; set; }
public int ManualRowsPreserved { get; set; }
/// 至少有一个 EXACT 命中的检规数。
public int SpecsWithExact { get; set; }
}