Selaa lähdekoodia

维修作业开发,测试采集BUG修复

章政 8 vuotta sitten
vanhempi
commit
ca45e2c25a

+ 1 - 1
UAS-MES/CustomControl/RichText/RichTextAutoBottom.cs

@@ -32,13 +32,13 @@ namespace UAS_MES.CustomControl.RichText
         public void AppendText(string str, Color color)
         {
             SelectionColor = color;
+            base.AppendText(str);
             //如果颜色是红色则进行提示音
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             {
                 thread = new Thread(PlaySound);
                 thread.Start();
             }
-            base.AppendText(str);
         }
 
         private void PlaySound()

+ 6 - 6
UAS-MES/FunctionCode/Employee/Employee_Power.Designer.cs

@@ -70,7 +70,7 @@
             // 
             this.sn_module.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.sn_module.FormattingEnabled = true;
-            this.sn_module.Location = new System.Drawing.Point(491, 22);
+            this.sn_module.Location = new System.Drawing.Point(491, 20);
             this.sn_module.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.sn_module.Name = "sn_module";
             this.sn_module.Size = new System.Drawing.Size(185, 23);
@@ -91,7 +91,7 @@
             this.ug_code.Power = null;
             this.ug_code.SelectField = null;
             this.ug_code.SetValueField = null;
-            this.ug_code.Size = new System.Drawing.Size(205, 29);
+            this.ug_code.Size = new System.Drawing.Size(205, 25);
             this.ug_code.TabIndex = 236;
             this.ug_code.TableName = null;
             this.ug_code.Tag = "ug_code";
@@ -106,7 +106,7 @@
             this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
             this.Screen.IsShowBorder = true;
             this.Screen.Location = new System.Drawing.Point(707, 19);
-            this.Screen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Screen.Margin = new System.Windows.Forms.Padding(4);
             this.Screen.MoveImage = ((System.Drawing.Image)(resources.GetObject("Screen.MoveImage")));
             this.Screen.Name = "Screen";
             this.Screen.NormalImage = ((System.Drawing.Image)(resources.GetObject("Screen.NormalImage")));
@@ -126,7 +126,7 @@
             this.SavePower.Image = ((System.Drawing.Image)(resources.GetObject("SavePower.Image")));
             this.SavePower.IsShowBorder = true;
             this.SavePower.Location = new System.Drawing.Point(535, 598);
-            this.SavePower.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.SavePower.Margin = new System.Windows.Forms.Padding(4);
             this.SavePower.MoveImage = ((System.Drawing.Image)(resources.GetObject("SavePower.MoveImage")));
             this.SavePower.Name = "SavePower";
             this.SavePower.NormalImage = ((System.Drawing.Image)(resources.GetObject("SavePower.NormalImage")));
@@ -150,7 +150,7 @@
             this.Column1,
             this.Column2});
             this.GroupPowerDGV.Location = new System.Drawing.Point(4, 88);
-            this.GroupPowerDGV.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.GroupPowerDGV.Margin = new System.Windows.Forms.Padding(4);
             this.GroupPowerDGV.Name = "GroupPowerDGV";
             this.GroupPowerDGV.RowTemplate.Height = 23;
             this.GroupPowerDGV.Size = new System.Drawing.Size(1140, 500);
@@ -207,7 +207,7 @@
             this.Controls.Add(this.SavePower);
             this.Controls.Add(this.GroupPowerDGV);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Employee_Power";
             this.Tag = "Employee!Power";
             this.Text = "权限控制";

+ 0 - 2
UAS-MES/FunctionCode/Employee/Employee_Power.cs

@@ -79,9 +79,7 @@ namespace UAS_MES.Employee
             }
             //如果页面加载的时候通过传参的构造函数
             if (ug_code.Text != "")
-            {
                 Screen.PerformClick();
-            }
             asc.controllInitializeSize(this);
         }
 

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CheckNoRelpace.cs

@@ -61,7 +61,7 @@ namespace UAS_MES.Make
                     }
                     //记录MakeProcess和一般的操作日志
                     LogicHandler.InsertMessageLog(User.UserName, "变更序列号,备注:" + ReplaceReason.Text, "变更成功", "MakeSerial|ms_sncode=" + new_sncode.Text, "");
-                    LogicHandler.InsertMakeProcess(new_sncode.Text, dh.getFieldDataByCondition("MakeSerial", "ms_makecode", "ms_sncode='" + new_sncode.Text + "'").ToString(), "变更序列号成功,备注:" + ReplaceReason.Text, User.UserName);
+                    LogicHandler.InsertMakeProcess(new_sncode.Text, dh.getFieldDataByCondition("MakeSerial", "ms_makecode", "ms_sncode='" + new_sncode.Text + "'").ToString(),"序列号转换操作", "变更序列号成功,备注:" + ReplaceReason.Text, User.UserName);
                     OperateResult.AppendText(">>序列号" + old_sncode.Text + "已成功替换为" + new_sncode.Text + "\n", Color.Green);
                 }
                 else

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -357,7 +357,7 @@ namespace UAS_MES.Make
                             string cm_stepcode = dt.Rows[0]["cm_stepcode"].ToString();
                             string cm_mccode = dt.Rows[0]["cm_mccode"].ToString();
                             dh.ExecuteSql("delete from Craftmaterial where cm_id=" + cm_id, "delete");
