|
|
@@ -685,13 +685,17 @@ namespace UAS_MES.PublicMethod
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- return CS_SetResult(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrorMessage);
|
|
|
+ return SetStepResult(iMakeCode, iSourceCode, iSN, iMPKind, iResult,iUserCode,out oErrorMessage);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static bool SetStepResult(string iMakeCode, string iSourceCode, string iSN, string iMPKind, string iResult, string iUserCode, out string oErrorMessage)
|
|
|
{
|
|
|
- return CS_SetResult(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrorMessage);
|
|
|
+ if (dh.getFieldDataByCondition("source LEFT JOIN STEP on st_code=sc_stepcode", "nvl(St_ifqccheck,0)", "sc_code='" + iSourceCode + "'").ToString() != "-1")
|
|
|
+ {
|
|
|
+ return CS_SetResult(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrorMessage);
|
|
|
+ }else
|
|
|
+ return CS_OQCSetResult(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrorMessage);
|
|
|
}
|
|
|
|
|
|
public static bool CS_SetResult(string iMakeCode, string iSourceCode, string iSN, string iUserCode, string iResult, out string oErrorMessage)
|
|
|
@@ -705,6 +709,18 @@ namespace UAS_MES.PublicMethod
|
|
|
else
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ public static bool CS_OQCSetResult(string iMakeCode, string iSourceCode, string iSN, string iUserCode, string iResult, out string oErrorMessage)
|
|
|
+ {
|
|
|
+ oErrorMessage = "";
|
|
|
+ string[] param = new string[] { iMakeCode, iSourceCode, iSN, iUserCode, iResult, oErrorMessage };
|
|
|
+ dh.CallProcedure("CS_QCCHECKSTEPRESULT", ref param);
|
|
|
+ oErrorMessage = param[5];
|
|
|
+ if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null" || oErrorMessage.Contains("AFTERSUCCESS"))
|
|
|
+ return true;
|
|
|
+ else
|
|
|
+ return false;
|
|
|
+ }
|
|
|
/// <summary>
|
|
|
/// 设置测试结果
|
|
|
/// </summary>
|
|
|
@@ -798,9 +814,9 @@ namespace UAS_MES.PublicMethod
|
|
|
else
|
|
|
{
|
|
|
if (ifrework == "0")
|
|
|
- dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_status=3", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "' ");
|
|
|
+ dh.UpdateByCondition("makeserial", "ms_status=3", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "' ");
|
|
|
else
|
|
|
- dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_paststep = ms_paststep ||'," + StepCode + "',ms_reworkstatus=3", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
|
|
|
+ dh.UpdateByCondition("makeserial", "ms_paststep = ms_paststep ||'," + StepCode + "',ms_reworkstatus=3", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
|
|
|
SetTestResult(iMakeCode, iSourceCode, iSnCode, "不良采集", "NG", iUserCode, out oErrorMessage);
|
|
|
}
|
|
|
}
|