|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- using SqlSugar;
- using System.Collections.Generic;
-
- namespace Models
- {
- [SugarIndex("index_{table}_code", nameof(Product.Code), OrderByType.Asc, isUnique: true)]
- public class Product : BaseTable
- {
- public string Code { get; set; }
- public string Name { get; set; }
- [SugarColumn(IsNullable = true)]
- public string Spec { get; set; }
-
- //类别
- public int ClassesId { get; set; }
- [Navigate(NavigateType.ManyToOne, nameof(ClassesId))]
- public Classes ClassesInfo { get; set; }
-
- //目数
- public int HoleCount { get; set; }
-
- //外观检测模型文件 //不存在默认使用 .\onnx\default.onnx
- [SugarColumn(IsNullable = true)]
- public string DefectModelFile { get; set; }
-
- //Files Type0-产品图纸
- [Navigate(NavigateType.OneToMany, nameof(Attachment.Pid))]
- public List<Attachment> AttachmentList { get; set; }//注意禁止给books手动赋值,也不能new初始化,否则导航查询不到
-
- //当前最新批次号
- public string BatchId { get; set; }
- /// <summary>
- /// 目标数量
- /// </summary>
- public int TargetCount { get; set; }
- /// <summary>
- /// 完成数量
- /// </summary>
- public int CompleteCount { get; set; }
- [Navigate(NavigateType.OneToMany, nameof(BatchHistory.Pid))]
- public List<BatchHistory> BatchHistoryList { get; set; }//注意禁止给books手动赋值,也不能new初始化,否则导航查询不到
-
- /// <summary>
- /// 合格标准
- /// </summary>
- [Navigate(NavigateType.OneToMany, nameof(QualifiedCriterion.Pid))]
- public List<QualifiedCriterion> QualifiedCriterionList { get; set; }
-
- [SugarColumn(IsNullable = true)]
- public string Note { get; set; }
-
- //判断上下限
- public double TensionBaseValue { get; set; }
- public double TensionUpFloatValue { get; set; }
- public double TensionDownFloatValue { get; set; }
- public double HeightBaseValue { get; set; }
- public double HeightUpFloatValue { get; set; }
- public double HeightDownFloatValue { get; set; }
- public double LineWidthBaseValue { get; set; }
- public double LineWidthUpFloatValue { get; set; }
- public double LineWidthDownFloatValue { get; set; }
-
- //以前只支持Y方向PT
- public double PTBaseValue { get; set; }
- public double PTUpFloatValue { get; set; }
- public double PTDownFloatValue { get; set; }
- //新增X方向PT
- public double PTXBaseValue { get; set; }
- public double PTXUpFloatValue { get; set; }
- public double PTXDownFloatValue { get; set; }
-
-
-
- //高度BASE值
- public string HeightBaseDec { get; set; }
-
- //====生产流程绑定
- [SugarColumn(IsNullable = true)]
- public int? StepId { get; set; }
- [Navigate(NavigateType.ManyToOne, nameof(StepId))]
- public Step StepInfo { get; set; }
- //流程工序列表
- [Navigate(NavigateType.OneToMany, nameof(ProductProcess.Pid))]
- public List<ProductProcess> ProductProcessList { get; set; }//注意禁止给books手动赋值,也不能new初始化,否则导航查询不到
-
- //====校正流程绑定
- [SugarColumn(IsNullable = true)]
- public int? ReviseStepId { get; set; }
- [Navigate(NavigateType.ManyToOne, nameof(ReviseStepId))]
- public Step ReviseStepInfo { get; set; }
-
- //校正流程工序列表
- [Navigate(NavigateType.OneToMany, nameof(ProductReviseProcess.Pid))]
- public List<ProductReviseProcess> ProductReviseProcessList { get; set; }//注意禁止给books手动赋值,也不能new初始化,否则导航查询不到
-
- //====修复流程绑定
- [SugarColumn(IsNullable = true)]
- public int? AssistStepId { get; set; }
- [Navigate(NavigateType.ManyToOne, nameof(AssistStepId))]
- public Step AssistStepInfo { get; set; }
-
- //校正流程工序列表
- [Navigate(NavigateType.OneToMany, nameof(ProductAssistProcess.Pid))]
- public List<ProductAssistProcess> ProductAssistProcessList { get; set; }//注意禁止给books手动赋值,也不能new初始化,否则导航查询不到
-
- //生产记录(用于导航删除)
- [Navigate(NavigateType.OneToMany, nameof(Order.ProductId))]
- public List<Order> OrderList { get; set; }//注意禁止给books手动赋值,也不能new初始化,否则导航查询不到
-
- //2023-11-2 加入mark使用
- //mark类型 0:无mark
- public int MarkType { get; set; }
- //mark尺寸
- public double MarkSize { get; set; }
- //抓点图像
- [SugarColumn(IsNullable = true)]
- public string MapPath { get; set; }
- //抓取点位
- [SugarColumn(IsNullable = true, Length = 2048)]
- public string GetPointList { get; set; }
-
- //2023-12-18 加入mark干扰判断,是否主栅
- public int MarkDisturb { get; set; }
- public int MainGrid { get; set; }
-
- //2023-12-19 新流程方案参数
- //工单
- [SugarColumn(IsNullable = true)]
- public string WorkOrderCode { get; set; }
-
- //灵活测试点位
- [Navigate(NavigateType.OneToMany, nameof(TestDefectPoints.Pid))]
- public List<TestDefectPoints> TestDefectPointsList { get; set; }
-
- //2024-1-24 加入是否存在pad点
- [SugarColumn(IsNullable = true)]
- public int HavePad { get; set; }
-
- //2024-5-10 加入是否存在网节
- [SugarColumn(IsNullable = true)]
- public int HaveWJ { get; set; }
-
- //2024 03-12 加入打印内容绑定产品
- #region 打印
- [SugarColumn(IsNullable = true)]
- /// <summary>
- /// 开启检测单打印
- /// </summary>
- public bool EnableOrderPrint { get; set; }
- [SugarColumn(IsNullable = true)]
- /// <summary>
- /// 打印模板路径
- /// </summary>
- public string OrderTempPath { get; set; }
- [SugarColumn(IsNullable = true)]
- /// <summary>
- /// 开启标签打印
- /// </summary>
- public bool EnableLabelPrint { get; set; }
- [SugarColumn(IsNullable = true)]
- /// <summary>
- /// 打印模板路径
- /// </summary>
- public string LabelTempPath { get; set; }
-
- [SugarColumn(IsNullable = true)]
- /// <summary>
- /// 开启Excel打印
- /// </summary>
- public bool EnableExcelPrint { get; set; }
- [SugarColumn(IsNullable = true)]
- /// <summary>
- /// 打印模板路径
- /// </summary>
- public string ExcelTempPath { get; set; }
- [SugarColumn(IsNullable = true)]
-
- //打印信息
- [Navigate(NavigateType.OneToMany, nameof(PrintInfo.Pid))]
- public List<PrintInfo> PrintInfoList { get; set; }
-
- //保存excel
- [SugarColumn(IsNullable = true)]
- /// <summary>
- /// 开启Excel保存
- /// </summary>
- public bool EnableOrderSave { get; set; }
- [SugarColumn(IsNullable = true)]
- /// <summary>
- /// 保存路径
- /// </summary>
- public string OrderSavePath { get; set; }
- #endregion
- }
- /// <summary>
- /// 结束的批次才加入
- /// </summary>
- public class Attachment : BaseTable
- {
- /// <summary>
- /// 源表名,小写
- /// </summary>
- public string TBName { get; set; }
- /// <summary>
- /// 子类 看TB主表对应类型
- /// </summary>
- public int Type { get; set; } = 0;
- public int Pid { get; set; }
- /// <summary>
- /// 原始文件名还扩展名
- /// </summary>
- public string Name { get; set; }
- /// <summary>
- /// 本地文件名 子路径+文件名(无扩展名):{TBName}\\{NameTimestamp} //NameTimestamp=id\\A
- /// </summary>
- public string NameTimestamp { get; set; }
- /// <summary>
- /// .pdf/.doc
- /// </summary>
- public string ExtendName { get; set; }
- }
- /// <summary>
- /// 非全量copy于StepProcess工序,只有产品修改工序参数时保存
- /// </summary>
- public class ProductProcess : BaseTable
- {
- public int Pid { get; set; }
- public string ProcessCode { get; set; }
- /// <summary>
- /// json
- /// </summary>
- [SugarColumn(IsNullable = true, Length = 2048)]
- public string ProcessParams { get; set; }
- }
- public class ProductReviseProcess : ProductProcess
- {
- }
- public class ProductAssistProcess : ProductProcess
- {
- }
- /// <summary>
- /// 结束的批次才加入
- /// </summary>
- public class BatchHistory : BaseTable
- {
- public int Pid { get; set; }
- public string BatchId { get; set; }
- /// <summary>
- /// 目标数量
- /// </summary>
- public int TargetCount { get; set; }
- /// <summary>
- /// 当前数量
- /// </summary>
- public int CompleteCount { get; set; }
- }
- /// <summary>
- /// 合格标准
- /// </summary>
- public class QualifiedCriterion : BaseTable
- {
- public int Pid { get; set; }
- public string DefectCode { get; set; }//pp,sx,... EnumUtil.Convert2Enum
- /// <summary>
- /// 阈值 20240409
- /// </summary>
- public double Threshold { get; set; }
- /// <summary>
- /// 尺寸
- /// </summary>
- public float Size { get; set; }
- /// <summary>
- /// 最大允许缺陷数量
- /// </summary>
- public int MaxDefectCount { get; set; }
- }
-
- /// <summary>
- /// 2023-12-25 单点测试点位
- /// </summary>
- public class TestDefectPoints : BaseTable
- {
- public int Pid { get; set; }
- /// <summary>
- /// 点位代码
- /// </summary>
- public string PointCode { get; set; }
- /// <summary>
- /// 点位X
- /// </summary>
- public double X { get; set; }
- /// <summary>
- /// 点位Y
- /// </summary>
- public double Y { get; set; }
- }
-
- /// <summary>
- /// 2024-03-12 打印信息
- /// </summary>
- public class PrintInfo : BaseTable
- {
- public int Pid { get; set; }
-
- /// <summary>
- /// 是否为数字
- /// </summary>
- public bool IsValue { get; set; }
- /// <summary>
- /// 打印类型0:excel,1:标签,2:工单
- /// </summary>
- public int Type { get; set; }
- /// <summary>
- /// 打印位置
- /// </summary>
- public string PrintKey { get; set; }
- /// <summary>
- /// 打印代码或数据
- /// </summary>
- public string PrintCode { get; set; }
- /// <summary>
- /// 备注名称
- /// </summary>
-
- public string PrintName { get; set; }
- }
- }
|