-                            LogicHandler.InsertMakeProcess(ms_macode, sn_code.Text, "下料成功", User.UserName);
+                            LogicHandler.InsertMakeProcess(ms_macode, sn_code.Text,"上料采集操作" ,"下料成功", User.UserName);
                             int count = dh.getRowCount("craftMaterial", "cm_mccode='" + cm_mccode + "' and cm_stepcode='" + cm_stepcode + "' and cm_sncode='" + sn_code.Text + "'");
                             if (count == 0)
                                 dh.UpdateByCondition("makecraftdetail ", "mcd_inqty=mcd_inqty-1,mcd_outqty=mcd_outqty-1,mcd_okqty = mcd_okqty - 1", "mcd_mccode='" + cm_mccode + "' and mcd_stepcode='" + cm_stepcode + "'");

+ 10 - 4
UAS-MES/FunctionCode/Make/Make_NewBadCode.cs

@@ -93,7 +93,8 @@ namespace UAS_MES.Make
                             break;
                         }
                     }
-                    if (!AddToReject) {
+                    if (!AddToReject)
+                    {
                         ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
                         WaitRejectList.Items[i].Remove();
                         CheckedNum++;
@@ -157,6 +158,7 @@ namespace UAS_MES.Make
             string[] bccode = new string[RejectCount];
             string[] bcremark = new string[RejectCount];
             string[] bgcode = new string[RejectCount];
+            string[] id = new string[RejectCount];
             string ErrorMessage = "";
             if (ChoosedRejectList.Items.Count == 0)
                 MessageBox.Show("不良品必须选择不良原因和不良代码!");
@@ -170,15 +172,19 @@ namespace UAS_MES.Make
                     bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
                     //获取所有的不良备注
                     bcremark[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                    id[i] = dh.GetSEQ("MakeBad_seq");
                 }
             }
             sql.Clear();
-            sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,");
+            sql.Append("insert when (not exists(select 1 from makebad where mb_sncode='" + sncode + "' and mb_badcode=:bc_code)) then ");
+            sql.Append("into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,");
             sql.Append("mb_indate,mb_stepcode,mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_soncode,mb_status,mb_badremark)");
-            sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
+            sql.Append("select :id,ma_code,ms_code,ms_sncode,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "',ms_sourcecode,:bc_code,:bg_code,'',");
             sql.Append("sp_soncode,'0',:bc_remark from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
             sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + sncode + "'");
-            dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code", "bc_remark" }, bgcode, bccode, bcremark);
+            dh.BatchInsert(sql.GetString(), new string[] { "bg_code","id", "bg_code", "bc_code", "bc_remark" }, bgcode, id, bgcode, bccode, bcremark);
+            MessageBox.Show("保存成功");
+            Close();
         }
 
         private void badgroup_SelectedIndexChanged(object sender, EventArgs e)

+ 16 - 16
UAS-MES/FunctionCode/Make/Make_PalletWeigh.Designer.cs

@@ -116,7 +116,7 @@
             this.AutoPrint.AutoSize = true;
             this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.AutoPrint.Location = new System.Drawing.Point(1057, 204);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
             this.AutoPrint.Name = "AutoPrint";
             this.AutoPrint.Size = new System.Drawing.Size(154, 31);
             this.AutoPrint.TabIndex = 153;
@@ -197,7 +197,7 @@
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1196, 651);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -212,7 +212,7 @@
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperateResult.Location = new System.Drawing.Point(1059, 479);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(353, 162);
             this.OperateResult.TabIndex = 167;
@@ -224,7 +224,7 @@
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
             this.outboxcode.Location = new System.Drawing.Point(1156, 420);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifwrite";
             this.outboxcode.Size = new System.Drawing.Size(213, 25);
@@ -241,7 +241,7 @@
             this.palletcode.BackColor = System.Drawing.Color.White;
             this.palletcode.ID = null;
             this.palletcode.Location = new System.Drawing.Point(1156, 365);
-            this.palletcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.palletcode.Margin = new System.Windows.Forms.Padding(4);
             this.palletcode.Name = "palletcode";
             this.palletcode.Power = "ifwrite";
             this.palletcode.Size = new System.Drawing.Size(213, 25);
@@ -260,7 +260,7 @@
             this.SearchPallet.Image = ((System.Drawing.Image)(resources.GetObject("SearchPallet.Image")));
             this.SearchPallet.IsShowBorder = true;
             this.SearchPallet.Location = new System.Drawing.Point(1260, 308);
