Просмотр исходного кода

添加零件清洗,烘烤,温度数据读取

callm 1 день назад
Родитель
Сommit
fc583fedce

+ 47 - 0
UAS_MES_ZKLH/.workbuddy/memory/2026-09-17.md

@@ -1,5 +1,52 @@
 # 2026-09-17 工作日志
 
+## 新增 Make_PLCMonitor(2026-09-20 追加:PLC 温度监控页面)
+
+需求:对接串口转网口模块(Modbus TCP),定时读台达 PLC 的 1#舱温度 D141、2#舱温度 D142 并显示。
+
+新增文件(已加入 csproj):
+- `FunctionCode/Make/Make_PLCMonitor.cs` — Modbus TCP 客户端为手写实现(TcpClient + 功能码 0x03 读保持寄存器),
+  **没有引入 NModbus 等 NuGet 依赖**。D141/D142 相邻一次读 2 个寄存器。
+- `FunctionCode/Make/Make_PLCMonitor.Designer.cs` — 连接设置(IP/端口/站号/间隔秒)、温度显示、立即读取、记录框。
+- `FunctionCode/Make/Make_PLCMonitor.resx` — 复制的标准空 resx。
+
+关键逻辑:
+- 长连接 + 读取失败自动重连(TryReconnect);WinForms Timer 按"间隔(秒)"轮询。
+- 台达 D 寄存器 = Modbus 保持寄存器,地址直接用 D 编号(D141→141)。
+- "温度小数位"默认 1(台达常存 x10),设 0 显示原始值。
+- FormClosing 停 Timer 并关闭连接。
+
+菜单注册:窗体通过 `Assembly.CreateInstance("UAS_MES_NEW." + sn_caller)` 加载(NavagationBar.cs:131),
+需在 CS$SYSNAVATION 表加一条 sn_caller='Make.Make_PLCMonitor'、sn_using=1 的菜单记录。
+
+### 新增零件清洗/零件烘烤页面(2026-09-20,表 SINGLEBOARD)
+- 新文件:`Make_PartClean.cs/.Designer.cs`(SB_STEPCODE='CLEAN')、`Make_PartDry.cs/.Designer.cs`('DRY'),
+  PartDry 由 PartClean sed 复制生成,已注册 csproj。
+- 业务流程:SN 回车录入(批次内查重) → 批次号规则 PC/PD+yyyyMMddHHmmss(16位) →
+  开始按钮 update SB_STARTTIME+状态'清洗中/烘烤中'(仅 SB_STARTTIME is null 的行) →
+  结束按钮 update SB_ENDTIME+状态'已完成',之后当前批次置空,下一 SN 生成新批次。
+- 页面 Load 会恢复未结束批次(max(SB_BATCHCODE) where SB_ENDTIME is null)。
+- DataGridView 显示:SN/录入时间/开始清洗(烘烤)时间/录入人/状态;支持按批次号查询。
+- **假设项**:主键序列名 SINGLEBOARD_SEQ 也是按规律猜的;SB_STEPCODE 用 'CLEAN'/'DRY',如实际值不同需改两个文件顶部常量。
+- 布局与 Make_PLCMonitor 同风格:GroupBoxWithBorder + NormalButton + EnterTextBox + asc 自适应。
+
+### 温度入库(2026-09-20,表 TEMPLOG)
+- 每次采集成功后往 TEMPLOG 插 2 条:TL_ID=TEMPLOG_SEQ.nextval、TL_DATE=sysdate、
+  TL_DEVICEID=舱号('1#'/'2#')、TL_TP=按小数位换算后的温度值。
+- 插入失败只写界面记录,不影响采集显示(采集与入库解耦)。
+- **假设项待确认**:序列名 TEMPLOG_SEQ 是按 <表名>_SEQ 规律猜的;TL_DEVICEID 存舱号而非 IP/站号——
+  如序列名不对或设备ID应存 IP,改 Make_PLCMonitor.cs 顶部两个常量和 InsertTempLog 里一行即可。
+
+### 布局重构(2026-09-20,用户反馈太拥挤)
+按项目统一风格重写 Designer(参考 Make_ColorBoxWeigh):
+- 控件换成项目自定义控件:`GroupBoxWithBorder`(BorderColor/TextColor)、`NormalButton`(AllPower/Power/IsShowBorder)、
+  `RichTextAutoBottom`、`EnterTextBox`(ID/Str 等属性)。
+- 字体:标签 微软雅黑 15F、温度值 40F(绿色)、正文 12F;AutoScaleDimensions (12F,24F);FormBorderStyle.None;Tag="Make!PLCMonitor"。
+- 布局:连接设置(32,30,1540x200)、温度数据(32,260,1540x380,两个温度值左右分栏)、记录(32,725,1540x330)、状态栏。
+- Load 里 asc.controllInitializeSize(this) + SizeChanged 里 asc.controlAutoSize(this),与其他页面一致。
+- Designer 不再引用 ComponentResourceManager/resx 图片(NormalButton 未设 Image 属性,resx 为空模板即可)。
+
+
 ## Query_SOP.cs 上传逻辑改造(FunctionCode/Query/Query_SOP.cs)
 
 背景:SOP 上传(JPG/Excel 转图片、PDF 两种模式)需要按 SOP 编号解析并写入 productsop 表。

+ 424 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PLCMonitor.Designer.cs

