Browse Source

注塑测试问题修改

master
ruoxing.wang 2 months ago
parent
commit
128c2627ec
  1. 166
      FacOneZPStation/FrmZP.Designer.cs
  2. 4
      InjectionPC/FrmLogin.cs
  3. 437
      InjectionPC/FrmMain.Designer.cs
  4. 526
      InjectionPC/FrmMain2408.Designer.cs
  5. 41
      InjectionPC/FrmMain2408.cs
  6. 392
      InjectionPC/FrmMain2411.Designer.cs
  7. 6
      InjectionPC/FrmMain2411.cs
  8. 6
      InjectionPC/FrmQuality.cs
  9. 11
      InjectionSearch/FrmBarCodeReplace.cs
  10. 2
      InjectionSearch/FrmBarCodeSearch2408.cs
  11. 8
      MESClassLibrary/BLL/BasicInfo/BadInjectionBLL.cs
  12. 22
      MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs
  13. 10
      MESClassLibrary/BLL/BasicInfo/StationBLL.cs
  14. 20
      MESClassLibrary/BLL/Wms/WmsBLL.cs
  15. 21
      MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs
  16. 24
      MESClassLibrary/DAL/BasicInfo/StationDAL.cs
  17. 36
      MESClassLibrary/DAL/Wms/WmsDAL.cs

166
FacOneZPStation/FrmZP.Designer.cs