-            this.SearchPallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.SearchPallet.Margin = new System.Windows.Forms.Padding(4);
             this.SearchPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("SearchPallet.MoveImage")));
             this.SearchPallet.Name = "SearchPallet";
             this.SearchPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("SearchPallet.NormalImage")));
@@ -279,7 +279,7 @@
             this.Print.Image = ((System.Drawing.Image)(resources.GetObject("Print.Image")));
             this.Print.IsShowBorder = true;
             this.Print.Location = new System.Drawing.Point(1112, 308);
-            this.Print.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Print.Margin = new System.Windows.Forms.Padding(4);
             this.Print.MoveImage = ((System.Drawing.Image)(resources.GetObject("Print.MoveImage")));
             this.Print.Name = "Print";
             this.Print.NormalImage = ((System.Drawing.Image)(resources.GetObject("Print.NormalImage")));
@@ -298,7 +298,7 @@
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
             this.ReleasePallet.Location = new System.Drawing.Point(1260, 246);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
@@ -317,7 +317,7 @@
             this.NewPallet.Image = ((System.Drawing.Image)(resources.GetObject("NewPallet.Image")));
             this.NewPallet.IsShowBorder = true;
             this.NewPallet.Location = new System.Drawing.Point(1112, 246);
-            this.NewPallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.NewPallet.Margin = new System.Windows.Forms.Padding(4);
             this.NewPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.MoveImage")));
             this.NewPallet.Name = "NewPallet";
             this.NewPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.NormalImage")));
@@ -350,7 +350,7 @@
             this.Column4,
             this.Column5});
             this.PackageInf.Location = new System.Drawing.Point(4, 162);
-            this.PackageInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(4);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
             this.PackageInf.Size = new System.Drawing.Size(1027, 519);
@@ -397,10 +397,10 @@
             this.pa_restqty.BackColor = System.Drawing.Color.White;
             this.pa_restqty.ID = null;
             this.pa_restqty.Location = new System.Drawing.Point(1125, 166);
-            this.pa_restqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pa_restqty.Margin = new System.Windows.Forms.Padding(4);
             this.pa_restqty.Name = "pa_restqty";
             this.pa_restqty.Power = null;
-            this.pa_restqty.Size = new System.Drawing.Size(213, 25);
+            this.pa_restqty.Size = new System.Drawing.Size(195, 25);
             this.pa_restqty.Str = null;
             this.pa_restqty.Str1 = null;
             this.pa_restqty.Str2 = null;
@@ -454,7 +454,7 @@
             // PrinterList
             // 
             this.PrinterList.Location = new System.Drawing.Point(769, 98);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(195, 25);
             this.PrinterList.TabIndex = 171;
@@ -491,7 +491,7 @@
             this.PrinterList_label.TabIndex = 173;
             this.PrinterList_label.Text = "打印机列表";
             // 
-            // 栈板称重
+            // Make_PalletWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -527,8 +527,8 @@
             this.Controls.Add(this.pa_outboxcode);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.Name = "栈板称重";
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Make_PalletWeigh";
             this.Tag = "Make!PalletWeigh";
             this.Text = "栈板称重";
             this.Load += new System.EventHandler(this.栈板称重_Load);

+ 0 - 15
UAS-MES/FunctionCode/Make/Make_PalletWeigh.resx

@@ -788,19 +788,4 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 7 - 6
UAS-MES/FunctionCode/Make/Make_Repair.Designer.cs

@@ -405,6 +405,7 @@
             // RefreshTreeView
             // 
             this.RefreshTreeView.AllPower = null;
+            this.RefreshTreeView.Cursor = System.Windows.Forms.Cursors.Hand;
             this.RefreshTreeView.Image = global::UAS_MES.Properties.Resources.refresh;
             this.RefreshTreeView.Location = new System.Drawing.Point(112, 158);
             this.RefreshTreeView.Name = "RefreshTreeView";
@@ -440,13 +441,13 @@
             this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
             this.NewRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.Image")));
             this.NewRepairInf.IsShowBorder = true;
-            this.NewRepairInf.Location = new System.Drawing.Point(390, 631);
+            this.NewRepairInf.Location = new System.Drawing.Point(391, 631);
             this.NewRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
             this.NewRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.NormalImage")));
             this.NewRepairInf.Power = null;
-            this.NewRepairInf.Size = new System.Drawing.Size(111, 30);
+            this.NewRepairInf.Size = new System.Drawing.Size(130, 30);
             this.NewRepairInf.TabIndex = 112;
             this.NewRepairInf.Tag = "IfWrite";
             this.NewRepairInf.Text = "新增维修信息";
@@ -460,13 +461,13 @@
             this.SaveRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.DownImage")));
             this.SaveRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.Image")));
             this.SaveRepairInf.IsShowBorder = true;
-            this.SaveRepairInf.Location = new System.Drawing.Point(530, 631);
+            this.SaveRepairInf.Location = new System.Drawing.Point(535, 631);
             this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
             this.SaveRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.NormalImage")));
             this.SaveRepairInf.Power = null;