@@ -0,0 +1,424 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_PLCMonitor
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.grpConnect = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.lblIp = new System.Windows.Forms.Label();
+            this.ip = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.lblPort = new System.Windows.Forms.Label();
+            this.port = new System.Windows.Forms.NumericUpDown();
+            this.lblUnit = new System.Windows.Forms.Label();
+            this.unitid = new System.Windows.Forms.NumericUpDown();
+            this.lblInterval = new System.Windows.Forms.Label();
+            this.interval = new System.Windows.Forms.NumericUpDown();
+            this.btnConnect = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.btnDisconnect = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.grpData = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.lblD141 = new System.Windows.Forms.Label();
+            this.lblD141Value = new System.Windows.Forms.Label();
+            this.lblD142 = new System.Windows.Forms.Label();
+            this.lblD142Value = new System.Windows.Forms.Label();
+            this.lblDecimals = new System.Windows.Forms.Label();
+            this.decimals = new System.Windows.Forms.NumericUpDown();
+            this.btnReadNow = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.lblRecord = new System.Windows.Forms.Label();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.lblStatus = new System.Windows.Forms.Label();
+            this.timer1 = new System.Windows.Forms.Timer(this.components);
+            this.grpConnect.SuspendLayout();
+            this.grpData.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.port)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.unitid)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.interval)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.decimals)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // grpConnect
+            // 
+            this.grpConnect.BorderColor = System.Drawing.Color.Black;
+            this.grpConnect.Controls.Add(this.lblIp);
+            this.grpConnect.Controls.Add(this.ip);
+            this.grpConnect.Controls.Add(this.lblPort);
+            this.grpConnect.Controls.Add(this.port);
+            this.grpConnect.Controls.Add(this.lblUnit);
+            this.grpConnect.Controls.Add(this.unitid);
+            this.grpConnect.Controls.Add(this.lblInterval);
+            this.grpConnect.Controls.Add(this.interval);
+            this.grpConnect.Controls.Add(this.btnConnect);
+            this.grpConnect.Controls.Add(this.btnDisconnect);
+            this.grpConnect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.grpConnect.Location = new System.Drawing.Point(32, 30);
+            this.grpConnect.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.grpConnect.Name = "grpConnect";
+            this.grpConnect.Size = new System.Drawing.Size(1540, 200);
+            this.grpConnect.TabIndex = 0;
+            this.grpConnect.TabStop = false;
+            this.grpConnect.Text = "连接设置(Modbus TCP)";
+            this.grpConnect.TextColor = System.Drawing.Color.Black;
+            // 
+            // lblIp
+            // 
+            this.lblIp.AutoSize = true;
+            this.lblIp.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblIp.Location = new System.Drawing.Point(32, 50);
+            this.lblIp.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblIp.Name = "lblIp";
+            this.lblIp.Size = new System.Drawing.Size(122, 52);
+            this.lblIp.TabIndex = 0;
+            this.lblIp.Text = "IP地址";
+            // 
+            // ip
+            // 
+            this.ip.AllPower = null;
+            this.ip.BackColor = System.Drawing.Color.White;
+            this.ip.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ip.ID = null;
+            this.ip.Location = new System.Drawing.Point(220, 52);
+            this.ip.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.ip.Name = "ip";
+            this.ip.Power = null;
+            this.ip.Size = new System.Drawing.Size(320, 55);
+            this.ip.Str = null;
+            this.ip.Str1 = null;
+            this.ip.Str2 = null;
+            this.ip.TabIndex = 1;
+            // 
+            // lblPort
+            // 
+            this.lblPort.AutoSize = true;
+            this.lblPort.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblPort.Location = new System.Drawing.Point(620, 50);
+            this.lblPort.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblPort.Name = "lblPort";
+            this.lblPort.Size = new System.Drawing.Size(82, 52);
+            this.lblPort.TabIndex = 2;
+            this.lblPort.Text = "端口";
+            // 
+            // port
+            // 
+            this.port.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.port.Location = new System.Drawing.Point(730, 52);
+            this.port.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.port.Maximum = new decimal(new int[] {
+            65535,
+            0,
+            0,
+            0});
+            this.port.Name = "port";
+            this.port.Size = new System.Drawing.Size(160, 51);
+            this.port.TabIndex = 3;
+            // 
+            // lblUnit
+            // 
+            this.lblUnit.AutoSize = true;
+            this.lblUnit.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblUnit.Location = new System.Drawing.Point(970, 50);
+            this.lblUnit.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblUnit.Name = "lblUnit";
+            this.lblUnit.Size = new System.Drawing.Size(82, 52);
+            this.lblUnit.TabIndex = 4;
+            this.lblUnit.Text = "站号";
+            // 
+            // unitid
+            // 
+            this.unitid.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.unitid.Location = new System.Drawing.Point(1080, 52);
+            this.unitid.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.unitid.Maximum = new decimal(new int[] {
+            247,
+            0,
+            0,
+            0});
+            this.unitid.Name = "unitid";
+            this.unitid.Size = new System.Drawing.Size(140, 51);
+            this.unitid.TabIndex = 5;
+            // 
+            // lblInterval
+            // 
+            this.lblInterval.AutoSize = true;
+            this.lblInterval.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblInterval.Location = new System.Drawing.Point(1290, 50);
+            this.lblInterval.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblInterval.Name = "lblInterval";
+            this.lblInterval.Size = new System.Drawing.Size(122, 52);
+            this.lblInterval.TabIndex = 6;
+            this.lblInterval.Text = "间隔(秒)";
+            // 
+            // interval
+            // 
+            this.interval.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.interval.Location = new System.Drawing.Point(1440, 52);
+            this.interval.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.interval.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+            this.interval.Maximum = new decimal(new int[] {
+            3600,
+            0,
+            0,
+            0});
+            this.interval.Name = "interval";
+            this.interval.Size = new System.Drawing.Size(90, 51);
+            this.interval.TabIndex = 7;
+            // 
+            // btnConnect
+            // 
+            this.btnConnect.AllPower = null;
+            this.btnConnect.BackColor = System.Drawing.Color.Transparent;
+            this.btnConnect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnConnect.IsShowBorder = true;
+            this.btnConnect.Location = new System.Drawing.Point(220, 125);
+            this.btnConnect.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnConnect.Name = "btnConnect";
+            this.btnConnect.Power = null;
+            this.btnConnect.Size = new System.Drawing.Size(160, 52);
+            this.btnConnect.TabIndex = 8;
+            this.btnConnect.Text = "连接";
+            this.btnConnect.UseVisualStyleBackColor = true;
+            this.btnConnect.Click += new System.EventHandler(this.Connect_Click);
+            // 
+            // btnDisconnect
+            // 
+            this.btnDisconnect.AllPower = null;
+            this.btnDisconnect.BackColor = System.Drawing.Color.Transparent;
+            this.btnDisconnect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnDisconnect.IsShowBorder = true;
+            this.btnDisconnect.Location = new System.Drawing.Point(420, 125);
+            this.btnDisconnect.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnDisconnect.Name = "btnDisconnect";
+            this.btnDisconnect.Power = null;
+            this.btnDisconnect.Size = new System.Drawing.Size(160, 52);
+            this.btnDisconnect.TabIndex = 9;
+            this.btnDisconnect.Text = "断开";
+            this.btnDisconnect.UseVisualStyleBackColor = true;
+            this.btnDisconnect.Click += new System.EventHandler(this.Disconnect_Click);
+            // 
+            // grpData
+            // 
+            this.grpData.BorderColor = System.Drawing.Color.Black;
+            this.grpData.Controls.Add(this.lblD141);
+            this.grpData.Controls.Add(this.lblD141Value);
+            this.grpData.Controls.Add(this.lblD142);
+            this.grpData.Controls.Add(this.lblD142Value);
+            this.grpData.Controls.Add(this.lblDecimals);
+            this.grpData.Controls.Add(this.decimals);
+            this.grpData.Controls.Add(this.btnReadNow);
+            this.grpData.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.grpData.Location = new System.Drawing.Point(32, 260);
+            this.grpData.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.grpData.Name = "grpData";
+            this.grpData.Size = new System.Drawing.Size(1540, 380);
+            this.grpData.TabIndex = 1;
+            this.grpData.TabStop = false;
+            this.grpData.Text = "温度数据(台达PLC)";
+            this.grpData.TextColor = System.Drawing.Color.Black;
+            // 
+            // lblD141
+            // 
+            this.lblD141.AutoSize = true;
+            this.lblD141.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblD141.Location = new System.Drawing.Point(32, 55);
+            this.lblD141.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblD141.Name = "lblD141";
+            this.lblD141.Size = new System.Drawing.Size(262, 52);
+            this.lblD141.TabIndex = 0;
+            this.lblD141.Text = "1#舱温度 (D141)";
+            // 
+            // lblD141Value
+            // 
+            this.lblD141Value.Font = new System.Drawing.Font("微软雅黑", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblD141Value.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
+            this.lblD141Value.Location = new System.Drawing.Point(32, 115);
+            this.lblD141Value.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblD141Value.Name = "lblD141Value";
+            this.lblD141Value.Size = new System.Drawing.Size(560, 110);
+            this.lblD141Value.TabIndex = 1;
+            this.lblD141Value.Text = "--";
+            // 
+            // lblD142
+            // 
+            this.lblD142.AutoSize = true;
+            this.lblD142.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblD142.Location = new System.Drawing.Point(820, 55);
+            this.lblD142.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblD142.Name = "lblD142";
+            this.lblD142.Size = new System.Drawing.Size(262, 52);
+            this.lblD142.TabIndex = 2;
+            this.lblD142.Text = "2#舱温度 (D142)";
+            // 
+            // lblD142Value
+            // 
+            this.lblD142Value.Font = new System.Drawing.Font("微软雅黑", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblD142Value.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
+            this.lblD142Value.Location = new System.Drawing.Point(820, 115);
+            this.lblD142Value.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblD142Value.Name = "lblD142Value";
+            this.lblD142Value.Size = new System.Drawing.Size(560, 110);
+            this.lblD142Value.TabIndex = 3;
+            this.lblD142Value.Text = "--";
+            // 
+            // lblDecimals
+            // 
+            this.lblDecimals.AutoSize = true;
+            this.lblDecimals.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblDecimals.Location = new System.Drawing.Point(32, 290);
+            this.lblDecimals.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblDecimals.Name = "lblDecimals";
+            this.lblDecimals.Size = new System.Drawing.Size(162, 52);
+            this.lblDecimals.TabIndex = 4;
+            this.lblDecimals.Text = "温度小数位";
+            // 
+            // decimals
+            // 
+            this.decimals.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.decimals.Location = new System.Drawing.Point(220, 292);
+            this.decimals.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.decimals.Maximum = new decimal(new int[] {
+            3,
+            0,
+            0,
+            0});
+            this.decimals.Name = "decimals";
+            this.decimals.Size = new System.Drawing.Size(120, 51);
+            this.decimals.TabIndex = 5;
+            // 
+            // btnReadNow
+            // 
+            this.btnReadNow.AllPower = null;
+            this.btnReadNow.BackColor = System.Drawing.Color.Transparent;
+            this.btnReadNow.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnReadNow.IsShowBorder = true;
+            this.btnReadNow.Location = new System.Drawing.Point(820, 285);
+            this.btnReadNow.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnReadNow.Name = "btnReadNow";
+            this.btnReadNow.Power = null;
+            this.btnReadNow.Size = new System.Drawing.Size(200, 52);
+            this.btnReadNow.TabIndex = 6;
+            this.btnReadNow.Text = "立即读取";
+            this.btnReadNow.UseVisualStyleBackColor = true;
+            this.btnReadNow.Click += new System.EventHandler(this.ReadNow_Click);
+            // 
+            // lblRecord
+            // 
+            this.lblRecord.AutoSize = true;
+            this.lblRecord.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblRecord.Location = new System.Drawing.Point(32, 670);
+            this.lblRecord.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblRecord.Name = "lblRecord";
+            this.lblRecord.Size = new System.Drawing.Size(82, 52);
+            this.lblRecord.TabIndex = 2;
+            this.lblRecord.Text = "记录";
+            // 
+            // OperatResult
+            // 
+            this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperatResult.Location = new System.Drawing.Point(32, 725);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(1540, 330);
+            this.OperatResult.TabIndex = 3;
+            this.OperatResult.Text = "";
+            // 
+            // lblStatus
+            // 
+            this.lblStatus.AutoSize = true;
+            this.lblStatus.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblStatus.ForeColor = System.Drawing.Color.Blue;
+            this.lblStatus.Location = new System.Drawing.Point(32, 1075);
+            this.lblStatus.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblStatus.Name = "lblStatus";
+            this.lblStatus.Size = new System.Drawing.Size(102, 52);
+            this.lblStatus.TabIndex = 4;
+            this.lblStatus.Text = "状态:";
+            // 
+            // timer1
+            // 
+            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+            // 
+            // Make_PLCMonitor
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1604, 1140);
+            this.Controls.Add(this.lblStatus);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.lblRecord);
+            this.Controls.Add(this.grpData);
+            this.Controls.Add(this.grpConnect);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.Name = "Make_PLCMonitor";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Tag = "Make!PLCMonitor";
+            this.Text = "PLC温度监控";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_PLCMonitor_FormClosing);
+            this.Load += new System.EventHandler(this.Make_PLCMonitor_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_PLCMonitor_SizeChanged);
+            this.grpConnect.ResumeLayout(false);
+            this.grpConnect.PerformLayout();
+            this.grpData.ResumeLayout(false);
+            this.grpData.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.port)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.unitid)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.interval)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.decimals)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+        }
+
+        #endregion
+
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder grpConnect;
+        private System.Windows.Forms.Label lblIp;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ip;
+        private System.Windows.Forms.Label lblPort;
+        private System.Windows.Forms.NumericUpDown port;
+        private System.Windows.Forms.Label lblUnit;
+        private System.Windows.Forms.NumericUpDown unitid;
+        private System.Windows.Forms.Label lblInterval;
+        private System.Windows.Forms.NumericUpDown interval;
+        private CustomControl.ButtonUtil.NormalButton btnConnect;
+        private CustomControl.ButtonUtil.NormalButton btnDisconnect;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder grpData;
+        private System.Windows.Forms.Label lblD141;
+        private System.Windows.Forms.Label lblD141Value;
+        private System.Windows.Forms.Label lblD142;
+        private System.Windows.Forms.Label lblD142Value;
+        private System.Windows.Forms.Label lblDecimals;
+        private System.Windows.Forms.NumericUpDown decimals;
+        private CustomControl.ButtonUtil.NormalButton btnReadNow;
+        private System.Windows.Forms.Label lblRecord;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+        private System.Windows.Forms.Label lblStatus;
+        private System.Windows.Forms.Timer timer1;
+    }
+}