@ -77,7 +77,7 @@
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.51529F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.62445F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.86026F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 668F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 732F));
this.tableLayoutPanel3.Controls.Add(this.button6, 3, 0);
this.tableLayoutPanel3.Controls.Add(this.button1, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.button5, 2, 1);
@ -86,14 +86,14 @@
this.tableLayoutPanel3.Controls.Add(this.button2, 1, 1);
this.tableLayoutPanel3.Controls.Add(this.button7, 3, 1);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(6, 1225);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.tableLayoutPanel3.Location = new System.Drawing.Point(7, 1401);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(2335, 371);
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(2546, 423);
this.tableLayoutPanel3.TabIndex = 3;
//
// button6
@ -102,10 +102,10 @@
this.button6.Dock = System.Windows.Forms.DockStyle.Fill;
this.button6.Font = new System.Drawing.Font("黑体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button6.ForeColor = System.Drawing.Color.Black;
this.button6.Location = new System.Drawing.Point(1678, 12);
this.button6.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button6.Location = new System.Drawing.Point(1826, 14);
this.button6.Margin = new System.Windows.Forms.Padding(14);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(644, 161);
this.button6.Size = new System.Drawing.Size(706, 183);
this.button6.TabIndex = 7;
this.button6.Text = "手动打印箱单";
this.button6.UseVisualStyleBackColor = false;
@ -116,10 +116,10 @@
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.button1.Dock = System.Windows.Forms.DockStyle.Fill;
this.button1.Font = new System.Drawing.Font("黑体", 16F);
this.button1.Location = new System.Drawing.Point(6, 190);
this.button1.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button1.Location = new System.Drawing.Point(7, 217);
this.button1.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(546, 176);
this.button1.Size = new System.Drawing.Size(593, 200);
this.button1.TabIndex = 6;
this.button1.Text = "打印标签";
this.button1.UseVisualStyleBackColor = false;
@ -131,10 +131,10 @@
this.button5.Dock = System.Windows.Forms.DockStyle.Fill;
this.button5.Font = new System.Drawing.Font("黑体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button5.ForeColor = System.Drawing.Color.Black;
this.button5.Location = new System.Drawing.Point(1131, 197);
this.button5.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button5.Location = new System.Drawing.Point(1230, 225);
this.button5.Margin = new System.Windows.Forms.Padding(14);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(521, 162);
this.button5.Size = new System.Drawing.Size(568, 184);
this.button5.TabIndex = 5;
this.button5.Text = "不合格";
this.button5.UseVisualStyleBackColor = false;
@ -145,10 +145,10 @@
this.button4.BackColor = System.Drawing.Color.RoyalBlue;
this.button4.Dock = System.Windows.Forms.DockStyle.Fill;
this.button4.Font = new System.Drawing.Font("黑体", 16F);
this.button4.Location = new System.Drawing.Point(564, 5);
this.button4.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button4.Location = new System.Drawing.Point(614, 6);
this.button4.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(548, 175);
this.button4.Size = new System.Drawing.Size(595, 199);
this.button4.TabIndex = 4;
this.button4.Text = "下一计划";
this.button4.UseVisualStyleBackColor = false;
@ -159,10 +159,10 @@
this.button3.BackColor = System.Drawing.Color.Aqua;
this.button3.Dock = System.Windows.Forms.DockStyle.Fill;
this.button3.Font = new System.Drawing.Font("黑体", 16F);
this.button3.Location = new System.Drawing.Point(6, 5);
this.button3.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button3.Location = new System.Drawing.Point(7, 6);
this.button3.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(546, 175);
this.button3.Size = new System.Drawing.Size(593, 199);
this.button3.TabIndex = 3;
this.button3.Text = "上一计划";
this.button3.UseVisualStyleBackColor = false;
@ -174,10 +174,10 @@
this.button2.Dock = System.Windows.Forms.DockStyle.Fill;
this.button2.Font = new System.Drawing.Font("黑体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button2.ForeColor = System.Drawing.Color.Black;
this.button2.Location = new System.Drawing.Point(571, 197);
this.button2.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12);
this.button2.Location = new System.Drawing.Point(621, 225);
this.button2.Margin = new System.Windows.Forms.Padding(14);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(534, 162);
this.button2.Size = new System.Drawing.Size(581, 184);
this.button2.TabIndex = 2;
this.button2.Text = "补打标签";
this.button2.UseVisualStyleBackColor = false;
@ -188,10 +188,10 @@
this.button7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.button7.Dock = System.Windows.Forms.DockStyle.Fill;
this.button7.Font = new System.Drawing.Font("黑体", 16F);
this.button7.Location = new System.Drawing.Point(1671, 190);
this.button7.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.button7.Location = new System.Drawing.Point(1819, 217);
this.button7.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(658, 176);
this.button7.Size = new System.Drawing.Size(720, 200);
this.button7.TabIndex = 8;
this.button7.Text = "补打箱单";
this.button7.UseVisualStyleBackColor = false;
@ -203,11 +203,11 @@
this.label7.Dock = System.Windows.Forms.DockStyle.Fill;
this.label7.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.ForeColor = System.Drawing.Color.White;
this.label7.Location = new System.Drawing.Point(1366, 3);
this.label7.Location = new System.Drawing.Point(1486, 3);
this.label7.Margin = new System.Windows.Forms.Padding(2);
this.label7.Name = "label7";
this.tableLayoutPanel4.SetRowSpan(this.label7, 2);
this.label7.Size = new System.Drawing.Size(249, 211);
this.label7.Size = new System.Drawing.Size(272, 241);
this.label7.TabIndex = 32;
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@ -215,10 +215,10 @@
//
this.textBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox2.Font = new System.Drawing.Font("黑体", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox2.Location = new System.Drawing.Point(394, 111);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBox2.Location = new System.Drawing.Point(428, 127);
this.textBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(965, 77);
this.textBox2.Size = new System.Drawing.Size(1051, 87);
this.textBox2.TabIndex = 30;
this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown);
//
@ -227,10 +227,10 @@
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
this.label3.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.Location = new System.Drawing.Point(5, 107);
this.label3.Location = new System.Drawing.Point(5, 122);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(380, 109);
this.label3.Size = new System.Drawing.Size(414, 124);
this.label3.TabIndex = 29;
this.label3.Text = "扫描物料条码";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -240,10 +240,10 @@
this.labOrderNo.Dock = System.Windows.Forms.DockStyle.Fill;
this.labOrderNo.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labOrderNo.ForeColor = System.Drawing.Color.White;
this.labOrderNo.Location = new System.Drawing.Point(1620, 219);
this.labOrderNo.Location = new System.Drawing.Point(1763, 249);
this.labOrderNo.Margin = new System.Windows.Forms.Padding(2);
this.labOrderNo.Name = "labOrderNo";
this.labOrderNo.Size = new System.Drawing.Size(716, 152);
this.labOrderNo.Size = new System.Drawing.Size(786, 174);
this.labOrderNo.TabIndex = 28;
this.labOrderNo.Text = "A64654646464";
this.labOrderNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -254,10 +254,10 @@
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ForeColor = System.Drawing.Color.White;
this.label4.Location = new System.Drawing.Point(1366, 219);
this.label4.Location = new System.Drawing.Point(1486, 249);
this.label4.Margin = new System.Windows.Forms.Padding(2);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(249, 152);
this.label4.Size = new System.Drawing.Size(272, 174);
this.label4.TabIndex = 27;
this.label4.Text = "计划编号";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -268,10 +268,10 @@
this.labStationNo.Dock = System.Windows.Forms.DockStyle.Fill;
this.labStationNo.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labStationNo.ForeColor = System.Drawing.Color.White;
this.labStationNo.Location = new System.Drawing.Point(392, 219);
this.labStationNo.Location = new System.Drawing.Point(426, 249);
this.labStationNo.Margin = new System.Windows.Forms.Padding(2);
this.labStationNo.Name = "labStationNo";
this.labStationNo.Size = new System.Drawing.Size(969, 152);
this.labStationNo.Size = new System.Drawing.Size(1055, 174);
this.labStationNo.TabIndex = 26;
this.labStationNo.Text = "V253-MF-S后保下部延伸焊接";
this.labStationNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -282,10 +282,10 @@
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(3, 219);
this.label2.Location = new System.Drawing.Point(3, 249);
this.label2.Margin = new System.Windows.Forms.Padding(2);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(384, 152);
this.label2.Size = new System.Drawing.Size(418, 174);
this.label2.TabIndex = 25;
this.label2.Text = "工位名称";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -295,10 +295,10 @@
this.labPName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labPName.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labPName.ForeColor = System.Drawing.Color.White;
this.labPName.Location = new System.Drawing.Point(1620, 376);
this.labPName.Location = new System.Drawing.Point(1763, 428);
this.labPName.Margin = new System.Windows.Forms.Padding(2);
this.labPName.Name = "labPName";
this.labPName.Size = new System.Drawing.Size(716, 249);
this.labPName.Size = new System.Drawing.Size(786, 285);
this.labPName.TabIndex = 24;
this.labPName.Text = "MF253 MF S后保";
this.labPName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -309,10 +309,10 @@
this.label8.Dock = System.Windows.Forms.DockStyle.Fill;
this.label8.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.ForeColor = System.Drawing.Color.White;
this.label8.Location = new System.Drawing.Point(1366, 376);
this.label8.Location = new System.Drawing.Point(1486, 428);
this.label8.Margin = new System.Windows.Forms.Padding(2);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(249, 249);
this.label8.Size = new System.Drawing.Size(272, 285);
this.label8.TabIndex = 23;
this.label8.Text = "产品名称";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -323,10 +323,10 @@
this.labPartNo.Dock = System.Windows.Forms.DockStyle.Fill;
this.labPartNo.Font = new System.Drawing.Font("黑体", 42F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labPartNo.ForeColor = System.Drawing.Color.White;
this.labPartNo.Location = new System.Drawing.Point(392, 376);
this.labPartNo.Location = new System.Drawing.Point(426, 428);
this.labPartNo.Margin = new System.Windows.Forms.Padding(2);
this.labPartNo.Name = "labPartNo";
this.labPartNo.Size = new System.Drawing.Size(969, 249);
this.labPartNo.Size = new System.Drawing.Size(1055, 285);
this.labPartNo.TabIndex = 22;
this.labPartNo.Text = "A2530822665";
this.labPartNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -342,10 +342,10 @@
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
this.label6.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.ForeColor = System.Drawing.Color.White;
this.label6.Location = new System.Drawing.Point(3, 376);
this.label6.Location = new System.Drawing.Point(3, 428);
this.label6.Margin = new System.Windows.Forms.Padding(2);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(384, 249);
this.label6.Size = new System.Drawing.Size(418, 285);
this.label6.TabIndex = 21;
this.label6.Text = "产品代码";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -356,10 +356,10 @@
this.labBadCount.Dock = System.Windows.Forms.DockStyle.Fill;
this.labBadCount.Font = new System.Drawing.Font("黑体", 60F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labBadCount.ForeColor = System.Drawing.Color.Lime;
this.labBadCount.Location = new System.Drawing.Point(1620, 630);
this.labBadCount.Location = new System.Drawing.Point(1763, 718);
this.labBadCount.Margin = new System.Windows.Forms.Padding(2);
this.labBadCount.Name = "labBadCount";
this.labBadCount.Size = new System.Drawing.Size(716, 449);
this.labBadCount.Size = new System.Drawing.Size(786, 515);
this.labBadCount.TabIndex = 20;
this.labBadCount.Text = "0";
this.labBadCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -370,10 +370,10 @@
this.labNum.Dock = System.Windows.Forms.DockStyle.Fill;
this.labNum.Font = new System.Drawing.Font("黑体", 60F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labNum.ForeColor = System.Drawing.Color.Lime;
this.labNum.Location = new System.Drawing.Point(392, 630);
this.labNum.Location = new System.Drawing.Point(426, 718);
this.labNum.Margin = new System.Windows.Forms.Padding(2);
this.labNum.Name = "labNum";
this.labNum.Size = new System.Drawing.Size(969, 449);
this.labNum.Size = new System.Drawing.Size(1055, 515);
this.labNum.TabIndex = 18;
this.labNum.Text = "152/210";
this.labNum.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -384,10 +384,10 @@
this.label10.Dock = System.Windows.Forms.DockStyle.Fill;
this.label10.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.ForeColor = System.Drawing.Color.White;
this.label10.Location = new System.Drawing.Point(3, 630);
this.label10.Location = new System.Drawing.Point(3, 718);
this.label10.Margin = new System.Windows.Forms.Padding(2);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(384, 449);
this.label10.Size = new System.Drawing.Size(418, 515);
this.label10.TabIndex = 17;
this.label10.Text = "计划/完成数";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -400,7 +400,7 @@
this.label14.Location = new System.Drawing.Point(5, 1);
this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(380, 105);
this.label14.Size = new System.Drawing.Size(414, 120);
this.label14.TabIndex = 12;
this.label14.Text = "扫描本体条码";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -409,10 +409,10 @@
//
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Font = new System.Drawing.Font("黑体", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox1.Location = new System.Drawing.Point(394, 5);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBox1.Location = new System.Drawing.Point(428, 6);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(965, 77);
this.textBox1.Size = new System.Drawing.Size(1051, 87);
this.textBox1.TabIndex = 13;
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
//
@ -421,11 +421,11 @@
this.labErrMessage.Dock = System.Windows.Forms.DockStyle.Fill;
this.labErrMessage.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labErrMessage.ForeColor = System.Drawing.Color.Red;
this.labErrMessage.Location = new System.Drawing.Point(1622, 1);
this.labErrMessage.Location = new System.Drawing.Point(1765, 1);
this.labErrMessage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.labErrMessage.Name = "labErrMessage";
this.tableLayoutPanel4.SetRowSpan(this.labErrMessage, 2);
this.labErrMessage.Size = new System.Drawing.Size(712, 215);
this.labErrMessage.Size = new System.Drawing.Size(782, 245);
this.labErrMessage.TabIndex = 16;
this.labErrMessage.Text = "条码与产品不匹配,重新扫描";
this.labErrMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -437,9 +437,9 @@
this.tableLayoutPanel4.ColumnCount = 4;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28.52292F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 71.47708F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 253F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 719F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 37F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 276F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 789F));
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel4.Controls.Add(this.label7, 2, 0);
this.tableLayoutPanel4.Controls.Add(this.textBox2, 1, 1);
this.tableLayoutPanel4.Controls.Add(this.label3, 0, 1);
@ -459,17 +459,17 @@
this.tableLayoutPanel4.Controls.Add(this.textBox1, 1, 0);
this.tableLayoutPanel4.Controls.Add(this.labErrMessage, 3, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 134);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 154);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 5;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.8932F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 17.47573F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40.52419F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 452F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(2339, 1082);
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 517F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(2552, 1236);
this.tableLayoutPanel4.TabIndex = 2;
//
// label12
@ -478,10 +478,10 @@
this.label12.Dock = System.Windows.Forms.DockStyle.Fill;
this.label12.Font = new System.Drawing.Font("黑体", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.ForeColor = System.Drawing.Color.White;
this.label12.Location = new System.Drawing.Point(1366, 630);
this.label12.Location = new System.Drawing.Point(1486, 718);
this.label12.Margin = new System.Windows.Forms.Padding(2);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(249, 449);
this.label12.Size = new System.Drawing.Size(272, 515);
this.label12.TabIndex = 19;
this.label12.Text = "不合格数";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -491,10 +491,10 @@
this.labTime.BackColor = System.Drawing.Color.Transparent;
this.labTime.Dock = System.Windows.Forms.DockStyle.Fill;
this.labTime.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.labTime.Location = new System.Drawing.Point(1789, 0);
this.labTime.Location = new System.Drawing.Point(1949, 0);
this.labTime.Margin = new System.Windows.Forms.Padding(0);
this.labTime.Name = "labTime";
this.labTime.Size = new System.Drawing.Size(558, 130);
this.labTime.Size = new System.Drawing.Size(611, 149);
this.labTime.TabIndex = 7;
this.labTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.labTime.Click += new System.EventHandler(this.labTime_Click);
@ -508,7 +508,7 @@
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(324, 130);
this.pictureBox1.Size = new System.Drawing.Size(353, 149);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
@ -518,10 +518,10 @@
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.Font = new System.Drawing.Font("黑体", 22F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(324, 0);
this.label1.Location = new System.Drawing.Point(353, 0);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(1465, 130);
this.label1.Size = new System.Drawing.Size(1596, 149);
this.label1.TabIndex = 1;
this.label1.Text = "装配工位信息看板";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -532,7 +532,7 @@
this.tableLayoutPanel2.ColumnCount = 3;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 18.10651F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 81.89349F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 557F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 610F));
this.tableLayoutPanel2.Controls.Add(this.labTime, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.label1, 1, 0);
@ -542,7 +542,7 @@
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(2347, 130);
this.tableLayoutPanel2.Size = new System.Drawing.Size(2560, 149);
this.tableLayoutPanel2.TabIndex = 0;
//
// tableLayoutPanel1
@ -559,18 +559,18 @@
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.69692F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 89.30308F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 380F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(2347, 1601);
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 434F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(2560, 1830);
this.tableLayoutPanel1.TabIndex = 9;
//
// FrmZP
//
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F);
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(2347, 1601);
this.ClientSize = new System.Drawing.Size(2560, 1830);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
this.Margin = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.Name = "FrmZP";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmZP";

4
InjectionPC/FrmLogin.cs

@ -92,8 +92,8 @@ namespace InjectionPC
{
this.Visible = false;
//Form fr = new FrmMain();
//Form fr = new FrmMain2408();
Form fr = new FrmMain2411();
Form fr = new FrmMain2408();
//Form fr = new FrmMain2411();
fr.Show();
//if (ConfigurationManager.AppSettings["Mode"] == "0")
//{

437
InjectionPC/FrmMain.Designer.cs

File diff suppressed because it is too large

526
InjectionPC/FrmMain2408.Designer.cs

File diff suppressed because it is too large

41
InjectionPC/FrmMain2408.cs

@ -2161,6 +2161,8 @@ namespace InjectionPC
{
dt = list.CopyToDataTable();
}
Program.strBarCode = "";
Program.strBoxCode = "";
if (dt != null && dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
@ -3054,7 +3056,7 @@ namespace InjectionPC
return;
}
string msg = bll.ReprintSave(md, Program.tableName, dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString());
string msg = bll.ReprintSave(md, Program.tableName, dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString(),Program.station);
if (!string.IsNullOrEmpty(msg))
{
MessageBox.Show($"补打失败,原因:" + msg);
@ -3158,11 +3160,15 @@ namespace InjectionPC
string boxCode = (glacialList1.SelectedItems[0] as GlacialComponents.Controls.GLItem).SubItems[0].Tag?.ToString();
if(boxCode == lbPackageCodeL.Text?.Trim() || boxCode == lbPackageCodeR.Text?.Trim())
{
string msg = bll.DelBarCode(gv.Text?.Trim(), Program.tableName);
string msg = bll.DelBarCode(gv.Text?.Trim(), Program.tableName,true, boxCode);
if (!string.IsNullOrEmpty(msg))
{
MessageBox.Show(msg);
}
else
{
InitPackageInfo();
}
initBarCode();
}
else
@ -3170,6 +3176,7 @@ namespace InjectionPC
MessageBox.Show($" 删除条码的箱码[{boxCode}]不属于当前装箱范围内,无法删除.!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
}
}
}
@ -4258,11 +4265,17 @@ namespace InjectionPC
////wms接口传递
//_wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), MESClassLibrary.Enum.WmsInterfaceEnum.塑件箱码报工);
_wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), _lastBoxNoL, _lastBoxNoR, MESClassLibrary.Enum.WmsInterfaceEnum.);
_lastBoxNoL = lbPackageCodeL.Text;
_lastBoxNoR = lbPackageCodeR.Text;
PrintBoxCode(dt.Rows[0], realCount, mould);
string rst = _wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), _lastBoxNoL, _lastBoxNoR, MESClassLibrary.Enum.WmsInterfaceEnum., Program.station);
if (string.IsNullOrEmpty(rst))
{
_lastBoxNoL = lbPackageCodeL.Text;
_lastBoxNoR = lbPackageCodeR.Text;
PrintBoxCode(dt.Rows[0], realCount, mould);
}
else
{
MessageBox.Show(rst);
}
}
else
{
@ -4781,9 +4794,17 @@ namespace InjectionPC
lbPackageCodeL.Text = "";
lbCurrentlQtyL.Text = "0";
_wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), "", "", MESClassLibrary.Enum.WmsInterfaceEnum.);
string rst = _wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), "", "", MESClassLibrary.Enum.WmsInterfaceEnum., Program.station);
if (string.IsNullOrEmpty(rst))
{
PrintBoxCode(dt.Rows[0], int.Parse(dt.Rows[0]["BoxCount"].ToString()), "0");
}
else
{
MessageBox.Show(rst);
return false;
}
PrintBoxCode(dt.Rows[0], int.Parse(dt.Rows[0]["BoxCount"].ToString()), "0");
}
}
}
@ -4801,7 +4822,7 @@ namespace InjectionPC
lbPackageCodeR.Text = "";
lbCurrentlQtyR.Text = "0";
_wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), "", "", MESClassLibrary.Enum.WmsInterfaceEnum.);
_wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), "", "", MESClassLibrary.Enum.WmsInterfaceEnum., Program.station);
PrintBoxCode(dt.Rows[0], int.Parse(dt.Rows[0]["BoxCount"].ToString()), "1");
}
}