-            this.SaveRepairInf.Size = new System.Drawing.Size(111, 30);
+            this.SaveRepairInf.Size = new System.Drawing.Size(130, 30);
             this.SaveRepairInf.TabIndex = 111;
             this.SaveRepairInf.Tag = "IfWrite";
             this.SaveRepairInf.Text = "保存维修信息";
@@ -480,7 +481,7 @@
             this.DeleteRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.DownImage")));
             this.DeleteRepairInf.Image = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.Image")));
             this.DeleteRepairInf.IsShowBorder = true;
-            this.DeleteRepairInf.Location = new System.Drawing.Point(676, 631);
+            this.DeleteRepairInf.Location = new System.Drawing.Point(700, 631);
             this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(4);
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.Name = "DeleteRepairInf";
@@ -823,7 +824,7 @@
             this.NewBadCode.Name = "NewBadCode";
             this.NewBadCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.NormalImage")));
             this.NewBadCode.Power = null;
-            this.NewBadCode.Size = new System.Drawing.Size(111, 30);
+            this.NewBadCode.Size = new System.Drawing.Size(130, 30);
             this.NewBadCode.TabIndex = 60;
             this.NewBadCode.Tag = "IfWrite";
             this.NewBadCode.Text = "新增不良代码";

+ 14 - 9
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -86,7 +86,6 @@ namespace UAS_MES.Make
                 //验证工序是否正确
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
-                    string macode = "";
                     BadInf_1.Clear();
                     if (LogicHandler.GetMakeInfo(GetSNCode.Text, out macode, out ErrorMessage))
                     {
@@ -97,7 +96,7 @@ namespace UAS_MES.Make
                         sql.Append("where sn='" + GetSNCode.Text + "'))");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dt.Rows.Count > 0)
-                            LoadBadInfTree();
+                            LoadBadInfTree(sender, e);
                         else
                             OperatResult.AppendText(">>序列号" + GetSNCode.Text + "不存在\n", Color.Red);
                     }
@@ -139,9 +138,8 @@ namespace UAS_MES.Make
             }
         }
 
-        private void LoadBadInfTree()
+        private void LoadBadInfTree(object sender, EventArgs e)
         {
-
             BadCodeTree.Nodes.Clear();
             sql.Clear();
             sql.Append("select mb_id,mb_sncode,mb_badcode,mb_bgcode,bc_name,bg_name,");
@@ -164,7 +162,8 @@ namespace UAS_MES.Make
                 dic.Add("bc_name", dt.Rows[i]["bc_name"].ToString());
                 dic.Add("bg_name", dt.Rows[i]["bg_name"].ToString());
                 dic.Add("mb_badremark", dt.Rows[i]["mb_badremark"].ToString());
-                BadInf_1.Add(tnode_0.Tag.ToString(), dic);
+                if (!BadInf_1.ContainsKey(tnode_0.Tag.ToString()))
+                    BadInf_1.Add(tnode_0.Tag.ToString(), dic);
                 BadCodeTree.Nodes.Add(tnode_0);
                 //添加子节点
                 sql.Clear();
@@ -190,7 +189,8 @@ namespace UAS_MES.Make
                     dic1.Add("nrg_name", dt1.Rows[j]["nrg_name"].ToString());
                     dic1.Add("nr_name", dt1.Rows[j]["nr_name"].ToString());
                     tnode_1.Text = dt1.Rows[j]["mbr_brgcode"].ToString();
-                    BadInf_2.Add(mbr_id, dic1);
+                    if (!BadInf_2.ContainsKey(mbr_id))
+                        BadInf_2.Add(mbr_id, dic1);
                     tnode_0.Nodes.Add(tnode_1);
                 }
             }
@@ -198,7 +198,7 @@ namespace UAS_MES.Make
 
         private void RefreshTreeView_Click(object sender, EventArgs e)
         {
-
+            LoadBadInfTree(sender, e);
         }
 
         private void RepairComplete_Click(object sender, EventArgs e)
@@ -213,12 +213,17 @@ namespace UAS_MES.Make
 
         private void NewBadCode_Click(object sender, EventArgs e)
         {
-
+            Make_NewBadCode badcode = new Make_NewBadCode(GetSNCode.Text, macode);
+            badcode.FormClosed += LoadBadInfTree;
+            BaseUtil.SetFormCenter(badcode);
+            badcode.ShowDialog();
         }
 
         private void NewRepairInf_Click(object sender, EventArgs e)
         {
-
+            Make_NewMatainInf mataininf = new Make_NewMatainInf();
+            BaseUtil.SetFormCenter(mataininf);
+            mataininf.ShowDialog();
         }
 
         private void SaveRepairInf_Click(object sender, EventArgs e)

+ 27 - 27
UAS-MES/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -104,7 +104,7 @@
             // 
             this.bc_remark_label.AutoSize = true;
             this.bc_remark_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_remark_label.Location = new System.Drawing.Point(447, 214);
