2 İşlemeler fa407f3bf1 ... 0301d77505

Yazar SHA1 Mesaj Tarih
  callm 0301d77505 四码核对界面添加 1 hafta önce
  callm c8ba8c2b06 工单切换,维修BUG修改 1 hafta önce

+ 0 - 10
UAS_MES_HYSX/FunctionCode/Make/Make_ImeiCheck_FourLabel.cs

@@ -279,15 +279,5 @@ namespace UAS_MES_NEW.Make
             //添加结果的信息进去
             showResult.Items.Add(lvi);
         }
-        private void clear()
-        {
-            //清空变量的值
-            omakeCode = "";
-            oMsid = "";
-            SN = "";
-            imei1 = "";
-            imei2 = "";
-            checksn = "";
-        }
     }
 }

+ 2 - 2
UAS_MES_XMW/CustomControl/TextBoxWithIcon/SearchTextBox.cs

@@ -328,11 +328,11 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
             //将查询到的结果返回界面
             if (TextBox.Text != "")
             {
-                sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + TextBox.Text + "'";
+                sql = "select " + BaseUtil.AddField(setValueField).Replace("ma_code1","ma_code") + " from " + tableName + " where " + Name.Replace("ma_code1","ma_code") + "='" + TextBox.Text + "'";
             }
             else if (db != null)
             {
-                sql = "select " + BaseUtil.AddField(setValueField) + " from " + tableName + " where " + Name + "='" + db.TextBoxValue1 + "'";
+                sql = "select " + BaseUtil.AddField(setValueField).Replace("ma_code1", "ma_code") + " from " + tableName + " where " + Name.Replace("ma_code1", "ma_code") + "='" + db.TextBoxValue1 + "'";
             }
             if (condition != null)
             {

+ 6 - 6
UAS_MES_XMW/FunctionCode/Make/Make_Repair.cs

@@ -195,12 +195,12 @@ namespace UAS_MES_NEW.Make
                 string ms_paststep = "";
                 if (dt.Rows.Count > 0)
                 {
-                    string repaircount = dh.getFieldDataByCondition("configs", "data", "code='repairNumber' and caller='MESSetting'").ToString();
-                    if (int.Parse(repaircount) < int.Parse(dt.Rows[0]["ms_repairtimes"].ToString()))
-                    {
-                        OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "超出允许维修次数【" + repaircount + "】,不允许维修\n", Color.Red);
-                        return;
-                    }
+                    //string repaircount = dh.getFieldDataByCondition("configs", "data", "code='repairNumber' and caller='MESSetting'").ToString();
+                    //if (int.Parse(repaircount) < int.Parse(dt.Rows[0]["ms_repairtimes"].ToString()))
+                    //{
+                    //    OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "超出允许维修次数【" + repaircount + "】,不允许维修\n", Color.Red);
+                    //    return;
+                    //}
                     string ms_status = dt.Rows[0]["ms_status"].ToString();
                     ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
                     ifrework = dt.Rows[0]["ms_ifrework"].ToString();

+ 15 - 13
UAS_MES_XMW/FunctionCode/Special/Special_ChangeMakeCodeBySN.cs

@@ -60,8 +60,8 @@ namespace UAS_MES_NEW.Special
 
         private void pr_code_DbChange1(object sender, EventArgs e)
         {
-            Dbfind = ma_code1.ReturnData;
-            BaseUtil.SetFormValue(this.Controls, Dbfind);
+            //Dbfind = ma_code1.ReturnData;
+            //BaseUtil.SetFormValue(this.Controls, Dbfind);
             DataTable dt = (DataTable)dh.ExecuteSql("select ma_qty,ma_prodcode,pr_detail from make left join product on ma_prodcode=pr_code  where ma_code='" + ma_code1.Text + "'", "select");
             if (dt.Rows.Count > 0)
             {
@@ -110,18 +110,20 @@ namespace UAS_MES_NEW.Special
             //    OperateResult.AppendText("工单号产品编号不对应,不允许切换\n");
             //    return;
             //}
-            List<string> sqls = new List<string>();
-            sqls.Add("update CRAFTMATERIAL set cm_makecode='" + ma_code1.Text + "' where cm_makecode= '" + ma_code.Text + "' and cm_sncode='" + sncode + "'");
-            sqls.Add("update steppassed set sp_makecode='" + ma_code1.Text + "' where sp_makecode= '" + ma_code.Text + "' and sp_sncode='" + sncode + "'");
-            sqls.Add("update makeserial set ms_makecode='" + ma_code1.Text + "' where ms_makecode= '" + ma_code.Text + "' and ms_sncode='" + sncode + "'");
-            sqls.Add("update makeprocess set mp_makecode='" + ma_code1.Text + "' where mp_makecode= '" + ma_code.Text + "' and mp_sncode='" + sncode + "'");
-            sqls.Add("update commandlog set cl_makecode='" + ma_code1.Text + "' where cl_makecode= '" + ma_code.Text + "' and cl_sncode='" + sncode + "'");
-            sqls.Add("update makebad set mb_makecode='" + ma_code1.Text + "' where mb_makecode= '" + ma_code.Text + "' and mb_sncode='" + sncode + "'");
-            sqls.Add("update labelprintlog set lpl_makecode='" + ma_code1.Text + "' where lpl_makecode= '" + ma_code.Text + "' and lpl_value='" + sncode + "'");
-            sqls.Add("update make set ma_inqty=(select count(1) from makeserial where ms_makecode='" + ma_code1.Text + "') and ma_code='" + ma_code1.Text + "' ");
-            sqls.Add("update make set ma_endqty=(select count(1) from makeserial where ms_makecode='" + ma_code1.Text + "' and ms_status=2) where ma_code='" + ma_code1.Text + "'");
+            List<string> sqls = new List<string>
+            {
+                "update CRAFTMATERIAL set cm_makecode='" + ma_code1.Text + "' where cm_makecode= '" + ma_code.Text + "' and cm_sncode='" + sncode + "'",
+                "update steppassed set sp_makecode='" + ma_code1.Text + "' where sp_makecode= '" + ma_code.Text + "' and sp_sncode='" + sncode + "'",
+                "update makeserial set ms_makecode='" + ma_code1.Text + "' where ms_makecode= '" + ma_code.Text + "' and ms_sncode='" + sncode + "'",
+                "update makeprocess set mp_makecode='" + ma_code1.Text + "' where mp_makecode= '" + ma_code.Text + "' and mp_sncode='" + sncode + "'",
+                "update commandlog set cl_makecode='" + ma_code1.Text + "' where cl_makecode= '" + ma_code.Text + "' and cl_sncode='" + sncode + "'",
+                "update makebad set mb_makecode='" + ma_code1.Text + "' where mb_makecode= '" + ma_code.Text + "' and mb_sncode='" + sncode + "'",
+                "update labelprintlog set lpl_makecode='" + ma_code1.Text + "' where lpl_makecode= '" + ma_code.Text + "' and lpl_value='" + sncode + "'",
+                "update make set ma_inqty=(select count(1) from makeserial where ms_makecode='" + ma_code1.Text + "') where ma_code='" + ma_code1.Text + "' ",
+                "update make set ma_endqty=(select count(1) from makeserial where ms_makecode='" + ma_code1.Text + "' and ms_status=2) where ma_code='" + ma_code1.Text + "'"
+            };
             dh.ExecuteSQLTran(sqls.ToArray());
-            OperateResult.AppendText("工单号切换成功\n");
+            OperateResult.AppendText(ms_sncode.Text + "工单号切换成功,原工单" + ma_code.Text + ",新工单" + ma_code1.Text + "\n");
             LogicHandler.DoCommandLog("", User.UserName, ma_code.Text, User.UserLineCode, User.UserSourceCode, "工单变更", "工单变更" + ma_code.Text + "切换到" + ma_code1.Text, "", "");
         }
     }