Browse Source

v214门槛 优化

master
wrx 8 months ago
parent
commit
fcfad02240
  1. 13
      SjMes/PunchAssemble/PunchAndWeld/DataSouce/ProScreenFunc.cs
  2. 340
      SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214_3.Designer.cs
  3. 2
      SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214_3.cs
  4. 2
      SjMes/PunchAssemble/PunchAndWeld/OPCHelper.cs

13
SjMes/PunchAssemble/PunchAndWeld/DataSouce/ProScreenFunc.cs

@ -2458,7 +2458,6 @@ order by CreateTime desc
time = dt.Rows[0][0].ToString();
time = Tools.NumericParse.StringToDateTime(time).Value.AddSeconds(1).ToString("yyyy-MM-dd HH:mm:ss");
}
LogHelper.WriteLog($" 语句1:{sqll}, 连接字符串:{SqlHelper.SqlConnString}");
#endregion
#region 查询下一计划
@ -2486,7 +2485,7 @@ order by CreateTime desc
order by a.CreateTime asc
";
res = SqlHelper.GetDataDateTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);
LogHelper.WriteLog($" 语句2:{sql} ");
#endregion
}
else if (plan == "上一计划")
@ -2506,8 +2505,7 @@ order by CreateTime desc
#endregion
#region 查询上一计划
try
{
DateTime dtime = DateTime.Now;
DateTime.TryParse(time, out dtime);
@ -2522,12 +2520,7 @@ order by CreateTime desc
order by a.CreateTime desc
";
res = SqlHelper.GetDataDateTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);
LogHelper.WriteLog($" 语句4:{sql}, 结果:{res.Rows.Count}");
}
catch(Exception ex)
{
LogHelper.WriteLog($" 异常信息:{ex.Message}");
}
#endregion

340
SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214_3.Designer.cs