+            this.bc_remark_label.Location = new System.Drawing.Point(447, 206);
             this.bc_remark_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_remark_label.Name = "bc_remark_label";
             this.bc_remark_label.Size = new System.Drawing.Size(92, 27);
@@ -115,7 +115,7 @@
             // 
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(308, 661);
+            this.ms_sncode_label.Location = new System.Drawing.Point(308, 653);
             this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(72, 27);
@@ -126,7 +126,7 @@
             // 
             this.bc_groupcode_label.AutoSize = true;
             this.bc_groupcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.bc_groupcode_label.Location = new System.Drawing.Point(27, 211);
+            this.bc_groupcode_label.Location = new System.Drawing.Point(27, 203);
             this.bc_groupcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.bc_groupcode_label.Name = "bc_groupcode_label";
             this.bc_groupcode_label.Size = new System.Drawing.Size(92, 27);
@@ -138,7 +138,7 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Blue;
-            this.label2.Location = new System.Drawing.Point(26, 162);
+            this.label2.Location = new System.Drawing.Point(26, 154);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(92, 27);
@@ -149,7 +149,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(27, 261);
+            this.label3.Location = new System.Drawing.Point(27, 253);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(92, 27);
@@ -161,7 +161,7 @@
             this.GoodProduct.AutoSize = true;
             this.GoodProduct.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.GoodProduct.ForeColor = System.Drawing.Color.Blue;
-            this.GoodProduct.Location = new System.Drawing.Point(31, 655);
+            this.GoodProduct.Location = new System.Drawing.Point(31, 647);
             this.GoodProduct.Margin = new System.Windows.Forms.Padding(4);
             this.GoodProduct.Name = "GoodProduct";
             this.GoodProduct.Size = new System.Drawing.Size(83, 35);
@@ -175,7 +175,7 @@
             this.Reject.AutoSize = true;
             this.Reject.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Reject.ForeColor = System.Drawing.Color.Red;
-            this.Reject.Location = new System.Drawing.Point(141, 655);
+            this.Reject.Location = new System.Drawing.Point(141, 647);
             this.Reject.Margin = new System.Windows.Forms.Padding(4);
             this.Reject.Name = "Reject";
             this.Reject.Size = new System.Drawing.Size(107, 35);
@@ -192,7 +192,7 @@
             this.columnHeader4,
             this.columnHeader1,
             this.columnHeader2});
-            this.WaitRejectList.Location = new System.Drawing.Point(29, 337);
+            this.WaitRejectList.Location = new System.Drawing.Point(29, 329);
             this.WaitRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.WaitRejectList.Name = "WaitRejectList";
             this.WaitRejectList.Size = new System.Drawing.Size(393, 304);
@@ -227,7 +227,7 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(27, 306);
+            this.label4.Location = new System.Drawing.Point(27, 298);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(92, 27);
@@ -238,7 +238,7 @@
             // 
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label5.Location = new System.Drawing.Point(542, 306);
+            this.label5.Location = new System.Drawing.Point(542, 298);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(92, 27);
@@ -249,7 +249,7 @@
             // 
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label6.Location = new System.Drawing.Point(946, 180);
+            this.label6.Location = new System.Drawing.Point(946, 172);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(92, 27);
@@ -264,7 +264,7 @@
             this.columnHeader3,
             this.columnHeader7,
             this.columnHeader8});
-            this.ChoosedRejectList.Location = new System.Drawing.Point(544, 337);
+            this.ChoosedRejectList.Location = new System.Drawing.Point(544, 329);
             this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(4);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
             this.ChoosedRejectList.Size = new System.Drawing.Size(393, 304);
@@ -299,7 +299,7 @@
             // 
             this.AutoBadCode.AutoSize = true;
             this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoBadCode.Location = new System.Drawing.Point(126, 309);
+            this.AutoBadCode.Location = new System.Drawing.Point(126, 301);
             this.AutoBadCode.Name = "AutoBadCode";
             this.AutoBadCode.Size = new System.Drawing.Size(151, 24);
             this.AutoBadCode.TabIndex = 69;
@@ -354,7 +354,7 @@
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(435, 109);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(438, 109);
             this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Size = new System.Drawing.Size(92, 27);
@@ -378,7 +378,7 @@
             this.bc_code.BackColor = System.Drawing.Color.White;
             this.bc_code.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_code.ID = null;
-            this.bc_code.Location = new System.Drawing.Point(159, 261);
+            this.bc_code.Location = new System.Drawing.Point(159, 253);
             this.bc_code.Margin = new System.Windows.Forms.Padding(4);
             this.bc_code.Name = "bc_code";
             this.bc_code.Power = null;
@@ -396,13 +396,13 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(143, 59);
+            this.ma_code.Location = new System.Drawing.Point(147, 59);
             this.ma_code.Margin = new System.Windows.Forms.Padding(4);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(204, 25);
+            this.ma_code.Size = new System.Drawing.Size(196, 25);
             this.ma_code.TabIndex = 67;
             this.ma_code.TableName = null;
             this.ma_code.Tag = "ma_code";
