瀏覽代碼

清除无用代码,修改过站方法

章政 8 年之前
父節點
當前提交
5fdc6bf63d

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -124,7 +124,7 @@ namespace UAS_MES.Make
                             lsi.SubItems.Add(System.DateTime.Now.ToString());
                             WeighRecord.Items.Add(lsi);
                             //显示最近的三个称量记录
-                            if (LogicHandler.UpdateMakeMessage(sncode.Text, ms_makecode.Text, "彩盒称量", User.UserSourceCode, User.UserCode, "称量合格", out ErrorMessage))
+                            if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sncode.Text, "彩盒称量", "称量合格", User.UserCode, out ErrorMessage))
                             {
                                 OperateResult.AppendText(">>" + sncode.Text + "重量检测检测合格\n", Color.Green);
                                 if (AutoPrint.Checked)
@@ -138,7 +138,7 @@ namespace UAS_MES.Make
                         }
                         else OperateResult.AppendText(">>" + sncode.Text + "重量检测未通过\n", Color.Red);
                         //称量是否通过都记录重量
-                        dh.ExecuteSql("update makeserial set ms_grossw='"+ActualWeight+"' where ms_sncode='"+sncode.Text+"' and ms_makecode='"+ms_makecode.Text+"'", "update");
+                        dh.ExecuteSql("update makeserial set ms_grossw='" + ActualWeight + "' where ms_sncode='" + sncode.Text + "' and ms_makecode='" + ms_makecode.Text + "'", "update");
                         sncode.Clear();
                     }
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sncode);

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

@@ -124,7 +124,7 @@ namespace UAS_MES.Make
                 dh.ExecuteSql(sql.GetString(), "insert");
                 dh.UpdateByCondition("Package", "pa_packageqty=pa_packageqty+1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                 dh.UpdateByCondition("makeserial", "ms_outboxcode='" + pa_outboxcode.Text + "'", "ms_sncode='" + barcode.Text + "'");
-                if (LogicHandler.UpdateMakeMessage(barcode.Text, ma_code.Text, "包装采集", User.UserSourceCode, User.UserCode, "装箱成功", out ErrorMessage))
+                if (LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, barcode.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
                 {
                     OperateResult.AppendText(">>序列号" + barcode.Text + "采集成功!\n", Color.Green);
                     barcode.Clear();

+ 1 - 50
UAS-MES/PublicMethod/LogicHandler.cs

@@ -914,6 +914,7 @@ namespace UAS_MES.PublicMethod
                 return CS_SetFinish(iMakeCode, iSourceCode, iSN, iUserCode, out oErrorMessage);
             }
         }
+
         public static bool SetStepResult(string iMakeCode, string iSourceCode, string iSN, string iMPKind, string iResult, string iUserCode, out string oErrorMessage)
         {
             oErrorMessage = "";
@@ -1272,56 +1273,6 @@ namespace UAS_MES.PublicMethod
                 return false;
         }
 
-        //public static bool UpdateOQCMessage(string iSnCode, string iCheckno, string iMakeCode, string iMPKind, string iSourceCode, string iUserCode, string iResult, out string oErrorMessage)
-        //{
-        //    oErrorMessage = "";
-        //    string StepCode = "";
-        //    string StepName = "";
-        //    string LineCode = "";
-        //    if (iResult == "" || iResult == null)
-        //    {
-        //        iResult = "测试合格";
-        //    }
-        //    GetStepCodeAndNameAndLineBySource(iSourceCode, ref StepCode, ref StepName, ref LineCode);
-        //    //查询批次和批数量
-        //    string batchqty = dh.getFieldDataByCondition("oqcbatch", "ob_nowcheckqty", "ob_checkno='" + iCheckno + "'").ToString();
-        //    string nextstepcode = dh.getFieldDataByCondition("make left join craft on ma_craftcode=cr_code and ma_prodcode=cr_prodcode left join craftdetail on cr_id = cd_crid", "cd_nextstepcode", "ma_code='" + iMakeCode + "' and cd_stepcode='" + StepCode + "'").ToString();
-        //    if (iResult.Contains("批次通过"))
-        //    {
-        //        //更新执行的数量
-        //        sqls.Add("update makecraftdetail set mcd_inqty=mcd_inqty+" + batchqty + ",mcd_outqty = mcd_outqty + " + batchqty + ",mcd_okqty = mcd_okqty + " + batchqty + " where mcd_macode='" + iMakeCode + "' and mcd_stepcode='" + StepCode + "' ");
-        //        //更新makeSerial 的下一工序
-        //        sqls.Add("update makeserial set ms_paststep = ms_paststep || '," + StepCode + "',ms_stepcode='" + StepCode + "',ms_nextstepcode='" + nextstepcode + "' where ms_checkno='" + iCheckno + "' and ms_status<>3");
-        //    }
-        //    else
-        //    {
-        //        //更新执行的数量
-        //        sqls.Add("update makecraftdetail set mcd_inqty=mcd_inqty+1,mcd_outqty = mcd_outqty + 1,mcd_okqty = mcd_okqty + 1 where mcd_macode='" + iMakeCode + "' and mcd_stepcode='" + StepCode + "' ");
-        //        //更新makeSerial 的下一工序
-        //        sqls.Add("update makeserial set ms_paststep = ms_paststep || '," + StepCode + "',ms_stepcode='" + StepCode + "',ms_nextstepcode='" + nextstepcode + "' where ms_checkno='" + iCheckno + "' and ms_status<>3");
-        //    }
-        //    //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
-        //    dh.ExecuteSQLTran(sqls.ToArray());
-        //    sqls.Clear();
-        //    //检测下道工序是否存在,不存在 更新状态为已完成
-        //    if (nextstepcode == null || nextstepcode == "")
-        //    {
-        //        if (iResult.Contains("批次通过"))
-        //        {
-        //            sqls.Add("update make set ma_madeqty=ma_madeqty+" + batchqty + " where ma_code='" + iMakeCode + "'");
-        //            sqls.Add("update makeserial set ms_status=2 where ms_checkno='" + iCheckno + "' and ms_status<>3");
-        //        }
-        //        else
-        //        {
-        //            sqls.Add("update make set ma_madeqty=ma_madeqty+1  where ma_code='" + iMakeCode + "'");
-        //            sqls.Add("update makeserial set ms_status=2 where ms_checkno='" + iCheckno + "' and ms_status<>3");
-        //        }
-        //        dh.ExecuteSQLTran(sqls.ToArray());
-        //        sqls.Clear();
-        //    }
-        //    return true;
-        //}
-
         /// <summary>
         /// 设置良品采集结果,iResult含有“批次通过”按抽检批次通过
         /// </summary>