392
InjectionPC/FrmMain2411.Designer.cs

File diff suppressed because it is too large

6
InjectionPC/FrmMain2411.cs

@ -3000,7 +3000,7 @@ namespace InjectionPC
return;
}
string msg = bll.ReprintSave(md, Program.tableName, dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString());
string msg = bll.ReprintSave(md, Program.tableName, dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString(),Program.station);
if (!string.IsNullOrEmpty(msg))
{
MessageBox.Show($"补打失败,原因:" + msg);
@ -3101,7 +3101,7 @@ namespace InjectionPC
gv = glacialList1.SelectedItems[0] as GlacialComponents.Controls.GLItem;
md.BarCode = gv.Text;
string msg = bll.DelBarCode(gv.Text?.Trim(), Program.tableName);
string msg = bll.DelBarCode(gv.Text?.Trim(), Program.tableName,false,"");
if (!string.IsNullOrEmpty(msg))
{
MessageBox.Show(msg);
@ -4099,7 +4099,7 @@ namespace InjectionPC
bool SaveBarCode(BarCodeModel bcm,string tableName, bool isAutoPrint,string mould,bool handPrint = false)
{
string rst = _wmsBll.SaveRecordAndInterface(bcm, Program.tableName,"");
string rst = _wmsBll.SaveRecordAndInterface(bcm, Program.tableName,"",Program.station);
if (string.IsNullOrEmpty(rst))
{
return true;

6
InjectionPC/FrmQuality.cs

@ -558,7 +558,7 @@ namespace InjectionPC
return false;
}
string msg = badBLL.SaveBad(badmd,boxCode, Program.tableName);
string msg = badBLL.SaveBad(badmd,boxCode, Program.tableName, Program.station);
if (!string.IsNullOrEmpty(msg))
{
MessageBox.Show("报废操作失败,失败原因:" + msg);
@ -582,7 +582,7 @@ namespace InjectionPC
return false;
}
string msg = badBLL.SaveBad(badmd, boxCode, Program.tableName);
string msg = badBLL.SaveBad(badmd, boxCode, Program.tableName, Program.station);
if (!string.IsNullOrEmpty(msg))
{
MessageBox.Show("报废操作失败,失败原因:" + msg);
@ -602,7 +602,7 @@ namespace InjectionPC
if (!string.IsNullOrEmpty(boxCode))
{
badmd.Desc = textBox4.Text?.Trim();
string msg = badBLL.SaveBadByBatch(boxDetailTable, stationId, position, reason, boxCode, Program.tableName, textBox4.Text?.Trim());
string msg = badBLL.SaveBadByBatch(boxDetailTable, stationId, position, reason, boxCode, Program.tableName, textBox4.Text?.Trim(), Program.station);
if (!string.IsNullOrEmpty(msg))
{

11
InjectionSearch/FrmBarCodeReplace.cs

@ -19,6 +19,7 @@ namespace InjectionSearch
private BarCodeBLL _barCodeBLL = new BarCodeBLL();
private InjectionBoxBLL _injectionBoxBLL = new InjectionBoxBLL();
private BadInjectionBLL _badInjectionBLL = new BadInjectionBLL();
private StationBLL _stationBLL = new StationBLL();
private WmsBLL wmsBLL = new WmsBLL();
public FrmBarCodeReplace(DataRow barCodeRow)
@ -43,13 +44,13 @@ namespace InjectionSearch
}
DataTable dt = _barCodeBLL.SearchBarCodeByOne(newCode);
DataTable dt = _barCodeBLL.SearchBarCodeByOne(newCode);//已经过滤掉删除的了
if (dt.Rows.Count == 0)
{
MessageBox.Show($"输入条码{newCode}在系统中不存在.");
return;
}
if (dt.Rows[0]["IsBad"].ToString() == "1")
if (dt.Rows[0]["IsBad"].ToString() == "1" )
{
MessageBox.Show($"输入条码{newCode}已报废,无法使用.");
return;
@ -111,9 +112,11 @@ namespace InjectionSearch
model.BadReason = "不良替换自动报废";
model.PlanID = oldTable.Rows[0]["PlanID"].ToString();
//_badInjectionBLL.Add_Info(model);
_barCodeBLL.BarCodeReplace(oldTable.Rows[0]["TableName"].ToString(), dt.Rows[0]["TableName"].ToString(), boxNo, oldTable.Rows[0]["ID"].ToString(), dt.Rows[0]["ID"].ToString(), dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString(), model);
string stationID = dt.Rows[0]["StationID"].ToString();
string stationNo = _stationBLL.SearchStationNameByID(stationID);
_barCodeBLL.BarCodeReplace(oldTable.Rows[0]["TableName"].ToString(), dt.Rows[0]["TableName"].ToString(), boxNo, oldTable.Rows[0]["ID"].ToString(), dt.Rows[0]["ID"].ToString(), dt.Rows[0]["OneBarCode"].ToString(), dt.Rows[0]["BarCode"].ToString(), model, stationNo);
MessageBox.Show($"替换成功.原条码[{oldCode}]已被报废.");
MessageBox.Show($"替换成功.原条码[{oldCode}]已与箱码解绑.");
this.Close();
}
catch(Exception ex)

2
InjectionSearch/FrmBarCodeSearch2408.cs

@ -1081,7 +1081,7 @@ namespace InjectionSearch
////wms接口传递
//_wmsBll.SaveInterface(dt.Rows[0], MESClassLibrary.Enum.WmsInterfaceEnum.塑件箱码报工);
_wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), _lastBoxNo, "", MESClassLibrary.Enum.WmsInterfaceEnum.);
_wmsBll.SaveInterface(dt.Rows[0]["BoxNo"].ToString(), _lastBoxNo, "", MESClassLibrary.Enum.WmsInterfaceEnum., Program.station);
//打印箱码
PrintBoxCode(dt.Rows[0], realCount,false);

8
MESClassLibrary/BLL/BasicInfo/BadInjectionBLL.cs

@ -243,7 +243,7 @@ namespace MESClassLibrary.BLL.BasicInfo
/// <param name="boxCode"></param>
/// <param name="tableName"></param>
/// <returns></returns>
public string SaveBad(BadInjectionModel md, string boxCode, string tableName)
public string SaveBad(BadInjectionModel md, string boxCode, string tableName,string station)
{
LocalDBService localDB = new LocalDBService(SqlHelper.GetConnSting());
@ -268,7 +268,7 @@ namespace MESClassLibrary.BLL.BasicInfo
bcm.PartNo = md.code;
bcm.StationID = md.StationID;
_wmsBll.DeleteInterface(localDB, md.OneBarCode);
_wmsBll.SaveInterface(localDB, bcm, md.BadReason);
_wmsBll.SaveInterface(localDB, bcm, md.BadReason, station);
localDB.Commit();
return "";
}
@ -300,7 +300,7 @@ namespace MESClassLibrary.BLL.BasicInfo
/// <param name="tableName"></param>
/// <param name="partNo"></param>
/// <returns></returns>
public string SaveBadByBatch(DataTable boxDetailTable,string stationId,string position,string reason, string boxCode,string tableName,string partName)
public string SaveBadByBatch(DataTable boxDetailTable,string stationId,string position,string reason, string boxCode,string tableName,string partName,string station)
{
LocalDBService localDB = new LocalDBService(SqlHelper.GetConnSting());
@ -343,7 +343,7 @@ namespace MESClassLibrary.BLL.BasicInfo
bcm.PartNo = dr["PartNo"].ToString();
bcm.StationID = stationId;
_wmsBll.SaveInterface(localDB, bcm, reason);
_wmsBll.SaveInterface(localDB, bcm, reason, station);
}
barCodeBll.UpdateIsBadByBoxCode(localDB,tableName, boxCode);

22
MESClassLibrary/BLL/BasicInfo/BarCodeBLL.cs

@ -18,6 +18,7 @@ namespace MESClassLibrary.BLL.BasicInfo
private BarCodeDAl db = new BarCodeDAl();
private WmsDAL wmsDal = new WmsDAL();
private BadInjectionDAL badDb = new BadInjectionDAL();
private InjectionBoxDAL _injectionBoxDAL = new InjectionBoxDAL();
public DataTable SearchInfoByStock(string StockNo)
{
try
@ -121,7 +122,7 @@ namespace MESClassLibrary.BLL.BasicInfo
/// <param name="oldOneBarCode"></param>
/// <param name="oldBarCode"></param>
/// <returns></returns>
public string ReprintSave(BarCodeModel md, string tableName,string oldOneBarCode,string oldBarCode)
public string ReprintSave(BarCodeModel md, string tableName,string oldOneBarCode,string oldBarCode,string station)
{
LocalDBService local = new LocalDBService(SqlHelper.GetConnSting());
try
@ -144,7 +145,7 @@ namespace MESClassLibrary.BLL.BasicInfo
wmsDal.DeleteInterface(local, oldOneBarCode);
}
md.Remark = "补打,原塑件码:" + oldOneBarCode;
wmsDal.SaveInterface(local, md, "");
wmsDal.SaveInterface(local, md, "", station);
local.Commit();
@ -346,7 +347,7 @@ namespace MESClassLibrary.BLL.BasicInfo
/// <param name="barCode"></param>
/// <param name="tableName"></param>
/// <returns></returns>
public string DelBarCode(string barCode, string tableName)
public string DelBarCode(string barCode, string tableName,bool isBox,string boxCode)
{
LocalDBService localDB = new LocalDBService(SqlHelper.GetConnSting());
try
@ -358,6 +359,11 @@ namespace MESClassLibrary.BLL.BasicInfo
throw new Exception($"条码在wms库已报工,无法删除!");
}
db.DelBarCode(localDB, barCode, tableName);
if (isBox)
{
//箱码需要更新箱单实际数量
_injectionBoxDAL.UpdateInfo(localDB, boxCode, -1, false);
}
localDB.Commit();
return "";
}
@ -416,19 +422,19 @@ namespace MESClassLibrary.BLL.BasicInfo
/// <param name="newID"></param>
/// <param name="model"></param>
/// <returns></returns>
public bool BarCodeReplace(string oldtableName, string newtableName, string boxCode,string oldID,string newID,string newOneBarCode,string newBarCode, BadInjectionModel model)
public bool BarCodeReplace(string oldtableName, string newtableName, string boxCode,string oldID,string newID,string newOneBarCode,string newBarCode, BadInjectionModel model,string station)
{
LocalDBService localDB = new LocalDBService(SqlHelper.GetConnSting());
try
{
localDB.BeginTrans();
db.UpdateBoxNoByID(localDB, newtableName, boxCode, newID);
db.UpdateBoxNoNull(localDB, oldtableName, oldID);
badDb.AddInfo(localDB, model);
db.UpdateBoxNoByID(localDB, newtableName, boxCode, newID); //更新新条码在tb_barcode中的箱码
db.UpdateBoxNoNull(localDB, oldtableName, oldID, newBarCode); //更新就条码在tb_barcode中的箱码为空 记录一下被替代的新条码
//badDb.AddInfo(localDB, model);//不直接报废,所以不插入tb_Bad_Injection
//删除旧的条码
wmsDal.DeleteRecord(localDB, boxCode, model.OneBarCode, model.BarCode);
//保存新条码
wmsDal.AddRecord(localDB, boxCode, newOneBarCode, newBarCode,"0", model.Desc,"");
wmsDal.AddRecord(localDB, boxCode, newOneBarCode, newBarCode,"0", model.Desc,"",station);
localDB.Commit();
return true;
}

10
MESClassLibrary/BLL/BasicInfo/StationBLL.cs

@ -234,6 +234,14 @@ namespace MESClassLibrary.BLL.BasicInfo
return false;
}
}
/// <summary>
/// 根据stationID 查询StationNo
/// </summary>
/// <param name="stationID"></param>
/// <returns></returns>
public string SearchStationNameByID(string stationID)
{
return da.SearchStationNameByID(stationID);
}
}
}

