浏览代码

BUG调整

callm 5 年之前
父节点
当前提交
1d471e346d
共有 2 个文件被更改,包括 14 次插入3 次删除
  1. 13 2
      UAS_MES_ODLF/FunctionCode/Query/Query_ExeProgress.cs
  2. 1 1
      UAS_MES_ODLF/PublicMethod/LogicHandler.cs

+ 13 - 2
UAS_MES_ODLF/FunctionCode/Query/Query_ExeProgress.cs

@@ -26,6 +26,7 @@ namespace UAS_MES_NEW.Query
         string checkno = "";
         //拆分后的经过的步骤
         Dictionary<int, string> Step;
+        Dictionary<int, string> StepName;
         List<Brush> PaintColor = new List<Brush>();
         //屏幕高度
         int ScreenWidth;
@@ -161,18 +162,28 @@ namespace UAS_MES_NEW.Query
                     }
                     //查询执行过的步骤
                     sql.Clear();
-                    sql.Append("select CD_DETNO,CD_STEPCODE,cd_ifoqc,ms_makecode,ms_id from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
+                    sql.Append("select CD_DETNO,CD_STEPCODE,cd_ifoqc,ms_makecode,ms_id,cd_stepname from craft left join craftdetail on cd_crid = cr_id  left join makeserial ");
                     sql.Append("on ms_craftcode=cr_code and ms_prodcode=cr_prodcode where ms_id in (" + ms_ids.ToString().Substring(0, ms_ids.ToString().Length - 1) + ") order by ms_id,cd_detno");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     Step = new Dictionary<int, string>();
+                    StepName = new Dictionary<int, string>();
                     for (int i = 0; i < dt.Rows.Count + 2; i++)
                     {
                         if (i == 0)
+                        {
                             Step.Add(i, "开始");
+                            StepName.Add(i, "开始");
+                        }
                         else if (i == dt.Rows.Count + 1)
+                        {
                             Step.Add(i, "结束");
+                            StepName.Add(i, "开始");
+                        }
                         else
+                        {
                             Step.Add(i, dt.Rows[i - 1]["CD_STEPCODE"].ToString());
+                            StepName.Add(i, dt.Rows[i - 1]["cd_stepname"].ToString());
+                        }
                     }
                     //添加中间节点
                     bool passed = true;
@@ -346,7 +357,7 @@ namespace UAS_MES_NEW.Query
                         p.EndCap = LineCap.ArrowAnchor;
                         //方块内的信息
                         Label Param = new Label();
-                        Param.Text = j + " " + Step[j];
+                        Param.Text = j + " " + StepName[j];
                         Param.Name = j + Step[j] + "_label";
                         Param.AutoSize = true;
                         Param.Margin = new Padding(0, 0, 0, 0);

+ 1 - 1
UAS_MES_ODLF/PublicMethod/LogicHandler.cs

@@ -507,7 +507,7 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 sql.Clear();
                 sql.Append("merge into makeserial using mes_package_view on (v_outboxcode='" + iOutBoxCode + "' and ms_sncode=");
-                sql.Append("v_barcode and ms_makecode=v_makecode and ms_status=2) when matched then update set ms_nextstepcode=ms_stepcode");
+                sql.Append("v_barcode and ms_makecode=v_makecode) when matched then update set ms_nextstepcode=ms_stepcode");
                 sql.Append(",ms_status=1,ms_sccode='" + iSourceCode + "' ");
             }
             ExeSQL.Add(sql.ToString());