@ -65,6 +65,11 @@
this.label2 = new System.Windows.Forms.Label();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.dgridScanRecords = new System.Windows.Forms.DataGridView();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.txtAllQty = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
@ -72,11 +77,6 @@
this.label11 = new System.Windows.Forms.Label();
this.focusTimer = new System.Windows.Forms.Timer(this.components);
this.dateTimer = new System.Windows.Forms.Timer(this.components);
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tableLayoutPanel1.SuspendLayout();
this.panel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
@ -102,17 +102,18 @@
this.tableLayoutPanel1.Controls.Add(this.panel4, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 8;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 4F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 160F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 3F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 128F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1707, 1102);
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 56F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1280, 880);
this.tableLayoutPanel1.TabIndex = 0;
//
// panel1
@ -130,9 +131,10 @@
this.panel1.Controls.Add(this.btnSearch);
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 107);
this.panel1.Location = new System.Drawing.Point(2, 85);
this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1701, 154);
this.panel1.Size = new System.Drawing.Size(1276, 124);
this.panel1.TabIndex = 0;
//
// txtLastScanL
@ -141,10 +143,11 @@
this.txtLastScanL.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtLastScanL.Font = new System.Drawing.Font("宋体", 22.2F, System.Drawing.FontStyle.Bold);
this.txtLastScanL.ForeColor = System.Drawing.Color.White;
this.txtLastScanL.Location = new System.Drawing.Point(40, 79);
this.txtLastScanL.Location = new System.Drawing.Point(30, 63);
this.txtLastScanL.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtLastScanL.Name = "txtLastScanL";
this.txtLastScanL.ReadOnly = true;
this.txtLastScanL.Size = new System.Drawing.Size(457, 43);
this.txtLastScanL.Size = new System.Drawing.Size(343, 34);
this.txtLastScanL.TabIndex = 11;
//
// txtLastScanR
@ -153,10 +156,11 @@
this.txtLastScanR.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtLastScanR.Font = new System.Drawing.Font("宋体", 22.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtLastScanR.ForeColor = System.Drawing.Color.White;
this.txtLastScanR.Location = new System.Drawing.Point(520, 79);
this.txtLastScanR.Location = new System.Drawing.Point(390, 63);
this.txtLastScanR.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtLastScanR.Name = "txtLastScanR";
this.txtLastScanR.ReadOnly = true;
this.txtLastScanR.Size = new System.Drawing.Size(457, 43);
this.txtLastScanR.Size = new System.Drawing.Size(343, 34);
this.txtLastScanR.TabIndex = 10;
//
// txtProduceModel
@ -165,9 +169,10 @@
this.txtProduceModel.BackColor = System.Drawing.Color.Green;
this.txtProduceModel.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.txtProduceModel.ForeColor = System.Drawing.Color.White;
this.txtProduceModel.Location = new System.Drawing.Point(1220, 29);
this.txtProduceModel.Location = new System.Drawing.Point(915, 23);
this.txtProduceModel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.txtProduceModel.Name = "txtProduceModel";
this.txtProduceModel.Size = new System.Drawing.Size(75, 30);
this.txtProduceModel.Size = new System.Drawing.Size(60, 24);
this.txtProduceModel.TabIndex = 9;
this.txtProduceModel.Text = "左右";
//
@ -176,9 +181,10 @@
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.label7.ForeColor = System.Drawing.Color.White;
this.label7.Location = new System.Drawing.Point(1015, 29);
this.label7.Location = new System.Drawing.Point(761, 23);
this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(199, 30);
this.label7.Size = new System.Drawing.Size(160, 24);
this.label7.TabIndex = 8;
this.label7.Text = "当前生产模式";
//
@ -188,9 +194,10 @@
this.txtConfig.BackColor = System.Drawing.Color.Green;
this.txtConfig.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.txtConfig.ForeColor = System.Drawing.Color.White;
this.txtConfig.Location = new System.Drawing.Point(921, 29);
this.txtConfig.Location = new System.Drawing.Point(691, 23);
this.txtConfig.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.txtConfig.Name = "txtConfig";
this.txtConfig.Size = new System.Drawing.Size(75, 30);
this.txtConfig.Size = new System.Drawing.Size(60, 24);
this.txtConfig.TabIndex = 7;
this.txtConfig.Text = "高配";
//
@ -199,9 +206,10 @@
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.label5.ForeColor = System.Drawing.Color.White;
this.label5.Location = new System.Drawing.Point(716, 29);
this.label5.Location = new System.Drawing.Point(537, 23);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(199, 30);
this.label5.Size = new System.Drawing.Size(160, 24);
this.label5.TabIndex = 6;
this.label5.Text = "当前配置状态";
//
@ -211,9 +219,10 @@
this.lbScanState.BackColor = System.Drawing.Color.Green;
this.lbScanState.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.lbScanState.ForeColor = System.Drawing.Color.White;
this.lbScanState.Location = new System.Drawing.Point(466, 29);
this.lbScanState.Location = new System.Drawing.Point(350, 23);
this.lbScanState.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lbScanState.Name = "lbScanState";
this.lbScanState.Size = new System.Drawing.Size(137, 30);
this.lbScanState.Size = new System.Drawing.Size(110, 24);
this.lbScanState.TabIndex = 5;
this.lbScanState.Text = "允许扫码";
//
@ -222,9 +231,10 @@
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(323, 29);
this.label3.Location = new System.Drawing.Point(242, 23);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(137, 30);
this.label3.Size = new System.Drawing.Size(110, 24);
this.label3.TabIndex = 4;
this.label3.Text = "扫描状态";
//
@ -234,9 +244,10 @@
this.lbLinkState.BackColor = System.Drawing.Color.Green;
this.lbLinkState.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold);
this.lbLinkState.ForeColor = System.Drawing.Color.White;
this.lbLinkState.Location = new System.Drawing.Point(149, 29);
this.lbLinkState.Location = new System.Drawing.Point(112, 23);
this.lbLinkState.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lbLinkState.Name = "lbLinkState";
this.lbLinkState.Size = new System.Drawing.Size(137, 30);
this.lbLinkState.Size = new System.Drawing.Size(110, 24);
this.lbLinkState.TabIndex = 3;
this.lbLinkState.Text = "连接成功";
//
@ -245,9 +256,10 @@
this.btnOpenParamDialog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnOpenParamDialog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.btnOpenParamDialog.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenParamDialog.Location = new System.Drawing.Point(1486, 78);
this.btnOpenParamDialog.Location = new System.Drawing.Point(1114, 62);
this.btnOpenParamDialog.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnOpenParamDialog.Name = "btnOpenParamDialog";
this.btnOpenParamDialog.Size = new System.Drawing.Size(206, 63);
this.btnOpenParamDialog.Size = new System.Drawing.Size(154, 55);
this.btnOpenParamDialog.TabIndex = 2;
this.btnOpenParamDialog.Text = "返回选中窗口";
this.btnOpenParamDialog.UseVisualStyleBackColor = false;
@ -258,9 +270,10 @@
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.btnSearch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(1486, 4);
this.btnSearch.Location = new System.Drawing.Point(956, 62);
this.btnSearch.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(206, 68);
this.btnSearch.Size = new System.Drawing.Size(154, 55);
this.btnSearch.TabIndex = 1;
this.btnSearch.Text = "查询明细";
this.btnSearch.UseVisualStyleBackColor = false;
@ -271,26 +284,28 @@
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(10, 29);
this.label1.Location = new System.Drawing.Point(8, 23);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(123, 30);
this.label1.Size = new System.Drawing.Size(99, 24);
this.label1.TabIndex = 0;
this.label1.Text = "PLC状态";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 4;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Controls.Add(this.txtLeftScan, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 267);
this.tableLayoutPanel2.Location = new System.Drawing.Point(2, 213);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(1701, 94);
this.tableLayoutPanel2.Size = new System.Drawing.Size(1276, 76);
this.tableLayoutPanel2.TabIndex = 1;
//
// txtLeftScan
@ -299,23 +314,24 @@
this.txtLeftScan.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(46)))), ((int)(((byte)(64)))));
this.txtLeftScan.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtLeftScan.ForeColor = System.Drawing.Color.White;
this.txtLeftScan.Location = new System.Drawing.Point(63, 18);
this.txtLeftScan.Location = new System.Drawing.Point(47, 14);
this.txtLeftScan.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtLeftScan.Name = "txtLeftScan";
this.txtLeftScan.Size = new System.Drawing.Size(784, 57);
this.txtLeftScan.Size = new System.Drawing.Size(589, 47);
this.txtLeftScan.TabIndex = 2;
this.txtLeftScan.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtLeftScan_KeyDown);
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 9;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 90F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 90F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 90F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 90F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Controls.Add(this.txtLowQty, 7, 0);
this.tableLayoutPanel3.Controls.Add(this.txtHighQty, 5, 0);
@ -327,11 +343,12 @@
this.tableLayoutPanel3.Controls.Add(this.label4, 4, 0);
this.tableLayoutPanel3.Controls.Add(this.label8, 6, 0);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 427);
this.tableLayoutPanel3.Location = new System.Drawing.Point(2, 341);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 1;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(1701, 94);
this.tableLayoutPanel3.Size = new System.Drawing.Size(1276, 76);
this.tableLayoutPanel3.TabIndex = 3;
//
// txtLowQty
@ -342,9 +359,10 @@
this.txtLowQty.AutoSize = true;
this.txtLowQty.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold);
this.txtLowQty.ForeColor = System.Drawing.Color.White;
this.txtLowQty.Location = new System.Drawing.Point(683, 0);
this.txtLowQty.Location = new System.Drawing.Point(512, 0);
this.txtLowQty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.txtLowQty.Name = "txtLowQty";
this.txtLowQty.Size = new System.Drawing.Size(114, 94);
this.txtLowQty.Size = new System.Drawing.Size(86, 76);
this.txtLowQty.TabIndex = 9;
this.txtLowQty.Text = "0";
this.txtLowQty.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -357,9 +375,10 @@
this.txtHighQty.AutoSize = true;
this.txtHighQty.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold);
this.txtHighQty.ForeColor = System.Drawing.Color.White;
this.txtHighQty.Location = new System.Drawing.Point(483, 0);
this.txtHighQty.Location = new System.Drawing.Point(362, 0);
this.txtHighQty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.txtHighQty.Name = "txtHighQty";
this.txtHighQty.Size = new System.Drawing.Size(114, 94);
this.txtHighQty.Size = new System.Drawing.Size(86, 76);
this.txtHighQty.TabIndex = 8;
this.txtHighQty.Text = "0";
this.txtHighQty.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -372,9 +391,10 @@
this.txtRightQty.AutoSize = true;
this.txtRightQty.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold);
this.txtRightQty.ForeColor = System.Drawing.Color.White;
this.txtRightQty.Location = new System.Drawing.Point(283, 0);
this.txtRightQty.Location = new System.Drawing.Point(212, 0);
this.txtRightQty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.txtRightQty.Name = "txtRightQty";
this.txtRightQty.Size = new System.Drawing.Size(114, 94);
this.txtRightQty.Size = new System.Drawing.Size(86, 76);
this.txtRightQty.TabIndex = 7;
this.txtRightQty.Text = "0";
this.txtRightQty.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -387,9 +407,10 @@
this.txtLeftQty.AutoSize = true;
this.txtLeftQty.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold);
this.txtLeftQty.ForeColor = System.Drawing.Color.White;
this.txtLeftQty.Location = new System.Drawing.Point(83, 0);
this.txtLeftQty.Location = new System.Drawing.Point(62, 0);
this.txtLeftQty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.txtLeftQty.Name = "txtLeftQty";
this.txtLeftQty.Size = new System.Drawing.Size(114, 94);
this.txtLeftQty.Size = new System.Drawing.Size(86, 76);
this.txtLeftQty.TabIndex = 6;
this.txtLeftQty.Text = "0";
this.txtLeftQty.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -403,9 +424,10 @@
this.label13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(46)))), ((int)(((byte)(64)))));
this.label13.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold);
this.label13.ForeColor = System.Drawing.Color.White;
this.label13.Location = new System.Drawing.Point(3, 0);
this.label13.Location = new System.Drawing.Point(2, 0);
this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(74, 94);
this.label13.Size = new System.Drawing.Size(56, 76);
this.label13.TabIndex = 1;
this.label13.Text = "左";
this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -419,9 +441,10 @@
this.label14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(46)))), ((int)(((byte)(64)))));
this.label14.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold);
this.label14.ForeColor = System.Drawing.Color.White;
this.label14.Location = new System.Drawing.Point(203, 0);
this.label14.Location = new System.Drawing.Point(152, 0);
this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(74, 94);
this.label14.Size = new System.Drawing.Size(56, 76);
this.label14.TabIndex = 2;
this.label14.Text = "右";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -431,9 +454,10 @@
this.lbVer.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.lbVer.AutoSize = true;
this.lbVer.ForeColor = System.Drawing.Color.White;
this.lbVer.Location = new System.Drawing.Point(1659, 39);
this.lbVer.Location = new System.Drawing.Point(1245, 32);
this.lbVer.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lbVer.Name = "lbVer";
this.lbVer.Size = new System.Drawing.Size(39, 15);
this.lbVer.Size = new System.Drawing.Size(29, 12);
this.lbVer.TabIndex = 10;
this.lbVer.Text = " ";
//
@ -446,9 +470,10 @@
this.label4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(46)))), ((int)(((byte)(64)))));
this.label4.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold);
this.label4.ForeColor = System.Drawing.Color.White;
this.label4.Location = new System.Drawing.Point(403, 0);
this.label4.Location = new System.Drawing.Point(302, 0);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(74, 94);
this.label4.Size = new System.Drawing.Size(56, 76);
this.label4.TabIndex = 11;
this.label4.Text = "高";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -462,9 +487,10 @@
this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(46)))), ((int)(((byte)(64)))));
this.label8.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold);
this.label8.ForeColor = System.Drawing.Color.White;
this.label8.Location = new System.Drawing.Point(603, 0);
this.label8.Location = new System.Drawing.Point(452, 0);
this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(74, 94);
this.label8.Size = new System.Drawing.Size(56, 76);
this.label8.TabIndex = 12;
this.label8.Text = "低";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -476,9 +502,10 @@
this.lbMsg.AutoSize = true;
this.lbMsg.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbMsg.ForeColor = System.Drawing.Color.Red;
this.lbMsg.Location = new System.Drawing.Point(3, 1032);
this.lbMsg.Location = new System.Drawing.Point(2, 824);
this.lbMsg.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lbMsg.Name = "lbMsg";
this.lbMsg.Size = new System.Drawing.Size(146, 70);
this.lbMsg.Size = new System.Drawing.Size(119, 56);
this.lbMsg.TabIndex = 5;
this.lbMsg.Text = "异常信息 提示";
this.lbMsg.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -490,9 +517,10 @@
this.panel2.Controls.Add(this.lbBegin);
this.panel2.Controls.Add(this.label2);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(3, 367);
this.panel2.Location = new System.Drawing.Point(2, 293);
this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1701, 54);
this.panel2.Size = new System.Drawing.Size(1276, 44);
this.panel2.TabIndex = 6;
//
// lbEnd
@ -500,9 +528,10 @@
this.lbEnd.AutoSize = true;
this.lbEnd.Font = new System.Drawing.Font("宋体", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbEnd.ForeColor = System.Drawing.Color.White;
this.lbEnd.Location = new System.Drawing.Point(494, 10);
this.lbEnd.Location = new System.Drawing.Point(370, 8);
this.lbEnd.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lbEnd.Name = "lbEnd";
this.lbEnd.Size = new System.Drawing.Size(257, 24);
this.lbEnd.Size = new System.Drawing.Size(218, 19);
this.lbEnd.TabIndex = 3;
this.lbEnd.Text = "2024-06-01 23:59:59";
//
@ -511,9 +540,10 @@
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("宋体", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.ForeColor = System.Drawing.Color.White;
this.label6.Location = new System.Drawing.Point(449, 10);
this.label6.Location = new System.Drawing.Point(337, 8);
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(23, 24);
this.label6.Size = new System.Drawing.Size(20, 19);
this.label6.TabIndex = 2;
this.label6.Text = "-";
//
@ -522,9 +552,10 @@
this.lbBegin.AutoSize = true;
this.lbBegin.Font = new System.Drawing.Font("宋体", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbBegin.ForeColor = System.Drawing.Color.White;
this.lbBegin.Location = new System.Drawing.Point(184, 10);
this.lbBegin.Location = new System.Drawing.Point(138, 8);
this.lbBegin.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lbBegin.Name = "lbBegin";
this.lbBegin.Size = new System.Drawing.Size(257, 24);
this.lbBegin.Size = new System.Drawing.Size(218, 19);
this.lbBegin.TabIndex = 1;
this.lbBegin.Text = "2024-06-01 00:00:00";
//
@ -533,9 +564,10 @@
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(5, 10);
this.label2.Location = new System.Drawing.Point(4, 8);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(173, 24);
this.label2.Size = new System.Drawing.Size(140, 19);
this.label2.TabIndex = 0;
this.label2.Text = "当前生产数据:";
//
@ -547,12 +579,13 @@
this.tableLayoutPanel4.Controls.Add(this.dgridScanRecords, 1, 0);
this.tableLayoutPanel4.Controls.Add(this.txtAllQty, 0, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 527);
this.tableLayoutPanel4.Location = new System.Drawing.Point(2, 421);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 1;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 452F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(1701, 502);
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 402F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(1276, 401);
this.tableLayoutPanel4.TabIndex = 7;
//
// dgridScanRecords
@ -576,7 +609,8 @@
this.});
this.dgridScanRecords.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgridScanRecords.EnableHeadersVisualStyles = false;
this.dgridScanRecords.Location = new System.Drawing.Point(853, 3);
this.dgridScanRecords.Location = new System.Drawing.Point(640, 2);
this.dgridScanRecords.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.dgridScanRecords.Name = "dgridScanRecords";
this.dgridScanRecords.ReadOnly = true;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
@ -589,9 +623,57 @@
this.dgridScanRecords.RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgridScanRecords.RowHeadersWidth = 51;
this.dgridScanRecords.RowTemplate.Height = 27;
this.dgridScanRecords.Size = new System.Drawing.Size(845, 496);
this.dgridScanRecords.Size = new System.Drawing.Size(634, 397);
this.dgridScanRecords.TabIndex = 4;
//
// 塑件唯一码
//
this..DataPropertyName = "BarCode";
this..HeaderText = "塑件唯一码";
this..MinimumWidth = 6;
this..Name = "塑件唯一码";
this..ReadOnly = true;
this..Width = 300;
//
// 零件号
//
this..DataPropertyName = "MCode";
this..HeaderText = "零件号";
this..MinimumWidth = 6;
this..Name = "零件号";
this..ReadOnly = true;
this..Visible = false;
this..Width = 200;
//
// 位置
//
this..DataPropertyName = "LeftOrRight";
this..HeaderText = "位置";
this..MinimumWidth = 6;
this..Name = "位置";
this..ReadOnly = true;
this..Visible = false;
this..Width = 200;
//
// 配置
//
this..DataPropertyName = "Cfg";
this..HeaderText = "配置";
this..MinimumWidth = 6;
this..Name = "配置";
this..ReadOnly = true;
this..Visible = false;
this..Width = 200;
//
// 生产时间
//
this..AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this..DataPropertyName = "ScanTime";
this..HeaderText = "扫描时间";
this..MinimumWidth = 6;
this..Name = "生产时间";
this..ReadOnly = true;
//
// txtAllQty
//
this.txtAllQty.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -601,9 +683,10 @@
this.txtAllQty.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(46)))), ((int)(((byte)(64)))));
this.txtAllQty.Font = new System.Drawing.Font("宋体", 220F, System.Drawing.FontStyle.Bold);
this.txtAllQty.ForeColor = System.Drawing.Color.Yellow;
this.txtAllQty.Location = new System.Drawing.Point(3, 0);
this.txtAllQty.Location = new System.Drawing.Point(2, 0);
this.txtAllQty.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.txtAllQty.Name = "txtAllQty";
this.txtAllQty.Size = new System.Drawing.Size(844, 502);
this.txtAllQty.Size = new System.Drawing.Size(634, 401);
this.txtAllQty.TabIndex = 5;
this.txtAllQty.Text = "0";
this.txtAllQty.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -612,9 +695,10 @@
//
this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(3, 103);
this.panel3.Location = new System.Drawing.Point(2, 82);
this.panel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1701, 1);
this.panel3.Size = new System.Drawing.Size(1276, 1);
this.panel3.TabIndex = 8;
//
// panel4
@ -622,9 +706,10 @@
this.panel4.Controls.Add(this.lbTime);
this.panel4.Controls.Add(this.label11);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(3, 3);
this.panel4.Location = new System.Drawing.Point(2, 2);
this.panel4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(1701, 94);
this.panel4.Size = new System.Drawing.Size(1276, 76);
this.panel4.TabIndex = 9;
//
// lbTime
@ -632,9 +717,10 @@
this.lbTime.AutoSize = true;
this.lbTime.Font = new System.Drawing.Font("宋体", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbTime.ForeColor = System.Drawing.Color.Yellow;
this.lbTime.Location = new System.Drawing.Point(1274, 37);
this.lbTime.Location = new System.Drawing.Point(956, 30);
this.lbTime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lbTime.Name = "lbTime";
this.lbTime.Size = new System.Drawing.Size(397, 40);
this.lbTime.Size = new System.Drawing.Size(319, 33);
this.lbTime.TabIndex = 1;
this.lbTime.Text = "2024-10-10 12:23:32";
//
@ -643,9 +729,10 @@
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("宋体", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.ForeColor = System.Drawing.Color.Yellow;
this.label11.Location = new System.Drawing.Point(258, 19);
this.label11.Location = new System.Drawing.Point(194, 15);
this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(513, 60);
this.label11.Size = new System.Drawing.Size(412, 48);
this.label11.TabIndex = 0;
this.label11.Text = "北汽模塑生产看板";
//
@ -661,61 +748,14 @@
this.dateTimer.Interval = 500;
this.dateTimer.Tick += new System.EventHandler(this.dateTimer_Tick);
//
// 塑件唯一码
//
this..DataPropertyName = "BarCode";
this..HeaderText = "塑件唯一码";
this..MinimumWidth = 6;
this..Name = "塑件唯一码";
this..ReadOnly = true;
this..Width = 300;
//
// 零件号
//
this..DataPropertyName = "MCode";
this..HeaderText = "零件号";
this..MinimumWidth = 6;
this..Name = "零件号";
this..ReadOnly = true;
this..Visible = false;
this..Width = 200;
//
// 位置
//
this..DataPropertyName = "LeftOrRight";
this..HeaderText = "位置";
this..MinimumWidth = 6;
this..Name = "位置";
this..ReadOnly = true;
this..Visible = false;
this..Width = 200;
//
// 配置
//
this..DataPropertyName = "Cfg";
this..HeaderText = "配置";
this..MinimumWidth = 6;
this..Name = "配置";
this..ReadOnly = true;
this..Visible = false;
this..Width = 200;
//
// 生产时间
//
this..AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this..DataPropertyName = "ScanTime";
this..HeaderText = "扫描时间";
this..MinimumWidth = 6;
this..Name = "生产时间";
this..ReadOnly = true;
//
// FrmDoorSill_214_3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1707, 1102);
this.ClientSize = new System.Drawing.Size(1280, 880);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "FrmDoorSill_214_3";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "214门槛冲孔";

2
SjMes/PunchAssemble/PunchAndWeld/FrmDoorSill_214_3.cs

@ -158,6 +158,7 @@ namespace PunchAndWeld
{
if (opcHelper.ConnectServer("", "Kepware.KEPServerEX.V6"))
{
LogHelper.WriteErrLogBase("Kepware.KEPServerEX.V6"+":连接成功", "InitPLC");
opcHelper.Connected = true;
ShowLinkState(true);
@ -359,6 +360,7 @@ namespace PunchAndWeld
if((leftOrRightModel =="左" && scanLeftOrRight == "右")|| (leftOrRightModel == "右" && scanLeftOrRight == "左"))
{
ShowHint($"生产模式为[{leftOrRightModel}],当前扫码为[{scanLeftOrRight}],与设置不匹配", true);
return;
}
if (scanLeftOrRight == "左")

2
SjMes/PunchAssemble/PunchAndWeld/OPCHelper.cs

@ -32,7 +32,7 @@ namespace PunchAndWeld
}
catch(Exception ex)
{
LogHelper.WriteErrLogBase(ex.ToString(),MethodBase.GetCurrentMethod().Name);
LogHelper.WriteErrLogBase(ex.ToString(), "CreateServer");
return false;
}
return true;

Loading…
Cancel
Save