20
MESClassLibrary/BLL/Wms/WmsBLL.cs

@ -18,7 +18,7 @@ namespace MESClassLibrary.BLL.Injection
private WmsDAL da=new WmsDAL();
private BarCodeDAl barCodeDal = new BarCodeDAl();
public string SaveRecordAndInterface(BarCodeModel bcm,string tableName,string badReason)
public string SaveRecordAndInterface(BarCodeModel bcm,string tableName,string badReason, string station)
{
LocalDBService local = new LocalDBService(SqlHelper.GetConnSting());
try
@ -26,7 +26,7 @@ namespace MESClassLibrary.BLL.Injection
local.BeginTrans();
barCodeDal.AddInfoNew(local, bcm, tableName);
da.SaveInterface(local, bcm, badReason);
da.SaveInterface(local, bcm, badReason, station);
local.Commit();
}
catch (Exception ex)
@ -48,9 +48,9 @@ namespace MESClassLibrary.BLL.Injection
}
public void SaveInterface(LocalDBService local ,BarCodeModel bcm,string badReason)
public void SaveInterface(LocalDBService local ,BarCodeModel bcm,string badReason,string station)
{
da.SaveInterface(local, bcm, badReason);
da.SaveInterface(local, bcm, badReason, station);
}
public void DeleteInterface(LocalDBService local, string oneBarCode)
{
@ -65,7 +65,7 @@ namespace MESClassLibrary.BLL.Injection
/// <param name="lastBoxNo2"></param>
/// <param name="interfaceType"></param>
/// <returns></returns>
public string SaveInterface(string boxNo,string lastBoxNo1,string lastBoxNo2, WmsInterfaceEnum interfaceType)
public string SaveInterface(string boxNo,string lastBoxNo1,string lastBoxNo2, WmsInterfaceEnum interfaceType,string station )
{
//上一个是否传递成功,没成功重新传 左侧
if (!string.IsNullOrEmpty(lastBoxNo1))
@ -73,7 +73,7 @@ namespace MESClassLibrary.BLL.Injection
bool exsit = da.IsSendPackageCode(lastBoxNo1);
if(exsit == false)
{
SendToInterface(lastBoxNo1,"");
SendToInterface(lastBoxNo1,"", station);
}
}
//上一个是否传递成功,没成功重新传 右侧侧
@ -82,10 +82,10 @@ namespace MESClassLibrary.BLL.Injection
bool exsit = da.IsSendPackageCode(lastBoxNo2);
if (exsit == false)
{
SendToInterface(lastBoxNo2, "");
SendToInterface(lastBoxNo2, "", station);
}
}
string rst = SendToInterface(boxNo,"");
string rst = SendToInterface(boxNo,"", station);
if (!string.IsNullOrEmpty(rst))
{
LogErrBLL.AddInfo(rst, MethodBase.GetCurrentMethod());
@ -96,11 +96,11 @@ namespace MESClassLibrary.BLL.Injection
}
private string SendToInterface(string boxNo, string badReason)
private string SendToInterface(string boxNo, string badReason,string station )
{
DataTable barCodeTable = barCodeDal.SearchInfoByBox(boxNo);
string rst = da.SaveInterface(barCodeTable, badReason);
string rst = da.SaveInterface(barCodeTable, badReason, station);
return rst;
}
/// <summary>

