Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

caosy 5 years ago
parent
commit
4fabef176c

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

@@ -123,7 +123,7 @@ namespace UAS_MES.Make
                     }
                     OperateResult.AppendText(">>" + sncode.Text + "\n", Color.Black);
                     sql.Clear();
-                    sql.Append("select max(ms_id) ms_id from makeserial where ms_beforesn = '" + sncode.Text + "'");
+                    sql.Append("select max(ms_id) ms_id from makeserial where ms_code = '" + sncode.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows[0][0].ToString() != "")
                     {

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

@@ -196,7 +196,7 @@ namespace UAS_MES.Make
                     dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_nextstepcode,ms_craftcode,ms_prodcode,nvl(ms_checkpack,0) ms_checkpack from makeserial where ms_sncode ='" + sn_code.Text + "' order by ms_id desc", "select");
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                     {
-                        if (oMsID == "" || oMsID == "null" || oMsID == "0")
+                        if (oMsID == "" || oMsID == "null" || oMsID == "0"|| (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                         {
                             oMsID = dt.Rows[0]["ms_id"].ToString();
                             oMsStatus = dt.Rows[0]["ms_status"].ToString();

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

@@ -267,7 +267,7 @@ namespace UAS_MES.Make
                     dt = (DataTable)dh.ExecuteSql("select ms_status,ms_id,ms_makecode,ms_craftcode,ms_prodcode,nvl(ms_checkpack,0) ms_checkpack from makeserial where ms_sncode ='" + sn_code.Text + "'  order by ms_id desc", "select");
                     if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || (dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                     {
-                        if (oMsID == "" || oMsID == "null" || oMsID == "0")
+                        if (oMsID == "" || oMsID == "null" || oMsID == "0"||(dt.Rows.Count > 0 && dt.Rows[0]["ms_status"].ToString() == "2"))
                         {
                             oMsID = dt.Rows[0]["ms_id"].ToString();
                             oMsStatus = dt.Rows[0]["ms_status"].ToString();

+ 32 - 1
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -556,7 +556,7 @@ namespace UAS_MES.Make
                             soncode = soncode.Replace(LoadSoncode.Rows[i][0].ToString(), "");
                         }
                     }
-                    OperatResult.AppendText(">>" + soncode.Replace("'", "") + "物料尚未备料,不允许回流\n", Color.Red);
+                    OperatResult.AppendText(">>物料" + soncode.Replace("'", "") + "尚未上料,不允许回流\n", Color.Red);
                     return;
                 }
             }
@@ -592,6 +592,37 @@ namespace UAS_MES.Make
                     //取消最近拆解部件
                     SQLS.Add("update craftmaterial set cm_lastdeco=0 where cm_sncode='" + ms_sncode.Text + "' and cm_makecode='" + ms_makecode.Text + "' and nvl(cm_lastdeco,0)<>0");           
                     dh.ExecuteSQLTran(SQLS.ToArray());
+                    //插入ERP生成追踪单
+                    try
+                    {
+                        string code = "";
+                        string[] param = new string[] { "makebadhandle", "2", code };
+                        dh.CallProcedure("SP_GETMAXNUMBER", ref param);
+                        code = param[2];
+                        //查询不良原因组数据插入,插入第一条
+                        sql.Clear();
+                        sql.Append("select mb_bgname,mb_badname,mbr_brgname from makebad left join makebadreason on mbr_mbid=mb_id where mb_sncode='" + ms_sncode.Text + "' and mb_status<>-1 and rownum=1");
+                        DataTable badinf = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                        string mb_bgname = "";
+                        string mb_badname = "";
+                        string mbr_brgname = "";
+                        if (badinf.Rows.Count > 0)
+                        {
+                            mb_bgname = badinf.Rows[0]["mb_bgname"].ToString();
+                            mb_badname = badinf.Rows[0]["mb_badname"].ToString();
+                            mbr_brgname = badinf.Rows[0]["mbr_brgname"].ToString();
+                        }
+                        sql.Clear();
+                        sql.Append("insert into makebadhandle@N_malata_zz(mbh_id,mbh_code,mbh_linecode,mbh_sn,mbh_indate,mbh_inman,mbh_statuscode,mbh_status,mbh_returnstep,mbh_wccode,mbh_badname,mbh_badgroup,mbh_badreason)");
+                        sql.Append("values(makebadhandle_seq.nextval@N_malata_zz,'" + code + "','" + User.UserLineCode + "','" + ms_sncode.Text + "',sysdate,'" + User.UserName + "',");
+                        sql.Append("'ENTERING','在录入','" + cd_stepcode.Text + "','" + User.WorkCenter + "','" + mb_badname + "','" + mb_bgname + "','" + mbr_brgname + "')");
+
+                        dh.ExecuteSql(sql.GetString(), "insert");
+                    }
+                    catch (Exception)
+                    {
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, macode, User.UserLineCode, User.UserSourceCode, "回流工序", "完成维修", ms_sncode.Text, ms_checkno.Text);
+                    }
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ms_makecode.Text, User.UserSourceCode, "回流工序", "完成维修", User.UserCode);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, macode, User.UserLineCode, User.UserSourceCode, "回流工序", "完成维修", ms_sncode.Text, ms_checkno.Text);
                     OperatResult.AppendText(">>序列号" + ms_sncode.Text + "回流成功\n", Color.Green);

+ 1 - 1
UAS-出货标签管理(标签复核)/UAS-出货标签管理(标签复核).csproj

@@ -98,7 +98,7 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Interop.LabelManager2">
-      <HintPath>..\..\..\UAS_WinForm\UAS-出货标签管理\bin\Debug\Interop.LabelManager2.dll</HintPath>
+      <HintPath>..\UAS-出货标签管理(贸易版)\obj\Debug\Interop.LabelManager2.dll</HintPath>
       <EmbedInteropTypes>False</EmbedInteropTypes>
     </Reference>
     <Reference Include="NPOI">

+ 15 - 15
UAS-出货标签管理(标签复核)/UAS_出货标签管理.Designer.cs

@@ -618,7 +618,7 @@
             // ChooseAll
             // 
             this.ChooseAll.Location = new System.Drawing.Point(4, 252);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ChooseAll.Margin = new System.Windows.Forms.Padding(2);
             this.ChooseAll.Name = "ChooseAll";
             this.ChooseAll.Size = new System.Drawing.Size(38, 22);
             this.ChooseAll.TabIndex = 84;
@@ -744,10 +744,10 @@
             this.CollectionProcess.Controls.Add(this.Installed);
             this.CollectionProcess.Controls.Add(this.Process);
             this.CollectionProcess.Location = new System.Drawing.Point(480, 10);
-            this.CollectionProcess.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CollectionProcess.Margin = new System.Windows.Forms.Padding(2);
             this.CollectionProcess.Name = "CollectionProcess";
-            this.CollectionProcess.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.CollectionProcess.Size = new System.Drawing.Size(130, 152);
+            this.CollectionProcess.Padding = new System.Windows.Forms.Padding(2);
+            this.CollectionProcess.Size = new System.Drawing.Size(171, 152);
             this.CollectionProcess.TabIndex = 80;
             this.CollectionProcess.TabStop = false;
             this.CollectionProcess.Text = " ";
@@ -756,7 +756,7 @@
             // 
             this.Capacity.AutoSize = true;
             this.Capacity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Capacity.Location = new System.Drawing.Point(63, 67);
+            this.Capacity.Location = new System.Drawing.Point(62, 66);
             this.Capacity.Name = "Capacity";
             this.Capacity.Size = new System.Drawing.Size(0, 17);
             this.Capacity.TabIndex = 75;
@@ -765,7 +765,7 @@
             // 
             this.Process_midboxcode.AutoSize = true;
             this.Process_midboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_midboxcode.Location = new System.Drawing.Point(63, 113);
+            this.Process_midboxcode.Location = new System.Drawing.Point(62, 112);
             this.Process_midboxcode.Name = "Process_midboxcode";
             this.Process_midboxcode.Size = new System.Drawing.Size(15, 17);
             this.Process_midboxcode.TabIndex = 74;
@@ -775,7 +775,7 @@
             // 
             this.Process_outboxcode.AutoSize = true;
             this.Process_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process_outboxcode.Location = new System.Drawing.Point(63, 89);
+            this.Process_outboxcode.Location = new System.Drawing.Point(62, 88);
             this.Process_outboxcode.Name = "Process_outboxcode";
             this.Process_outboxcode.Size = new System.Drawing.Size(15, 17);
             this.Process_outboxcode.TabIndex = 73;
@@ -786,7 +786,7 @@
             this.TotalCount.AutoSize = true;
             this.TotalCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.TotalCount.ForeColor = System.Drawing.Color.Blue;
-            this.TotalCount.Location = new System.Drawing.Point(97, 19);
+            this.TotalCount.Location = new System.Drawing.Point(117, 18);
             this.TotalCount.Name = "TotalCount";
             this.TotalCount.Size = new System.Drawing.Size(15, 17);
             this.TotalCount.TabIndex = 72;
@@ -796,7 +796,7 @@
             // 
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label17.Location = new System.Drawing.Point(85, 19);
+            this.label17.Location = new System.Drawing.Point(95, 18);
             this.label17.Name = "label17";
             this.label17.Size = new System.Drawing.Size(13, 17);
             this.label17.TabIndex = 71;
@@ -807,7 +807,7 @@
             this.CollectedCount.AutoSize = true;
             this.CollectedCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.CollectedCount.ForeColor = System.Drawing.Color.Red;
-            this.CollectedCount.Location = new System.Drawing.Point(67, 19);
+            this.CollectedCount.Location = new System.Drawing.Point(66, 18);
             this.CollectedCount.Name = "CollectedCount";
             this.CollectedCount.Size = new System.Drawing.Size(15, 17);
             this.CollectedCount.TabIndex = 70;
@@ -817,7 +817,7 @@
             // 
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label14.Location = new System.Drawing.Point(13, 89);
+            this.label14.Location = new System.Drawing.Point(12, 88);
             this.label14.Name = "label14";
             this.label14.Size = new System.Drawing.Size(32, 17);
             this.label14.TabIndex = 69;
@@ -827,7 +827,7 @@
             // 
             this.label11.AutoSize = true;
             this.label11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label11.Location = new System.Drawing.Point(13, 113);
+            this.label11.Location = new System.Drawing.Point(12, 112);
             this.label11.Name = "label11";
             this.label11.Size = new System.Drawing.Size(32, 17);
             this.label11.TabIndex = 68;
@@ -837,7 +837,7 @@
             // 
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label13.Location = new System.Drawing.Point(13, 49);
+            this.label13.Location = new System.Drawing.Point(12, 48);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(44, 17);
             this.label13.TabIndex = 67;
@@ -847,7 +847,7 @@
             // 
             this.Installed.AutoSize = true;
             this.Installed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Installed.Location = new System.Drawing.Point(63, 49);
+            this.Installed.Location = new System.Drawing.Point(62, 48);
             this.Installed.Name = "Installed";
             this.Installed.Size = new System.Drawing.Size(0, 17);
             this.Installed.TabIndex = 66;
@@ -856,7 +856,7 @@
             // 
             this.Process.AutoSize = true;
             this.Process.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Process.Location = new System.Drawing.Point(13, 19);
+            this.Process.Location = new System.Drawing.Point(12, 18);
             this.Process.Name = "Process";
             this.Process.Size = new System.Drawing.Size(44, 17);
             this.Process.TabIndex = 65;