@@ -454,7 +454,7 @@
             // 
             this.mcd_inqty.AutoSize = true;
             this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(567, 109);
+            this.mcd_inqty.Location = new System.Drawing.Point(561, 109);
             this.mcd_inqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.mcd_inqty.Name = "mcd_inqty";
             this.mcd_inqty.Size = new System.Drawing.Size(0, 27);
@@ -465,7 +465,7 @@
             // 
             this.ma_prodcode.AutoSize = true;
             this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_prodcode.Location = new System.Drawing.Point(567, 59);
+            this.ma_prodcode.Location = new System.Drawing.Point(561, 59);
             this.ma_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ma_prodcode.Name = "ma_prodcode";
             this.ma_prodcode.Size = new System.Drawing.Size(0, 27);
@@ -474,7 +474,7 @@
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(951, 211);
+            this.OperateResult.Location = new System.Drawing.Point(951, 203);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
             this.OperateResult.Size = new System.Drawing.Size(275, 430);
@@ -488,7 +488,7 @@
             this.CleanInfo.DownImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.DownImage")));
             this.CleanInfo.Image = ((System.Drawing.Image)(resources.GetObject("CleanInfo.Image")));
             this.CleanInfo.IsShowBorder = true;
-            this.CleanInfo.Location = new System.Drawing.Point(1046, 656);
+            this.CleanInfo.Location = new System.Drawing.Point(1046, 648);
             this.CleanInfo.Margin = new System.Windows.Forms.Padding(4);
             this.CleanInfo.MoveImage = ((System.Drawing.Image)(resources.GetObject("CleanInfo.MoveImage")));
             this.CleanInfo.Name = "CleanInfo";
@@ -503,7 +503,7 @@
             // ChooseedReject
             // 
             this.ChooseedReject.Image = ((System.Drawing.Image)(resources.GetObject("ChooseedReject.Image")));
-            this.ChooseedReject.Location = new System.Drawing.Point(452, 546);
+            this.ChooseedReject.Location = new System.Drawing.Point(452, 538);
             this.ChooseedReject.Margin = new System.Windows.Forms.Padding(4);
             this.ChooseedReject.Name = "ChooseedReject";
             this.ChooseedReject.Size = new System.Drawing.Size(67, 29);
@@ -514,7 +514,7 @@
             // WaitReject
             // 
             this.WaitReject.Image = ((System.Drawing.Image)(resources.GetObject("WaitReject.Image")));
-            this.WaitReject.Location = new System.Drawing.Point(452, 466);
+            this.WaitReject.Location = new System.Drawing.Point(452, 458);
             this.WaitReject.Margin = new System.Windows.Forms.Padding(4);
             this.WaitReject.Name = "WaitReject";
             this.WaitReject.Size = new System.Drawing.Size(67, 29);
@@ -527,7 +527,7 @@
             this.bc_remark.AllPower = null;
             this.bc_remark.BackColor = System.Drawing.Color.White;
             this.bc_remark.ID = null;
-            this.bc_remark.Location = new System.Drawing.Point(547, 212);
+            this.bc_remark.Location = new System.Drawing.Point(547, 204);
             this.bc_remark.Margin = new System.Windows.Forms.Padding(4);
             this.bc_remark.Multiline = true;
             this.bc_remark.Name = "bc_remark";
@@ -542,7 +542,7 @@
             // 
             this.bc_groupcode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.bc_groupcode.FormattingEnabled = true;
-            this.bc_groupcode.Location = new System.Drawing.Point(159, 215);
+            this.bc_groupcode.Location = new System.Drawing.Point(159, 207);
             this.bc_groupcode.Margin = new System.Windows.Forms.Padding(4);
             this.bc_groupcode.Name = "bc_groupcode";
             this.bc_groupcode.Size = new System.Drawing.Size(251, 26);
@@ -555,7 +555,7 @@
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(423, 661);
+            this.ms_sncode.Location = new System.Drawing.Point(423, 653);
             this.ms_sncode.Margin = new System.Windows.Forms.Padding(4);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
@@ -574,7 +574,7 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(705, 656);
+            this.Save.Location = new System.Drawing.Point(705, 648);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));