21
MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs

@ -925,8 +925,6 @@ namespace MESClassLibrary.DAL.BasicInfo
}
public bool UpdateBoxNoByID(LocalDBService localDB, string tableName, string boxNo, string id)
{
try
{
#region 添加数据
string sql = "";
sql = $@"update {tableName} set BoxNo='{boxNo}' where id='{id}'";
@ -935,21 +933,14 @@ namespace MESClassLibrary.DAL.BasicInfo
//SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
#endregion
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool UpdateBoxNoNull(LocalDBService localDB, string tableName, string id)
public bool UpdateBoxNoNull(LocalDBService localDB, string tableName, string id,string newBarCode)
{
try
{
#region 添加数据
string sql = "";
sql = $@"update {tableName} set IsBad=1,BoxNo='' where id='{id}'";
//sql = $@"update {tableName} set IsBad=1,BoxNo='' where id='{id}'";
sql = $@"update {tableName} set BoxNo='',Des4='被手动替换,新条码:{newBarCode}' where id='{id}'"; //经过讨论,替换不自动报废,只是清空箱码
#region 添加参数
@ -958,12 +949,6 @@ namespace MESClassLibrary.DAL.BasicInfo
//SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql, param);
#endregion
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool UpdateIsBad(string tableName, string onebarcode, string barcode)
{

24
MESClassLibrary/DAL/BasicInfo/StationDAL.cs

@ -60,5 +60,29 @@ namespace MESClassLibrary.DAL.BasicInfo
return false;
}
}
public string SearchStationNameByID(string stationID)
{
try
{
string sql = @"SELECT * FROM dbo.tb_Station s
LEFT JOIN dbo.tb_Line l
ON l.LineID = s.LineID where StationID=@StationID";
SqlParameter[] param = new SqlParameter[1];
param[0] = new SqlParameter("@StationID", SqlDbType.VarChar);
param[0].Value = stationID;
DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
if (dt.Rows.Count > 0)
{
return dt.Rows[0]["StationNo"].ToString();
}
return null;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
}
}

36
MESClassLibrary/DAL/Wms/WmsDAL.cs

@ -22,7 +22,7 @@ namespace MESClassLibrary.DAL.Injection
/// </summary>
/// <param name="barCodeTable"></param>
/// <returns></returns>
public string SaveInterface(DataTable barCodeTable,string badReason)
public string SaveInterface(DataTable barCodeTable,string badReason,string station)
{
LocalDBService local = new LocalDBService(SqlHelper.GetConnSting());
try
@ -30,8 +30,8 @@ namespace MESClassLibrary.DAL.Injection
local.BeginTrans();
foreach (DataRow dr in barCodeTable.Rows)
{
string sql = $" insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark,QaRst,Describe,BadReason)" +
$" values ('{dr["BoxNo"]}','{dr["OneBarCode"]}','{dr["BarCode"]}','','0','{dr["PartName"]}','{badReason}')";
string sql = $" insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark,QaRst,Describe,BadReason,Station)" +
$" values ('{dr["BoxNo"]}','{dr["OneBarCode"]}','{dr["BarCode"]}','','0','{dr["PartName"]}','{badReason}','{station}')";
local.Exec_NonQuery(sql);
}
local.Commit();
@ -54,11 +54,11 @@ namespace MESClassLibrary.DAL.Injection
return null;
}
public bool SaveInterface(LocalDBService local, BarCodeModel bcm,string badReason)
public bool SaveInterface(LocalDBService local, BarCodeModel bcm,string badReason,string station)
{
string sql = $" insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark,QaRst,Describe,BadReason)" +
$" values ('{bcm.BoxNo}','{bcm.OneBarCode}','{bcm.BarCode}','{bcm.Remark}','{bcm.IsBad}','{bcm.Des1}','{badReason}')";
string sql = $" insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark,QaRst,Describe,BadReason,Station)" +
$" values ('{bcm.BoxNo}','{bcm.OneBarCode}','{bcm.BarCode}','{bcm.Remark}','{bcm.IsBad}','{bcm.Des1}','{badReason}','{station}')";
return local.Exec_NonQuery(sql);
}
@ -96,20 +96,14 @@ namespace MESClassLibrary.DAL.Injection
/// <param name="oneBarCode"></param>
/// <param name="barCode"></param>
/// <returns></returns>
public bool AddRecord(LocalDBService localDB, string boxNo, string oneBarCode, string barCode,string isBad,string desc,string badReason)
public bool AddRecord(LocalDBService localDB, string boxNo, string oneBarCode, string barCode,string isBad,string desc,string badReason,string station)
{
try
{
string sql = $"insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark,QaRst,Describe,BadReason) " +
$"values ('{boxNo}','{oneBarCode}','{barCode}','','{isBad}','{desc}','{badReason}')";
string sql = $"insert into tb_Injectionn_Interface(PackageCode,OneBarCode,BarCode,Remark,QaRst,Describe,BadReason,Station) " +
$"values ('{boxNo}','{oneBarCode}','{barCode}','','{isBad}','{desc}','{badReason}','{station}')";
localDB.Exec_NonQuery(sql);
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
/// <summary>
/// 删除一条WMS中间表数据. 装箱过程中发现一条报废产品,删除.
@ -121,17 +115,9 @@ namespace MESClassLibrary.DAL.Injection
/// <returns></returns>
public bool DeleteRecord(LocalDBService localDB, string boxNo, string oneBarCode, string barCode)
{
try
{
string sql = $"delete from tb_Injectionn_Interface where PackageCode='{boxNo}' and OneBarCode='{oneBarCode}' and BarCode='{barCode}'";
localDB.Exec_NonQuery(sql);
return true;
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
/// <summary>

Loading…
Cancel
Save