+ 318 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PLCMonitor.cs

@@ -0,0 +1,318 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Net.Sockets;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_PLCMonitor : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataHelper dh;
+
+        // Modbus TCP 连接对象(保持长连接,断线自动重连)
+        TcpClient plcClient;
+        NetworkStream plcStream;
+        bool connected = false;
+        ushort transactionId = 0;
+        readonly object readLock = new object();
+
+        // 台达PLC数据寄存器:D寄存器对应Modbus保持寄存器(功能码0x03),地址=D编号
+        // 1#舱温度 D141 / 2#舱温度 D142,地址相邻一次读完
+        const int D141_ADDR = 141;
+        const int READ_COUNT = 2;
+
+        // 温度记录表:每次采集往里插一条(1#舱、2#舱各一条)
+        // TL_ID 用序列 TEMPLOG_SEQ,TL_DATE 取sysdate,TL_DEVICEID 存舱号,TL_TP 存换算后的温度值
+        const string TempLogTable = "TEMPLOG";
+        const string TempLogSeq = "TEMPLOG_SEQ";
+
+        public Make_PLCMonitor()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_PLCMonitor_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            dh = SystemInf.dh;
+            ip.Text = "192.168.0.1";
+            port.Value = 502;
+            unitid.Value = 1;
+            interval.Value = 2;
+            decimals.Value = 1;
+            SetStatus("未连接");
+        }
+
+        /// <summary>
+        /// 连接串口转网口模块(Modbus TCP)
+        /// </summary>
+        private void Connect_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                ClosePlc();
+                plcClient = new TcpClient();
+                IAsyncResult ar = plcClient.BeginConnect(ip.Text.Trim(), (int)port.Value, null, null);
+                if (!ar.AsyncWaitHandle.WaitOne(3000))
+                {
+                    ClosePlc();
+                    SetStatus("连接超时");
+                    MessageBox.Show("连接PLC超时,请检查IP和端口!");
+                    return;
+                }
+                plcClient.EndConnect(ar);
+                plcClient.ReceiveTimeout = 3000;
+                plcClient.SendTimeout = 3000;
+                plcStream = plcClient.GetStream();
+                connected = true;
+                SetStatus("已连接 " + ip.Text.Trim() + ":" + port.Value);
+                OperatResult.AppendText("[" + DateTime.Now.ToString("HH:mm:ss") + "] 已连接 " + ip.Text.Trim() + ":" + port.Value + ",站号" + unitid.Value + "\n");
+                timer1.Interval = (int)interval.Value * 1000;
+                timer1.Start();
+                // 连接成功后立即读一次
+                ReadNow_Click(null, null);
+            }
+            catch (Exception ex)
+            {
+                ClosePlc();
+                SetStatus("连接失败:" + ex.Message);
+                MessageBox.Show("连接失败:" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 断开连接
+        /// </summary>
+        private void Disconnect_Click(object sender, EventArgs e)
+        {
+            timer1.Stop();
+            ClosePlc();
+            SetStatus("未连接");
+            OperatResult.AppendText("[" + DateTime.Now.ToString("HH:mm:ss") + "] 已断开连接\n");
+        }
+
+        /// <summary>
+        /// 立即读取一次
+        /// </summary>
+        private void ReadNow_Click(object sender, EventArgs e)
+        {
+            if (!connected)
+            {
+                SetStatus("未连接");
+                return;
+            }
+            try
+            {
+                int[] values = ReadRegisters((ushort)D141_ADDR, READ_COUNT);
+                ShowValues(values);
+                InsertTempLog(values);
+                SetStatus("读取成功 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+            }
+            catch (Exception ex)
+            {
+                // 读取失败:断开连接,等待下一次重连
+                timer1.Stop();
+                ClosePlc();
+                connected = false;
+                SetStatus("读取失败:" + ex.Message);
+                OperatResult.AppendText("[" + DateTime.Now.ToString("HH:mm:ss") + "] 读取失败:" + ex.Message + "\n");
+                // 自动重连
+                TryReconnect();
+            }
+        }
+
+        /// <summary>
+        /// 定时获取数据
+        /// </summary>
+        private void timer1_Tick(object sender, EventArgs e)
+        {
+            if (!connected)
+            {
+                TryReconnect();
+                return;
+            }
+            ReadNow_Click(null, null);
+        }
+
+        /// <summary>
+        /// 尝试重新连接(不打断界面,仅更新状态)
+        /// </summary>
+        private void TryReconnect()
+        {
+            try
+            {
+                ClosePlc();
+                plcClient = new TcpClient();
+                IAsyncResult ar = plcClient.BeginConnect(ip.Text.Trim(), (int)port.Value, null, null);
+                if (!ar.AsyncWaitHandle.WaitOne(3000))
+                {
+                    ClosePlc();
+                    SetStatus("重连超时,继续重试...");
+                    return;
+                }
+                plcClient.EndConnect(ar);
+                plcClient.ReceiveTimeout = 3000;
+                plcClient.SendTimeout = 3000;
+                plcStream = plcClient.GetStream();
+                connected = true;
+                SetStatus("重连成功 " + DateTime.Now.ToString("HH:mm:ss"));
+                OperatResult.AppendText("[" + DateTime.Now.ToString("HH:mm:ss") + "] 重连成功\n");
+            }
+            catch
+            {
+                ClosePlc();
+                SetStatus("重连失败,继续重试...");
+            }
+        }
+
+        /// <summary>
+        /// 把本次采集的温度写入TEMPLOG表,1#舱、2#舱各一条
+        /// TL_ID=序列TEMPLOG_SEQ,TL_DATE=sysdate,TL_DEVICEID=舱号,TL_TP=换算后的温度
+        /// </summary>
+        private void InsertTempLog(int[] values)
+        {
+            if (values == null || values.Length < 2) return;
+            try
+            {
+                int d = (int)decimals.Value;
+                double v1 = values[0] / Math.Pow(10, d);
+                double v2 = values[1] / Math.Pow(10, d);
+                string v1s = v1.ToString("0.###");
+                string v2s = v2.ToString("0.###");
+                dh.ExecuteSql("insert into " + TempLogTable + "(TL_ID,TL_DATE,TL_DEVICEID,TL_TP)values(" + TempLogSeq + ".nextval,sysdate,'1#'," + v1s + ")", "insert");
+                dh.ExecuteSql("insert into " + TempLogTable + "(TL_ID,TL_DATE,TL_DEVICEID,TL_TP)values(" + TempLogSeq + ".nextval,sysdate,'2#'," + v2s + ")", "insert");
+            }
+            catch (Exception ex)
+            {
+                // 插入失败不影响采集显示,只记录
+                OperatResult.AppendText("[" + DateTime.Now.ToString("HH:mm:ss") + "] 写入" + TempLogTable + "失败:" + ex.Message + "\n");
+            }
+        }
+
+        /// <summary>
+        /// 显示温度值,并根据小数位设置换算(台达一般存实际值x10)
+        /// </summary>
+        private void ShowValues(int[] values)
+        {
+            if (values == null || values.Length < 2) return;
+            int d = (int)decimals.Value;
+            double v1 = values[0] / Math.Pow(10, d);
+            double v2 = values[1] / Math.Pow(10, d);
+            string fmt = d > 0 ? "F" + d : "F0";
+            lblD141Value.Text = v1.ToString(fmt);
+            lblD142Value.Text = v2.ToString(fmt);
+            OperatResult.AppendText("[" + DateTime.Now.ToString("HH:mm:ss") + "] 1#舱(D141)=" + values[0] + "  2#舱(D142)=" + values[1] + "\n");
+        }
+
+        /// <summary>
+        /// Modbus TCP 读保持寄存器(功能码0x03)
+        /// </summary>
+        private int[] ReadRegisters(ushort startAddr, ushort count)
+        {
+            lock (readLock)
+            {
+                if (!connected || plcStream == null)
+                {
+                    throw new Exception("未连接PLC");
+                }
+                transactionId++;
+                byte[] req = new byte[12];
+                // MBAP头:事务标识、协议标识0、长度6、单元标识符
+                req[0] = (byte)(transactionId >> 8);
+                req[1] = (byte)(transactionId & 0xFF);
+                req[2] = 0x00;
+                req[3] = 0x00;
+                req[4] = 0x00;
+                req[5] = 0x06;
+                req[6] = (byte)unitid.Value;
+                // 功能码0x03 读保持寄存器
+                req[7] = 0x03;
+                req[8] = (byte)(startAddr >> 8);
+                req[9] = (byte)(startAddr & 0xFF);
+                req[10] = (byte)(count >> 8);
+                req[11] = (byte)(count & 0xFF);
+                plcStream.Write(req, 0, req.Length);
+
+                byte[] head = ReadBytes(plcStream, 9);
+                if (head[7] == 0x83 || (head[7] & 0x80) != 0)
+                {
+                    byte[] ec = ReadBytes(plcStream, 1);
+                    throw new Exception("PLC返回异常码 0x" + (ec.Length > 0 ? ec[0] : 0).ToString("X2"));
+                }
+                int byteCount = head[8];
+                byte[] data = ReadBytes(plcStream, byteCount);
+                int[] values = new int[count];
+                for (int i = 0; i < count; i++)
+                {
+                    values[i] = (data[i * 2] << 8) | data[i * 2 + 1];
+                }
+                return values;
+            }
+        }
+
+        /// <summary>
+        /// 从流中读满指定长度,读不满视为连接异常
+        /// </summary>
+        private byte[] ReadBytes(NetworkStream stream, int length)
+        {
+            byte[] buffer = new byte[length];
+            int read = 0;
+            while (read < length)
+            {
+                int n = stream.Read(buffer, read, length - read);
+                if (n <= 0)
+                {
+                    throw new Exception("连接已断开");
+                }
+                read += n;
+            }
+            return buffer;
+        }
+
+        /// <summary>
+        /// 关闭PLC连接
+        /// </summary>
+        private void ClosePlc()
+        {
+            try
+            {
+                if (plcStream != null)
+                {
+                    plcStream.Close();
+                    plcStream = null;
+                }
+                if (plcClient != null)
+                {
+                    plcClient.Close();
+                    plcClient = null;
+                }
+            }
+            catch { }
+            connected = false;
+        }
+
+        private void SetStatus(string text)
+        {
+            lblStatus.Text = "状态:" + text;
+        }
+
+        private void Make_PLCMonitor_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            timer1.Stop();
+            ClosePlc();
+        }
+
+        private void Make_PLCMonitor_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+    }
+}

+ 159 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PLCMonitor.resx

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="DeleteButton.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="DeleteButton.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="DeleteButton.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 299 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PartClean.Designer.cs

@@ -0,0 +1,299 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_PartClean
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.grpSN = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.lblSN = new System.Windows.Forms.Label();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.lblBatch = new System.Windows.Forms.Label();
+            this.lblBatchCode = new System.Windows.Forms.Label();
+            this.btnStart = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.btnEnd = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.grpQuery = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.lblQuery = new System.Windows.Forms.Label();
+            this.txtQueryBatch = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.btnQuery = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.grpData = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.DGV = new System.Windows.Forms.DataGridView();
+            this.lblStatus = new System.Windows.Forms.Label();
+            this.grpSN.SuspendLayout();
+            this.grpQuery.SuspendLayout();
+            this.grpData.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.DGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // grpSN
+            // 
+            this.grpSN.BorderColor = System.Drawing.Color.Black;
+            this.grpSN.Controls.Add(this.lblSN);
+            this.grpSN.Controls.Add(this.sncode);
+            this.grpSN.Controls.Add(this.lblBatch);
+            this.grpSN.Controls.Add(this.lblBatchCode);
+            this.grpSN.Controls.Add(this.btnStart);
+            this.grpSN.Controls.Add(this.btnEnd);
+            this.grpSN.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.grpSN.Location = new System.Drawing.Point(32, 30);
+            this.grpSN.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.grpSN.Name = "grpSN";
+            this.grpSN.Size = new System.Drawing.Size(1540, 210);
+            this.grpSN.TabIndex = 0;
+            this.grpSN.TabStop = false;
+            this.grpSN.Text = "SN录入";
+            this.grpSN.TextColor = System.Drawing.Color.Black;
+            // 
+            // lblSN
+            // 
+            this.lblSN.AutoSize = true;
+            this.lblSN.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblSN.Location = new System.Drawing.Point(32, 50);
+            this.lblSN.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblSN.Name = "lblSN";
+            this.lblSN.Size = new System.Drawing.Size(62, 52);
+            this.lblSN.TabIndex = 0;
+            this.lblSN.Text = "SN";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = null;
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(120, 45);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(480, 59);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 1;
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // lblBatch
+            // 
+            this.lblBatch.AutoSize = true;
+            this.lblBatch.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblBatch.Location = new System.Drawing.Point(700, 50);
+            this.lblBatch.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblBatch.Name = "lblBatch";
+            this.lblBatch.Size = new System.Drawing.Size(142, 52);
+            this.lblBatch.TabIndex = 2;
+            this.lblBatch.Text = "当前批次";
+            // 
+            // lblBatchCode
+            // 
+            this.lblBatchCode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblBatchCode.ForeColor = System.Drawing.Color.Blue;
+            this.lblBatchCode.Location = new System.Drawing.Point(870, 50);
+            this.lblBatchCode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblBatchCode.Name = "lblBatchCode";
+            this.lblBatchCode.Size = new System.Drawing.Size(620, 52);
+            this.lblBatchCode.TabIndex = 3;
+            this.lblBatchCode.Text = "";
+            // 
+            // btnStart
+            // 
+            this.btnStart.AllPower = null;
+            this.btnStart.BackColor = System.Drawing.Color.Transparent;
+            this.btnStart.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnStart.IsShowBorder = true;
+            this.btnStart.Location = new System.Drawing.Point(120, 130);
+            this.btnStart.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnStart.Name = "btnStart";
+            this.btnStart.Power = null;
+            this.btnStart.Size = new System.Drawing.Size(200, 52);
+            this.btnStart.TabIndex = 4;
+            this.btnStart.Text = "开始清洗";
+            this.btnStart.UseVisualStyleBackColor = true;
+            this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
+            // 
+            // btnEnd
+            // 
+            this.btnEnd.AllPower = null;
+            this.btnEnd.BackColor = System.Drawing.Color.Transparent;
+            this.btnEnd.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnEnd.IsShowBorder = true;
+            this.btnEnd.Location = new System.Drawing.Point(400, 130);
+            this.btnEnd.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnEnd.Name = "btnEnd";
+            this.btnEnd.Power = null;
+            this.btnEnd.Size = new System.Drawing.Size(200, 52);
+            this.btnEnd.TabIndex = 5;
+            this.btnEnd.Text = "结束清洗";
+            this.btnEnd.UseVisualStyleBackColor = true;
+            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
+            // 
+            // grpQuery
+            // 
+            this.grpQuery.BorderColor = System.Drawing.Color.Black;
+            this.grpQuery.Controls.Add(this.lblQuery);
+            this.grpQuery.Controls.Add(this.txtQueryBatch);
+            this.grpQuery.Controls.Add(this.btnQuery);
+            this.grpQuery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.grpQuery.Location = new System.Drawing.Point(32, 270);
+            this.grpQuery.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.grpQuery.Name = "grpQuery";
+            this.grpQuery.Size = new System.Drawing.Size(1540, 150);
+            this.grpQuery.TabIndex = 1;
+            this.grpQuery.TabStop = false;
+            this.grpQuery.Text = "按批次查询";
+            this.grpQuery.TextColor = System.Drawing.Color.Black;
+            // 
+            // lblQuery
+            // 
+            this.lblQuery.AutoSize = true;
+            this.lblQuery.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblQuery.Location = new System.Drawing.Point(32, 45);
+            this.lblQuery.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblQuery.Name = "lblQuery";
+            this.lblQuery.Size = new System.Drawing.Size(122, 52);
+            this.lblQuery.TabIndex = 0;
+            this.lblQuery.Text = "批次号";
+            // 
+            // txtQueryBatch
+            // 
+            this.txtQueryBatch.AllPower = null;
+            this.txtQueryBatch.BackColor = System.Drawing.Color.White;
+            this.txtQueryBatch.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtQueryBatch.ID = null;
+            this.txtQueryBatch.Location = new System.Drawing.Point(180, 47);
+            this.txtQueryBatch.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.txtQueryBatch.Name = "txtQueryBatch";
+            this.txtQueryBatch.Power = null;
+            this.txtQueryBatch.Size = new System.Drawing.Size(420, 55);
+            this.txtQueryBatch.Str = null;
+            this.txtQueryBatch.Str1 = null;
+            this.txtQueryBatch.Str2 = null;
+            this.txtQueryBatch.TabIndex = 1;
+            // 
+            // btnQuery
+            // 
+            this.btnQuery.AllPower = null;
+            this.btnQuery.BackColor = System.Drawing.Color.Transparent;
+            this.btnQuery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnQuery.IsShowBorder = true;
+            this.btnQuery.Location = new System.Drawing.Point(640, 47);
+            this.btnQuery.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnQuery.Name = "btnQuery";
+            this.btnQuery.Power = null;
+            this.btnQuery.Size = new System.Drawing.Size(160, 52);
+            this.btnQuery.TabIndex = 2;
+            this.btnQuery.Text = "查询";
+            this.btnQuery.UseVisualStyleBackColor = true;
+            this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
+            // 
+            // grpData
+            // 
+            this.grpData.BorderColor = System.Drawing.Color.Black;
+            this.grpData.Controls.Add(this.DGV);
+            this.grpData.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.grpData.Location = new System.Drawing.Point(32, 450);
+            this.grpData.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.grpData.Name = "grpData";
+            this.grpData.Size = new System.Drawing.Size(1540, 600);
+            this.grpData.TabIndex = 2;
+            this.grpData.TabStop = false;
+            this.grpData.Text = "批次数据";
+            this.grpData.TextColor = System.Drawing.Color.Black;
+            // 
+            // DGV
+            // 
+            this.DGV.AllowUserToAddRows = false;
+            this.DGV.AllowUserToDeleteRows = false;
+            this.DGV.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+            this.DGV.BackgroundColor = System.Drawing.Color.White;
+            this.DGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.DGV.Location = new System.Drawing.Point(25, 55);
+            this.DGV.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.DGV.MultiSelect = false;
+            this.DGV.Name = "DGV";
+            this.DGV.ReadOnly = true;
+            this.DGV.RowHeadersVisible = false;
+            this.DGV.RowTemplate.Height = 37;
+            this.DGV.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.DGV.Size = new System.Drawing.Size(1490, 520);
+            this.DGV.TabIndex = 0;
+            // 
+            // lblStatus
+            // 
+            this.lblStatus.AutoSize = true;
+            this.lblStatus.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblStatus.ForeColor = System.Drawing.Color.Blue;
+            this.lblStatus.Location = new System.Drawing.Point(32, 1075);
+            this.lblStatus.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblStatus.Name = "lblStatus";
+            this.lblStatus.Size = new System.Drawing.Size(102, 52);
+            this.lblStatus.TabIndex = 3;
+            this.lblStatus.Text = "状态:";
+            // 
+            // Make_PartClean
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1604, 1140);
+            this.Controls.Add(this.lblStatus);
+            this.Controls.Add(this.grpData);
+            this.Controls.Add(this.grpQuery);
+            this.Controls.Add(this.grpSN);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.Name = "Make_PartClean";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Tag = "Make!PartClean";
+            this.Text = "零件清洗";
+            this.Load += new System.EventHandler(this.Make_PartClean_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_PartClean_SizeChanged);
+            this.grpSN.ResumeLayout(false);
+            this.grpSN.PerformLayout();
+            this.grpQuery.ResumeLayout(false);
+            this.grpQuery.PerformLayout();
+            this.grpData.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.DGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+        }
+
+        #endregion
+
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder grpSN;
+        private System.Windows.Forms.Label lblSN;
+        private CustomControl.TextBoxWithIcon.EnterTextBox sncode;
+        private System.Windows.Forms.Label lblBatch;
+        private System.Windows.Forms.Label lblBatchCode;
+        private CustomControl.ButtonUtil.NormalButton btnStart;
+        private CustomControl.ButtonUtil.NormalButton btnEnd;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder grpQuery;
+        private System.Windows.Forms.Label lblQuery;
+        private CustomControl.TextBoxWithIcon.EnterTextBox txtQueryBatch;
+        private CustomControl.ButtonUtil.NormalButton btnQuery;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder grpData;
+        private System.Windows.Forms.DataGridView DGV;
+        private System.Windows.Forms.Label lblStatus;
+    }
+}

