From eb4e1b69def87e31fe04bbc86daaba2ac4e8703e Mon Sep 17 00:00:00 2001 From: huangxianguo Date: Mon, 8 Jul 2024 15:16:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=9F=E4=BA=A7=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=8E=A8=E9=80=81=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Model/Entity/ChipColorEnum.cs | 8 +++++ MasstransferCommon/Model/Entity/Substrate.cs | 34 +++++++++++++++++++ MasstransferCommon/Model/Entity/Wafer.cs | 22 ++++++++++++ .../Model/Entity/WaferUsedRecord.cs | 17 ++++++++++ .../Model/Enum/SubstrateTypeEnum.cs | 12 +++++++ .../DataExporter/Model/StrikeRecord.cs | 17 ++++++++++ .../DataExporter/Model/StrikeWaferRecord.cs | 16 +++++++++ .../DataExporter/StrikeRecordService.cs | 13 +++++++ .../MasstransferExporter.csproj | 1 - 9 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 MasstransferCommon/Model/Entity/ChipColorEnum.cs create mode 100644 MasstransferCommon/Model/Entity/Substrate.cs create mode 100644 MasstransferCommon/Model/Entity/Wafer.cs create mode 100644 MasstransferCommon/Model/Entity/WaferUsedRecord.cs create mode 100644 MasstransferCommon/Model/Enum/SubstrateTypeEnum.cs create mode 100644 MasstransferExporter/DataExporter/Model/StrikeRecord.cs create mode 100644 MasstransferExporter/DataExporter/Model/StrikeWaferRecord.cs create mode 100644 MasstransferExporter/DataExporter/StrikeRecordService.cs diff --git a/MasstransferCommon/Model/Entity/ChipColorEnum.cs b/MasstransferCommon/Model/Entity/ChipColorEnum.cs new file mode 100644 index 0000000..20706bc --- /dev/null +++ b/MasstransferCommon/Model/Entity/ChipColorEnum.cs @@ -0,0 +1,8 @@ +namespace MasstransferCommon.Model.Entity; + +public enum ChipColorEnum +{ + R = 1, + G = 2, + B = 3 +} \ No newline at end of file diff --git a/MasstransferCommon/Model/Entity/Substrate.cs b/MasstransferCommon/Model/Entity/Substrate.cs new file mode 100644 index 0000000..bd93bb4 --- /dev/null +++ b/MasstransferCommon/Model/Entity/Substrate.cs @@ -0,0 +1,34 @@ +using System.ComponentModel; +using MasstransferCommon.Model.Enum; +using SQLite; + +namespace MasstransferCommon.Model.Entity; + +/// +/// 基板信息 +/// +[Table("substrates")] +public class Substrate : Entity +{ + [Column("context_id"), Description("上下文ID")] + public string? ContextId { get; set; } + + [Column("substrate_code"), Description("基板编号")] + public string SubstrateCode { get; set; } + + [Column("jig_code"), Description("治具编号")] + public string JigCode { get; set; } + + [Column("substrate_type"), Description("基板类型")] + public SubstrateTypeEnum SubstrateType { get; set; } + + [Column("row"), Description("基板行")] public int Row { get; set; } + + [Column("column"), Description("基板列")] public int Column { get; set; } + + [Column("batch_no"), Description("批次号")] + public string BatchNo { get; set; } + + [Column("formula_id"), Description("配方ID")] + public string FormulaId { get; set; } +} \ No newline at end of file diff --git a/MasstransferCommon/Model/Entity/Wafer.cs b/MasstransferCommon/Model/Entity/Wafer.cs new file mode 100644 index 0000000..6880ed2 --- /dev/null +++ b/MasstransferCommon/Model/Entity/Wafer.cs @@ -0,0 +1,22 @@ +using System.ComponentModel; +using SQLite; + +namespace MasstransferCommon.Model.Entity; + +[Table("wafers"), Description("晶环信息")] +public class Wafer : Entity +{ + [Column("wafer_code"), Description("晶片编号")] + public string? WaferCode { get; set; } + + [Column("color"), Description("晶片颜色")] public ChipColorEnum Color { get; set; } + + [Column("context_id"), Description("上下文id")] + public string? ContextId { get; set; } + + [Column("column"), Description("列")] public int Column { get; set; } + + [Column("row"), Description("行")] public int Row { get; set; } + + [Column("used"), Description("是否已使用")] public bool Used { get; set; } +} \ No newline at end of file diff --git a/MasstransferCommon/Model/Entity/WaferUsedRecord.cs b/MasstransferCommon/Model/Entity/WaferUsedRecord.cs new file mode 100644 index 0000000..03c4836 --- /dev/null +++ b/MasstransferCommon/Model/Entity/WaferUsedRecord.cs @@ -0,0 +1,17 @@ +using System.ComponentModel; +using SQLite; + +namespace MasstransferCommon.Model.Entity; + +[Table("wafer_used_record"), Description("晶环使用记录")] +public class WaferUsedRecord : Entity +{ + [Column("context_id"), Description("上下文编号")] + public string? ContextId { get; set; } + + [Column("wafer_code"), Description("晶环编号")] + public string? WaferCode { get; set; } + + [Column("substrate_code"), Description("基板编号")] + public string? SubstrateCode { get; set; } +} \ No newline at end of file diff --git a/MasstransferCommon/Model/Enum/SubstrateTypeEnum.cs b/MasstransferCommon/Model/Enum/SubstrateTypeEnum.cs new file mode 100644 index 0000000..0992101 --- /dev/null +++ b/MasstransferCommon/Model/Enum/SubstrateTypeEnum.cs @@ -0,0 +1,12 @@ +using System.ComponentModel; + +namespace MasstransferCommon.Model.Enum; + +/// +/// 基材类型 +/// +public enum SubstrateTypeEnum +{ + [Description("PCB")] PCB = 1, + [Description("玻璃")] Glass = 2 +} \ No newline at end of file diff --git a/MasstransferExporter/DataExporter/Model/StrikeRecord.cs b/MasstransferExporter/DataExporter/Model/StrikeRecord.cs new file mode 100644 index 0000000..dba48a5 --- /dev/null +++ b/MasstransferExporter/DataExporter/Model/StrikeRecord.cs @@ -0,0 +1,17 @@ +namespace MasstransferExporter.DataExporter.Model; + +/// +/// 动打记录 +/// 每次基板动打完成后进行触发上传 +/// +public class StrikeRecord +{ + public string BatchNumber { get; set; } + public string PcbNumber { get; set; } + public string ChipType { get; set; } + public string HitQuantity { get; set; } + public string PcbInputTimeCost { get; set; } + public string PcbScanTimeCost { get; set; } + public string PcbOutputTimeCost { get; set; } + public List Rounds { get; set; } +} \ No newline at end of file diff --git a/MasstransferExporter/DataExporter/Model/StrikeWaferRecord.cs b/MasstransferExporter/DataExporter/Model/StrikeWaferRecord.cs new file mode 100644 index 0000000..97218ff --- /dev/null +++ b/MasstransferExporter/DataExporter/Model/StrikeWaferRecord.cs @@ -0,0 +1,16 @@ +namespace MasstransferExporter.DataExporter.Model; + +/// +/// 每次动打期间用到的wafer记录 +/// +public class StrikeWaferRecord +{ + public string WaferNumber { get; set; } + public string ChipQuantity { get; set; } + public string WaferInputTimeCost { get; set; } + public string ChipScanTimeCost { get; set; } + public string ProdutionTimeCost { get; set; } + public string PcbCheckTimeCost { get; set; } + public string WaferOutputTimeCost { get; set; } + public string HitedQuantity { get; set; } +} \ No newline at end of file diff --git a/MasstransferExporter/DataExporter/StrikeRecordService.cs b/MasstransferExporter/DataExporter/StrikeRecordService.cs new file mode 100644 index 0000000..b78c3db --- /dev/null +++ b/MasstransferExporter/DataExporter/StrikeRecordService.cs @@ -0,0 +1,13 @@ +namespace MasstransferExporter.DataExporter; + +public class StrikeRecordService +{ + /// + /// 上报动打记录 + /// + private static void ReportStrikeRecord() + { + // 根据这个基板编号,从记录中找到所有的跟基板有关的生产记录 + + } +} \ No newline at end of file diff --git a/MasstransferExporter/MasstransferExporter.csproj b/MasstransferExporter/MasstransferExporter.csproj index 00b007c..25d8340 100644 --- a/MasstransferExporter/MasstransferExporter.csproj +++ b/MasstransferExporter/MasstransferExporter.csproj @@ -35,7 +35,6 @@ -