+ 45 - 13
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -95,21 +95,49 @@ namespace UAS_MES.Make
         private void ChooseedReject_Click(object sender, EventArgs e)
         {
             int CheckedNum = 0;
+            //是否已经添加到不良
+            bool AddToReject = false;
             for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
             {
                 if (WaitRejectList.Items[i].Checked)
                 {
-                    ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
-                    WaitRejectList.Items[i].Remove();
-                    CheckedNum++;
+                    AddToReject = false;
+                    for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                    {
+                        if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                        {
+                            AddToReject = true;
+                            break;
+                        }
+                    }
+                    //未添加则进行添加
+                    if (!AddToReject)
+                    {
+                        ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                        WaitRejectList.Items[i].Remove();
+                        CheckedNum++;
+                    }
                 }
             }
             if (CheckedNum == 0)
             {
                 for (int i = WaitRejectList.Items.Count - 1; i >= 0; i--)
                 {
-                    ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
-                    WaitRejectList.Items[i].Remove();
+                    AddToReject = false;
+                    for (int j = 0; j < ChoosedRejectList.Items.Count; j++)
+                    {
+                        if ((ChoosedRejectList.Items[j].SubItems[2].Text == WaitRejectList.Items[i].SubItems[2].Text))
+                        {
+                            AddToReject = true;
+                            break;
+                        }
+                    }
+                    if (!AddToReject)
+                    {
+                        ChoosedRejectList.Items.Add((ListViewItem)WaitRejectList.Items[i].Clone());
+                        WaitRejectList.Items[i].Remove();
+                        CheckedNum++;
+                    }
                 }
             }
         }
@@ -166,11 +194,20 @@ namespace UAS_MES.Make
             //如果ms_makecode的值修改过再去查询
             sql.Clear();
             sql.Append("select pb_badgroup from make left join product on pr_code=ma_prodcode left join ");
-            sql.Append("productkind on pk_name=pr_kind left join productbadgroup on pk_code=PB_KINDCODE where ma_code='" + ma_code.Text + "'");
-            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            if (dt.Rows.Count > 0)
+            sql.Append("productkind on pk_name=pr_kind left join productbadgroup on pk_code=PB_KINDCODE where ma_code='" + ma_code.Text + "' and pb_badgroup is not null");
+            DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count == 0)
             {
+                sql.Clear();
+                sql.Append("select bg_code from badgroup");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                bc_groupcode.DataSource = dt;
+                bc_groupcode.DisplayMember = "bg_code";
+                bc_groupcode.ValueMember = "bg_code";
                 //设置Combox的下拉值
+            }
+            else
+            {
                 bc_groupcode.DataSource = dt;
                 bc_groupcode.DisplayMember = "pb_badgroup";
                 bc_groupcode.ValueMember = "pb_badgroup";
@@ -185,11 +222,6 @@ namespace UAS_MES.Make
             sql.Clear();
             sql.Append("select bg_code,bc_name,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bc_groupcode='" + bc_groupcode.Text + "' and bg_code is not null");
             dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-            //如果未获取到不良代码则去除限制条件获取全部的
-            if (dt.Rows.Count == 0)
-            {
-                dt = (DataTable)dh.ExecuteSql("select bg_code,bc_name,bc_note from badcode left join badgroup on bc_groupcode=bg_code where bg_code is not null", "select");
-            }
             //往listview中添加数据
             WaitRejectList.Items.Clear();
             WaitRejectList.BeginUpdate();

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -300,7 +300,7 @@ namespace UAS_MES.OQC
                     string ErrorMessage = "";
                     LogicHandler.UpdateMakeMessage(ms_sncode.Text, ob_makecode.Text, User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
                     //记录操作日志
-                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, Operate, User.UserName);
+                    LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, "批结果判定", Operate, User.UserName);
                 }
             }
         }

+ 8 - 5
UAS-MES/PublicMethod/LogicHandler.cs

@@ -926,15 +926,18 @@ namespace UAS_MES.PublicMethod
         /// <summary>
         /// 记录操作日志
         /// </summary>
-        /// <param name="iMakeCode"></param>
         /// <param name="iSnCode"></param>