+ 189 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PartClean.cs

@@ -0,0 +1,189 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_PartClean : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataHelper dh;
+        DataTable dt;
+
+        // 工序类型:清洗页面固定写CLEAN,写入SB_STEPCODE用于和零件烘烤区分
+        const string StepCode = "CLEAN";
+
+        // 当前批次号:结束清洗后置空,下一个录入的SN会生成新的批次号
+        string currentBatch = "";
+
+        public Make_PartClean()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_PartClean_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            dh = SystemInf.dh;
+            // 恢复未结束的批次(比如中途退出页面的情况)
+            object b = dh.getFieldDataByCondition("SINGLEBOARD", "max(SB_BATCHCODE)", "SB_STEPCODE='" + StepCode + "' and SB_ENDTIME is null");
+            currentBatch = b == null ? "" : b.ToString();
+            if (currentBatch == "")
+            {
+                lblBatchCode.Text = "(暂无,录入SN时自动生成)";
+            }
+            else
+            {
+                lblBatchCode.Text = currentBatch;
+                LoadBatchData(currentBatch);
+            }
+            SetStatus("就绪,请录入SN");
+            sncode.Focus();
+        }
+
+        /// <summary>
+        /// 录入框回车:插入SN到SINGLEBOARD,本批次共用同一个批次号
+        /// </summary>
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                InsertSN();
+                e.Handled = true;
+                e.SuppressKeyPress = true;
+            }
+        }
+
+        private void InsertSN()
+        {
+            string sn = sncode.Text.Trim();
+            if (sn == "")
+            {
+                SetStatus("SN不能为空!");
+                return;
+            }
+            try
+            {
+                // 没有进行中的批次时生成新批次号:PC+年月日时分秒
+                if (currentBatch == "")
+                {
+                    currentBatch = GenBatchCode();
+                    lblBatchCode.Text = currentBatch;
+                }
+                // 同一批次内SN不允许重复录入
+                dt = (DataTable)dh.ExecuteSql("select SB_ID from SINGLEBOARD where SB_SNCODE='" + sn + "' and SB_BATCHCODE='" + currentBatch + "' and SB_STEPCODE='" + StepCode + "'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    SetStatus("SN【" + sn + "】在本批次已录入,请勿重复!");
+                    sncode.Clear();
+                    sncode.Focus();
+                    return;
+                }
+                dh.ExecuteSql("insert into SINGLEBOARD(SB_ID,SB_SNCODE,SB_INDATE,SB_STATUS,SB_STEPCODE,SB_BATCHCODE,SB_INMAN)values(SINGLEBOARD_SEQ.nextval,'" + sn + "',sysdate,'在录入','" + StepCode + "','" + currentBatch + "','" + User.UserName + "')", "insert");
+                SetStatus("SN【" + sn + "】录入成功,批次号" + currentBatch);
+                sncode.Clear();
+                sncode.Focus();
+                LoadBatchData(currentBatch);
+            }
+            catch (Exception ex)
+            {
+                SetStatus("录入失败:" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 生成批次号:清洗PC、烘烤PD + 年月日时分秒,长度16在SB_BATCHCODE(20)范围内
+        /// </summary>
+        private string GenBatchCode()
+        {
+            return (StepCode == "CLEAN" ? "PC" : "PD") + DateTime.Now.ToString("yyyyMMddHHmmss");
+        }
+
+        /// <summary>
+        /// 开始清洗:给当前批次所有未开始的记录写开始时间
+        /// </summary>
+        private void btnStart_Click(object sender, EventArgs e)
+        {
+            if (currentBatch == "")
+            {
+                MessageBox.Show("当前没有进行中的批次,请先录入SN!");
+                return;
+            }
+            try
+            {
+                dh.ExecuteSql("update SINGLEBOARD set SB_STARTTIME='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',SB_STATUS='清洗中' where SB_BATCHCODE='" + currentBatch + "' and SB_STEPCODE='" + StepCode + "' and SB_STARTTIME is null", "update");
+                SetStatus("批次【" + currentBatch + "】清洗已开始");
+                LoadBatchData(currentBatch);
+            }
+            catch (Exception ex)
+            {
+                SetStatus("开始清洗失败:" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 结束清洗:给当前批次所有未结束的记录写结束时间,之后录入的SN生成新批次
+        /// </summary>
+        private void btnEnd_Click(object sender, EventArgs e)
+        {
+            if (currentBatch == "")
+            {
+                MessageBox.Show("当前没有进行中的批次!");
+                return;
+            }
+            try
+            {
+                dh.ExecuteSql("update SINGLEBOARD set SB_ENDTIME='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',SB_STATUS='已完成' where SB_BATCHCODE='" + currentBatch + "' and SB_STEPCODE='" + StepCode + "' and SB_ENDTIME is null", "update");
+                SetStatus("批次【" + currentBatch + "】已结束,下一批录入SN时生成新批次号");
+                // 保留显示刚结束批次的数据,批次号置空
+                LoadBatchData(currentBatch);
+                currentBatch = "";
+                lblBatchCode.Text = "(暂无,录入SN时自动生成)";
+            }
+            catch (Exception ex)
+            {
+                SetStatus("结束清洗失败:" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 按批次号查询
+        /// </summary>
+        private void btnQuery_Click(object sender, EventArgs e)
+        {
+            string b = txtQueryBatch.Text.Trim();
+            if (b == "")
+            {
+                MessageBox.Show("请输入要查询的批次号!");
+                return;
+            }
+            LoadBatchData(b);
+        }
+
+        /// <summary>
+        /// 加载指定批次的数据显示在表格里
+        /// </summary>
+        private void LoadBatchData(string batch)
+        {
+            dt = (DataTable)dh.ExecuteSql("select SB_SNCODE \"SN\",SB_INDATE \"录入时间\",SB_STARTTIME \"开始清洗时间\",SB_INMAN \"录入人\",SB_STATUS \"状态\" from SINGLEBOARD where SB_BATCHCODE='" + batch + "' and SB_STEPCODE='" + StepCode + "' order by SB_ID", "select");
+            DGV.DataSource = dt;
+        }
+
+        private void SetStatus(string text)
+        {
+            lblStatus.Text = "状态:" + text;
+        }
+
+        private void Make_PartClean_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+    }
+}

+ 159 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PartClean.resx

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="DeleteButton.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="DeleteButton.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="DeleteButton.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 299 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PartDry.Designer.cs

@@ -0,0 +1,299 @@
+namespace UAS_MES_NEW.Make
+{
+    partial class Make_PartDry
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.grpSN = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.lblSN = new System.Windows.Forms.Label();
+            this.sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.lblBatch = new System.Windows.Forms.Label();
+            this.lblBatchCode = new System.Windows.Forms.Label();
+            this.btnStart = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.btnEnd = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.grpQuery = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.lblQuery = new System.Windows.Forms.Label();
+            this.txtQueryBatch = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.btnQuery = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.grpData = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.DGV = new System.Windows.Forms.DataGridView();
+            this.lblStatus = new System.Windows.Forms.Label();
+            this.grpSN.SuspendLayout();
+            this.grpQuery.SuspendLayout();
+            this.grpData.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.DGV)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // grpSN
+            // 
+            this.grpSN.BorderColor = System.Drawing.Color.Black;
+            this.grpSN.Controls.Add(this.lblSN);
+            this.grpSN.Controls.Add(this.sncode);
+            this.grpSN.Controls.Add(this.lblBatch);
+            this.grpSN.Controls.Add(this.lblBatchCode);
+            this.grpSN.Controls.Add(this.btnStart);
+            this.grpSN.Controls.Add(this.btnEnd);
+            this.grpSN.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.grpSN.Location = new System.Drawing.Point(32, 30);
+            this.grpSN.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.grpSN.Name = "grpSN";
+            this.grpSN.Size = new System.Drawing.Size(1540, 210);
+            this.grpSN.TabIndex = 0;
+            this.grpSN.TabStop = false;
+            this.grpSN.Text = "SN录入";
+            this.grpSN.TextColor = System.Drawing.Color.Black;
+            // 
+            // lblSN
+            // 
+            this.lblSN.AutoSize = true;
+            this.lblSN.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblSN.Location = new System.Drawing.Point(32, 50);
+            this.lblSN.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblSN.Name = "lblSN";
+            this.lblSN.Size = new System.Drawing.Size(62, 52);
+            this.lblSN.TabIndex = 0;
+            this.lblSN.Text = "SN";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = null;
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(120, 45);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(480, 59);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 1;
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // lblBatch
+            // 
+            this.lblBatch.AutoSize = true;
+            this.lblBatch.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblBatch.Location = new System.Drawing.Point(700, 50);
+            this.lblBatch.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblBatch.Name = "lblBatch";
+            this.lblBatch.Size = new System.Drawing.Size(142, 52);
+            this.lblBatch.TabIndex = 2;
+            this.lblBatch.Text = "当前批次";
+            // 
+            // lblBatchCode
+            // 
+            this.lblBatchCode.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblBatchCode.ForeColor = System.Drawing.Color.Blue;
+            this.lblBatchCode.Location = new System.Drawing.Point(870, 50);
+            this.lblBatchCode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblBatchCode.Name = "lblBatchCode";
+            this.lblBatchCode.Size = new System.Drawing.Size(620, 52);
+            this.lblBatchCode.TabIndex = 3;
+            this.lblBatchCode.Text = "";
+            // 
+            // btnStart
+            // 
+            this.btnStart.AllPower = null;
+            this.btnStart.BackColor = System.Drawing.Color.Transparent;
+            this.btnStart.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnStart.IsShowBorder = true;
+            this.btnStart.Location = new System.Drawing.Point(120, 130);
+            this.btnStart.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnStart.Name = "btnStart";
+            this.btnStart.Power = null;
+            this.btnStart.Size = new System.Drawing.Size(200, 52);
+            this.btnStart.TabIndex = 4;
+            this.btnStart.Text = "开始烘烤";
+            this.btnStart.UseVisualStyleBackColor = true;
+            this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
+            // 
+            // btnEnd
+            // 
+            this.btnEnd.AllPower = null;
+            this.btnEnd.BackColor = System.Drawing.Color.Transparent;
+            this.btnEnd.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnEnd.IsShowBorder = true;
+            this.btnEnd.Location = new System.Drawing.Point(400, 130);
+            this.btnEnd.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnEnd.Name = "btnEnd";
+            this.btnEnd.Power = null;
+            this.btnEnd.Size = new System.Drawing.Size(200, 52);
+            this.btnEnd.TabIndex = 5;
+            this.btnEnd.Text = "结束烘烤";
+            this.btnEnd.UseVisualStyleBackColor = true;
+            this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
+            // 
+            // grpQuery
+            // 
+            this.grpQuery.BorderColor = System.Drawing.Color.Black;
+            this.grpQuery.Controls.Add(this.lblQuery);
+            this.grpQuery.Controls.Add(this.txtQueryBatch);
+            this.grpQuery.Controls.Add(this.btnQuery);
+            this.grpQuery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.grpQuery.Location = new System.Drawing.Point(32, 270);
+            this.grpQuery.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.grpQuery.Name = "grpQuery";
+            this.grpQuery.Size = new System.Drawing.Size(1540, 150);
+            this.grpQuery.TabIndex = 1;
+            this.grpQuery.TabStop = false;
+            this.grpQuery.Text = "按批次查询";
+            this.grpQuery.TextColor = System.Drawing.Color.Black;
+            // 
+            // lblQuery
+            // 
+            this.lblQuery.AutoSize = true;
+            this.lblQuery.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblQuery.Location = new System.Drawing.Point(32, 45);
+            this.lblQuery.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblQuery.Name = "lblQuery";
+            this.lblQuery.Size = new System.Drawing.Size(122, 52);
+            this.lblQuery.TabIndex = 0;
+            this.lblQuery.Text = "批次号";
+            // 
+            // txtQueryBatch
+            // 
+            this.txtQueryBatch.AllPower = null;
+            this.txtQueryBatch.BackColor = System.Drawing.Color.White;
+            this.txtQueryBatch.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtQueryBatch.ID = null;
+            this.txtQueryBatch.Location = new System.Drawing.Point(180, 47);
+            this.txtQueryBatch.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.txtQueryBatch.Name = "txtQueryBatch";
+            this.txtQueryBatch.Power = null;
+            this.txtQueryBatch.Size = new System.Drawing.Size(420, 55);
+            this.txtQueryBatch.Str = null;
+            this.txtQueryBatch.Str1 = null;
+            this.txtQueryBatch.Str2 = null;
+            this.txtQueryBatch.TabIndex = 1;
+            // 
+            // btnQuery
+            // 
+            this.btnQuery.AllPower = null;
+            this.btnQuery.BackColor = System.Drawing.Color.Transparent;
+            this.btnQuery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnQuery.IsShowBorder = true;
+            this.btnQuery.Location = new System.Drawing.Point(640, 47);
+            this.btnQuery.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.btnQuery.Name = "btnQuery";
+            this.btnQuery.Power = null;
+            this.btnQuery.Size = new System.Drawing.Size(160, 52);
+            this.btnQuery.TabIndex = 2;
+            this.btnQuery.Text = "查询";
+            this.btnQuery.UseVisualStyleBackColor = true;
+            this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
+            // 
+            // grpData
+            // 
+            this.grpData.BorderColor = System.Drawing.Color.Black;
+            this.grpData.Controls.Add(this.DGV);
+            this.grpData.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.grpData.Location = new System.Drawing.Point(32, 450);
+            this.grpData.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.grpData.Name = "grpData";
+            this.grpData.Size = new System.Drawing.Size(1540, 600);
+            this.grpData.TabIndex = 2;
+            this.grpData.TabStop = false;
+            this.grpData.Text = "批次数据";
+            this.grpData.TextColor = System.Drawing.Color.Black;
+            // 
+            // DGV
+            // 
+            this.DGV.AllowUserToAddRows = false;
+            this.DGV.AllowUserToDeleteRows = false;
+            this.DGV.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+            this.DGV.BackgroundColor = System.Drawing.Color.White;
+            this.DGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.DGV.Location = new System.Drawing.Point(25, 55);
+            this.DGV.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.DGV.MultiSelect = false;
+            this.DGV.Name = "DGV";
+            this.DGV.ReadOnly = true;
+            this.DGV.RowHeadersVisible = false;
+            this.DGV.RowTemplate.Height = 37;
+            this.DGV.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.DGV.Size = new System.Drawing.Size(1490, 520);
+            this.DGV.TabIndex = 0;
+            // 
+            // lblStatus
+            // 
+            this.lblStatus.AutoSize = true;
+            this.lblStatus.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblStatus.ForeColor = System.Drawing.Color.Blue;
+            this.lblStatus.Location = new System.Drawing.Point(32, 1075);
+            this.lblStatus.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.lblStatus.Name = "lblStatus";
+            this.lblStatus.Size = new System.Drawing.Size(102, 52);
+            this.lblStatus.TabIndex = 3;
+            this.lblStatus.Text = "状态:";
+            // 
+            // Make_PartDry
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1604, 1140);
+            this.Controls.Add(this.lblStatus);
+            this.Controls.Add(this.grpData);
+            this.Controls.Add(this.grpQuery);
+            this.Controls.Add(this.grpSN);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 4, 6, 4);
+            this.Name = "Make_PartDry";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Tag = "Make!PartDry";
+            this.Text = "零件烘烤";
+            this.Load += new System.EventHandler(this.Make_PartDry_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_PartDry_SizeChanged);
+            this.grpSN.ResumeLayout(false);
+            this.grpSN.PerformLayout();
+            this.grpQuery.ResumeLayout(false);
+            this.grpQuery.PerformLayout();
+            this.grpData.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.DGV)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+        }
+
+        #endregion
+
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder grpSN;
+        private System.Windows.Forms.Label lblSN;
+        private CustomControl.TextBoxWithIcon.EnterTextBox sncode;
+        private System.Windows.Forms.Label lblBatch;
+        private System.Windows.Forms.Label lblBatchCode;
+        private CustomControl.ButtonUtil.NormalButton btnStart;
+        private CustomControl.ButtonUtil.NormalButton btnEnd;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder grpQuery;
+        private System.Windows.Forms.Label lblQuery;
+        private CustomControl.TextBoxWithIcon.EnterTextBox txtQueryBatch;
+        private CustomControl.ButtonUtil.NormalButton btnQuery;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder grpData;
+        private System.Windows.Forms.DataGridView DGV;
+        private System.Windows.Forms.Label lblStatus;
+    }
+}

+ 189 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PartDry.cs

@@ -0,0 +1,189 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Make
+{
+    public partial class Make_PartDry : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        DataHelper dh;
+        DataTable dt;
+
+        // 工序类型:烘烤页面固定写DRY,写入SB_STEPCODE用于和零件清洗区分
+        const string StepCode = "DRY";
+
+        // 当前批次号:结束烘烤后置空,下一个录入的SN会生成新的批次号
+        string currentBatch = "";
+
+        public Make_PartDry()
+        {
+            InitializeComponent();
+        }
+
+        private void Make_PartDry_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            dh = SystemInf.dh;
+            // 恢复未结束的批次(比如中途退出页面的情况)
+            object b = dh.getFieldDataByCondition("SINGLEBOARD", "max(SB_BATCHCODE)", "SB_STEPCODE='" + StepCode + "' and SB_ENDTIME is null");
+            currentBatch = b == null ? "" : b.ToString();
+            if (currentBatch == "")
+            {
+                lblBatchCode.Text = "(暂无,录入SN时自动生成)";
+            }
+            else
+            {
+                lblBatchCode.Text = currentBatch;
+                LoadBatchData(currentBatch);
+            }
+            SetStatus("就绪,请录入SN");
+            sncode.Focus();
+        }
+
+        /// <summary>
+        /// 录入框回车:插入SN到SINGLEBOARD,本批次共用同一个批次号
+        /// </summary>
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                InsertSN();
+                e.Handled = true;
+                e.SuppressKeyPress = true;
+            }
+        }
+
+        private void InsertSN()
+        {
+            string sn = sncode.Text.Trim();
+            if (sn == "")
+            {
+                SetStatus("SN不能为空!");
+                return;
+            }
+            try
+            {
+                // 没有进行中的批次时生成新批次号:PD+年月日时分秒
+                if (currentBatch == "")
+                {
+                    currentBatch = GenBatchCode();
+                    lblBatchCode.Text = currentBatch;
+                }
+                // 同一批次内SN不允许重复录入
+                dt = (DataTable)dh.ExecuteSql("select SB_ID from SINGLEBOARD where SB_SNCODE='" + sn + "' and SB_BATCHCODE='" + currentBatch + "' and SB_STEPCODE='" + StepCode + "'", "select");
+                if (dt.Rows.Count > 0)
+                {
+                    SetStatus("SN【" + sn + "】在本批次已录入,请勿重复!");
+                    sncode.Clear();
+                    sncode.Focus();
+                    return;
+                }
+                dh.ExecuteSql("insert into SINGLEBOARD(SB_ID,SB_SNCODE,SB_INDATE,SB_STATUS,SB_STEPCODE,SB_BATCHCODE,SB_INMAN)values(SINGLEBOARD_SEQ.nextval,'" + sn + "',sysdate,'在录入','" + StepCode + "','" + currentBatch + "','" + User.UserName + "')", "insert");
+                SetStatus("SN【" + sn + "】录入成功,批次号" + currentBatch);
+                sncode.Clear();
+                sncode.Focus();
+                LoadBatchData(currentBatch);
+            }
+            catch (Exception ex)
+            {
+                SetStatus("录入失败:" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 生成批次号:PD+年月日时分秒,长度16在SB_BATCHCODE(20)范围内
+        /// </summary>
+        private string GenBatchCode()
+        {
+            return "PD" + DateTime.Now.ToString("yyyyMMddHHmmss");
+        }
+
+        /// <summary>
+        /// 开始烘烤:给当前批次所有未开始的记录写开始时间
+        /// </summary>
+        private void btnStart_Click(object sender, EventArgs e)
+        {
+            if (currentBatch == "")
+            {
+                MessageBox.Show("当前没有进行中的批次,请先录入SN!");
+                return;
+            }
+            try
+            {
+                dh.ExecuteSql("update SINGLEBOARD set SB_STARTTIME='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',SB_STATUS='烘烤中' where SB_BATCHCODE='" + currentBatch + "' and SB_STEPCODE='" + StepCode + "' and SB_STARTTIME is null", "update");
+                SetStatus("批次【" + currentBatch + "】烘烤已开始");
+                LoadBatchData(currentBatch);
+            }
+            catch (Exception ex)
+            {
+                SetStatus("开始烘烤失败:" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 结束烘烤:给当前批次所有未结束的记录写结束时间,之后录入的SN生成新批次
+        /// </summary>
+        private void btnEnd_Click(object sender, EventArgs e)
+        {
+            if (currentBatch == "")
+            {
+                MessageBox.Show("当前没有进行中的批次!");
+                return;
+            }
+            try
+            {
+                dh.ExecuteSql("update SINGLEBOARD set SB_ENDTIME='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',SB_STATUS='已完成' where SB_BATCHCODE='" + currentBatch + "' and SB_STEPCODE='" + StepCode + "' and SB_ENDTIME is null", "update");
+                SetStatus("批次【" + currentBatch + "】已结束,下一批录入SN时生成新批次号");
+                // 保留显示刚结束批次的数据,批次号置空
+                LoadBatchData(currentBatch);
+                currentBatch = "";
+                lblBatchCode.Text = "(暂无,录入SN时自动生成)";
+            }
+            catch (Exception ex)
+            {
+                SetStatus("结束烘烤失败:" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 按批次号查询
+        /// </summary>
+        private void btnQuery_Click(object sender, EventArgs e)
+        {
+            string b = txtQueryBatch.Text.Trim();
+            if (b == "")
+            {
+                MessageBox.Show("请输入要查询的批次号!");
+                return;
+            }
+            LoadBatchData(b);
+        }
+
+        /// <summary>
+        /// 加载指定批次的数据显示在表格里
+        /// </summary>
+        private void LoadBatchData(string batch)
+        {
+            dt = (DataTable)dh.ExecuteSql("select SB_SNCODE \"SN\",SB_INDATE \"录入时间\",SB_STARTTIME \"开始烘烤时间\",SB_INMAN \"录入人\",SB_STATUS \"状态\" from SINGLEBOARD where SB_BATCHCODE='" + batch + "' and SB_STEPCODE='" + StepCode + "' order by SB_ID", "select");
+            DGV.DataSource = dt;
+        }
+
+        private void SetStatus(string text)
+        {
+            lblStatus.Text = "状态:" + text;
+        }
+
+        private void Make_PartDry_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+    }
+}

+ 159 - 0
UAS_MES_ZKLH/FunctionCode/Make/Make_PartDry.resx

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="DeleteButton.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="DeleteButton.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="DeleteButton.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 27 - 0
UAS_MES_ZKLH/UAS_MES_ZKLH.csproj

@@ -794,6 +794,24 @@
     <Compile Include="FunctionCode\Make\Make_CollectNetCode.Designer.cs">
       <DependentUpon>Make_CollectNetCode.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_PLCMonitor.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_PLCMonitor.Designer.cs">
+      <DependentUpon>Make_PLCMonitor.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_PartClean.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_PartClean.Designer.cs">
+      <DependentUpon>Make_PartClean.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_PartDry.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_PartDry.Designer.cs">
+      <DependentUpon>Make_PartDry.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_ColorBoxLabelPrint.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1724,6 +1742,15 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_CollectNetCode.resx">
       <DependentUpon>Make_CollectNetCode.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_PLCMonitor.resx">
+      <DependentUpon>Make_PLCMonitor.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_PartClean.resx">
+      <DependentUpon>Make_PartClean.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_PartDry.resx">
+      <DependentUpon>Make_PartDry.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_ColorBoxLabelPrint.resx">
       <DependentUpon>Make_ColorBoxLabelPrint.cs</DependentUpon>
     </EmbeddedResource>