|
|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Text;
|
|
|
using System.Windows;
|
|
|
+using System.Windows.Forms;
|
|
|
using UAS_MES.DataOperate;
|
|
|
using UAS_MES.Entity;
|
|
|
|
|
|
@@ -452,10 +453,10 @@ namespace UAS_MES.PublicMethod
|
|
|
/// <param name="iUserCode"></param>
|
|
|
/// <param name="iResult"></param>
|
|
|
/// <param name="iBoxType"></param>
|
|
|
- public static bool OutBoxStepPass(string iOutBoxCode, string iMakeCode, string iSourceCode, string iUserCode, string iResult, string iBoxType,out string oErrorMessage)
|
|
|
+ public static bool OutBoxStepPass(string iOutBoxCode, string iMakeCode, string iSourceCode, string iUserCode, string iResult, string iBoxType, out string oErrorMessage)
|
|
|
{
|
|
|
oErrorMessage = "";
|
|
|
- string[] param = new string[] { iOutBoxCode, iMakeCode, iSourceCode, iUserCode,iResult ,iBoxType, oErrorMessage };
|
|
|
+ string[] param = new string[] { iOutBoxCode, iMakeCode, iSourceCode, iUserCode, iResult, iBoxType, oErrorMessage };
|
|
|
dh.CallProcedure("CS_CARTONBOXSTEPRESULT", ref param);
|
|
|
oErrorMessage = param[6];
|
|
|
if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
|
|
|
@@ -551,6 +552,78 @@ namespace UAS_MES.PublicMethod
|
|
|
dh.ExecuteSql(sql.ToString(), "insert");
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ ///
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="iSNMakeCode">序列号的工单号</param>
|
|
|
+ /// <param name="iMakeCode">界面上的工单号</param>
|
|
|
+ /// <param name="ChangeMakeCodeNote">是否需要切换工单提醒</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static bool CheckDiffMakeCodeBeforeStepCheck(string iSN, string iMakeCode, bool iChangeMakeCodeNote, out string oMakeCode, out string oErrorMessage)
|
|
|
+ {
|
|
|
+ string oStatus = "";
|
|
|
+ LogicHandler.GetMakeInfo(iSN, out oMakeCode, out oStatus, out oErrorMessage);
|
|
|
+ bool NoteAlready = false;
|
|
|
+ if (iChangeMakeCodeNote)
|
|
|
+ {
|
|
|
+ if (iMakeCode != oMakeCode && oMakeCode != "" && iMakeCode != "" && oStatus != "2")
|
|
|
+ {
|
|
|
+ string ChangeMakeCode = System.Windows.Forms.MessageBox.Show("序列号"+ iSN + "所属工单不同,是否切换?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
|
|
|
+ //如果选择不切换赋值当前界面工单
|
|
|
+ if (ChangeMakeCode != "Yes")
|
|
|
+ {
|
|
|
+ oErrorMessage = "请重新采集序列号";
|
|
|
+ NoteAlready = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ NoteAlready = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ oMakeCode = iMakeCode;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (oMakeCode == "" || (oMakeCode != "" && oMakeCode == iMakeCode))
|
|
|
+ {
|
|
|
+ oMakeCode = iMakeCode;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return (oErrorMessage == "" || oErrorMessage == null);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 校验方法之后的检测
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="iSNMakecode"></param>
|
|
|
+ /// <param name="iMakeCode"></param>
|
|
|
+ /// <param name="iChangeMakeCodeNote"></param>
|
|
|
+ /// <param name="NoteAlready"></param>
|
|
|
+ public static bool CheckDiffMakeCodeAfterStepCheck(string iSN,string iSNMakecode, bool iChangeMakeCodeNote, bool NoteAlready, Control ctl, out string oErrMessage)
|
|
|
+ {
|
|
|
+ oErrMessage = "";
|
|
|
+ if (iChangeMakeCodeNote && !NoteAlready)
|
|
|
+ {
|
|
|
+ if (iSNMakecode != ctl.Text && ctl.Text != "")
|
|
|
+ {
|
|
|
+ string ChangeMakeCode = System.Windows.Forms.MessageBox.Show("序列号"+ iSN + "所属工单不同,是否切换?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
|
|
|
+ //如果选择不切换赋值当前界面工单
|
|
|
+ if (ChangeMakeCode == "Yes")
|
|
|
+ {
|
|
|
+ ctl.Text = iSNMakecode;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ oErrMessage = "请重新采集序列号";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return (oErrMessage == "" || oErrMessage == null);
|
|
|
+ }
|
|
|
+
|
|
|
public static bool OQCBatchJudge(string iCheckno, string iSourceCode, string iResult, string iRework, string iUserCode, string iRemark, out string oReworkCode, out string oErrorMessage)
|
|
|
{
|
|
|
oReworkCode = "";
|