-        public static void InsertMakeProcess(string iSnCode, string iMakeCode, string result, string iUserName)
+        /// <param name="iMakeCode"></param>
+        /// <param name="iMaKind"></param>
+        /// <param name="result"></param>
+        /// <param name="iUserName"></param>
+        public static void InsertMakeProcess(string iSnCode, string iMakeCode, string iMaKind, string result, string iUserName)
         {
             sql.Clear();
             sql.Append("insert into MakeProcess(mp_id,mp_makecode,mp_maid, mp_mscode,mp_sncode,mp_stepcode,mp_stepname,");
             sql.Append("mp_craftcode,mp_craftname,mp_kind,mp_result,mp_indate,mp_inman,mp_wccode,mp_linecode,mp_sourcecode) ");
             sql.Append("select MakeProcess_seq.nextval, ma_code,ma_id,ms_code,ms_sncode,mcd_stepcode,mcd_stepname,");
-            sql.Append("ma_craftcode,ma_craftname,ma_kind,'" + result + "',sysdate,'" + iUserName + "',ma_wccode,ma_linecode,''");
+            sql.Append("ma_craftcode,ma_craftname,'" + iMaKind + "','" + result + "',sysdate,'" + iUserName + "',ma_wccode,ma_linecode,''");
             sql.Append("from make left join makecraftdetail on mcd_macode=ma_code left join makeserial on ms_makecode=ma_code ");
             sql.Append("where ms_sncode='" + iSnCode + "' and ma_code='" + iMakeCode + "'");
             //插入makeprocess 
@@ -1097,7 +1100,7 @@ namespace UAS_MES.PublicMethod
             //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
             dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep ||'," + StepCode + "'", "ms_sncode='" + iSnCode + "'");
             //记录操作日志
-            InsertMakeProcess(iSnCode, iMakeCode, iResult, iUserName);
+            InsertMakeProcess(iSnCode, iMakeCode, "测试采集", iResult, iUserName);
             //判断当前采集点是否为扣料工序cd_ifreduce =-1 则为扣料工序
             SetStepFinish(iMakeCode, iSourceCode, iSnCode, iUserName, out oErrorMessage);
             //SetCollectionFinish(iSnCode, iMakeCode, iUserName, iSourceCode, out oErrorMessage);
@@ -1276,7 +1279,7 @@ namespace UAS_MES.PublicMethod
                     string cm_stepcode = dt.Rows[0]["cm_stepcode"].ToString();
                     string cm_mccode = dt.Rows[0]["cm_mccode"].ToString();
                     dh.ExecuteSql("delete from Craftmaterial where cm_id=" + cm_id, "delete");
-                    InsertMakeProcess(ms_macode, iSnCode, "下料成功", iUserName);
+                    InsertMakeProcess(ms_macode, iSnCode, "下料操作", "下料成功", iUserName);
                     int count = dh.getRowCount("craftMaterial", "cm_mccode='" + cm_mccode + "' and cm_stepcode='" + cm_stepcode + "' and cm_sncode='" + iSnCode + "'");
                     if (count == 0)
                         dh.UpdateByCondition("makecraftdetail ", "mcd_inqty=mcd_inqty-1,mcd_outqty=mcd_outqty-1,mcd_okqty = mcd_okqty - 1", "mcd_mccode='" + cm_mccode + "' and mcd_stepcode='" + cm_stepcode + "'");

+ 36 - 8
UAS-MES/UAS-MES.csproj

@@ -12,7 +12,7 @@
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <IsWebBootstrapper>true</IsWebBootstrapper>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
     <TargetFrameworkProfile />
     <SccProjectName>
     </SccProjectName>
@@ -22,26 +22,25 @@
     </SccAuxPath>
     <SccProvider>
     </SccProvider>
-    <PublishUrl>ftp://192.168.253.9/MESSetting/</PublishUrl>
+    <PublishUrl>F:\MESRelease\</PublishUrl>
     <Install>true</Install>
-    <InstallFrom>Web</InstallFrom>
+    <InstallFrom>Disk</InstallFrom>
     <UpdateEnabled>true</UpdateEnabled>
     <UpdateMode>Foreground</UpdateMode>
     <UpdateInterval>7</UpdateInterval>
     <UpdateIntervalUnits>Days</UpdateIntervalUnits>
     <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>true</UpdateRequired>
+    <UpdateRequired>false</UpdateRequired>
     <MapFileExtensions>true</MapFileExtensions>
-    <InstallUrl>http://218.17.158.219:8888/</InstallUrl>
+    <UpdateUrl>http://218.17.158.219:8888/publish.htm/</UpdateUrl>
     <TargetCulture>zh</TargetCulture>
     <ProductName>优软MES系统</ProductName>
     <PublisherName>深圳市优软科技有限公司</PublisherName>
     <SuiteName>优软MES系统</SuiteName>
     <MinimumRequiredVersion>1.0.0.59</MinimumRequiredVersion>
-    <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>196</ApplicationRevision>
-    <ApplicationRevision>181</ApplicationRevision>
+    <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
+    <ApplicationRevision>191</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>
@@ -91,6 +90,17 @@
   <PropertyGroup>
     <ApplicationIcon>Resources\U_Icon.ico</ApplicationIcon>
   </PropertyGroup>
+  <PropertyGroup />
+  <PropertyGroup>
+    <Win32Resource>
+    </Win32Resource>
+  </PropertyGroup>
+  <PropertyGroup />
+  <PropertyGroup />
+  <PropertyGroup />
+  <PropertyGroup>
+    <NoWin32Manifest>true</NoWin32Manifest>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="DevComponents.DotNetBar2">
       <HintPath>Tool\DevComponents.DotNetBar2.dll</HintPath>
@@ -382,6 +392,18 @@
     <Compile Include="Form1.Designer.cs">
       <DependentUpon>Form1.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_NewBadCode.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_NewBadCode.Designer.cs">
+      <DependentUpon>Make_NewBadCode.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_NewMatainInf.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_NewMatainInf.Designer.cs">
+      <DependentUpon>Make_NewMatainInf.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Special\Special_MendLabel.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -819,6 +841,12 @@
     <EmbeddedResource Include="Form1.resx">
       <DependentUpon>Form1.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_NewBadCode.resx">
+      <DependentUpon>Make_NewBadCode.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_NewMatainInf.resx">
+      <DependentUpon>Make_NewMatainInf.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Special\Special_MendLabel.resx">
       <DependentUpon>Special_MendLabel.cs</DependentUpon>
     </EmbeddedResource>