|
@@ -18,11 +18,11 @@ namespace BenQGuru.eMES.DLLService
|
|
|
bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord, out string oErrMessage);
|
|
|
bool GetAddressRangeByMO(string iSN, out string oWIFI, out string oBT, out string oCode1, out string oCode2, out string oCdoe3, out string oErrMessage);
|
|
|
bool SetAddressInfo(string iSN, string iWIFI, string iBT, string iCode1, string iCode2, string iCode3, out string oErrorMessage);
|
|
|
- bool SetTestDetail(string iSN, string iClass, string iSubClass1, string iSubClass2, string iSubClass3, string iMaxValue, string iMinValue, string iActualValue, string iValue1, string iValue2, string iValue3, string iTestResult, string iResCode, out string oErrMessage);
|
|
|
+ bool SetTestDetail(string iSN, string iTestResult, string iResCode, string[] iTestDetail, out string oErrMessage);
|
|
|
bool GetMEIOrNetCodeRange(string iSnCode, string iIMEI1, string iNetCode, out string oIMEI1, out string oIMEI2, out string oMEID, out string oNetCode, out string oPSN, out string oID1, out string oID2, out string oID3, out string oID4, out string oID5, out string oErrMessage);
|
|
|
bool SetIMEIInfo(string iSnCode, string iIMEI1, out string oErrMessage);
|
|
|
bool GetMobileAllInfo(string iSnCode, out string oWIFI, out string oBT, out string oCode1, out string oCode2, out string oCode3, out string oIMEI1, out string oIMEI2, out string oMEID, out string oNetCode, out string oPSN, out string oID1, out string oID2, out string oID3, out string oID4, out string oID5, out string oErrorMessage);
|
|
|
- bool SetMobileData(string iTSN, string iSN, string iSourceCode, string iMPKind, string iResult, string iErrCode, string flag, out string oErrorMessage);
|
|
|
+ bool SetMobileData(string iTSN, string iSN, string iSourceCode, string iOperator, string iResult, string iErrCode, string flag, out string oErrorMessage);
|
|
|
bool SetPcbaData(string iSN, string iResCode, string iOperator, string iResult, string iErrCode, out string oErrMessage);
|
|
|
bool GoMo(string iMO, string iSN, string iResCode, out string oErrMessage);
|
|
|
}
|
|
@@ -38,7 +38,7 @@ namespace BenQGuru.eMES.DLLService
|
|
|
//用于存放批量执行的SQL
|
|
|
List<string> sqls = new List<string>();
|
|
|
//系统默认的的连接字符串
|
|
|
- private string ConnectionStrings = "Password=select!#%*(;User ID=MES_TEST;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.230.200)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
+ private string ConnectionStrings = "Data Source=192.168.230.200/orcl;User ID=MES_TEST;PassWord=select!#%*(;";
|
|
|
//用户选择的数据库的连接字符串
|
|
|
private OracleConnection connection;
|
|
|
//用户选择的数据库的连接字符串
|
|
@@ -442,7 +442,7 @@ namespace BenQGuru.eMES.DLLService
|
|
|
sql.Length = 0;
|
|
|
sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
|
|
|
sql.Append(",mb_sourcecode,mb_badcode,mb_badtable,mb_soncode,mb_status) select makebad_seq.nextval");
|
|
|
- sql.Append(",ma_code,ms_code,ms_sncode,'" + iUserCode + "',sysdate,'" + StepCode + "',ms_sourcecode,:bc_code,'',");
|
|
|
+ sql.Append(",ma_code,ms_code,ms_sncode,'" + iUserCode + "',sysdate,'" + CurrentStep + "','" + iSourceCode + "',:bc_code,'',");
|
|
|
sql.Append("sp_soncode,'0' from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
|
|
|
sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode where ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'");
|
|
|
List<string> InsertSQL = new List<string>();
|
|
@@ -485,17 +485,17 @@ namespace BenQGuru.eMES.DLLService
|
|
|
/// <param name="iMakeCode"></param>
|
|
|
/// <param name="iSourceCode"></param>
|
|
|
/// <param name="iSN"></param>
|
|
|
- /// <param name="iMPKind"></param>
|
|
|
+ /// <param name="iOperater"></param>
|
|
|
/// <param name="iResult"></param>
|
|
|
/// <param name="iUserCode"></param>
|
|
|
/// <param name="oErrorMessage"></param>
|
|
|
/// <returns></returns>
|
|
|
- public bool SetMobileData(string iTSN, string iSN, string iSourceCode, string iMPKind, string iResult, string iErrCode, string flag, out string oErrorMessage)
|
|
|
+ public bool SetMobileData(string iTSN, string iSN, string iSourceCode, string iOperater, string iResult, string iErrCode, string flag, out string oErrorMessage)
|
|
|
{
|
|
|
oErrorMessage = "";
|
|
|
if (iTSN == "") { oErrorMessage = "TSN不能为空"; return false; }
|
|
|
if (iSN == "") { oErrorMessage = "SN不能为空"; return false; }
|
|
|
- string[] param = new string[] { iTSN, iSN, iSourceCode, "", iResult, iErrCode, oErrorMessage };
|
|
|
+ string[] param = new string[] { iTSN, iSN, iSourceCode, iOperater, iResult, iErrCode, oErrorMessage };
|
|
|
string[] ParamName = new string[] { "v_i_tsn", "v_i_sncode", "v_i_sourcecode", "v_i_usercode", "v_i_result", "v_i_errcode", "v_o_errmsg" };
|
|
|
CallProcedure("CS_DLLSNCHANGE", ParamName, ref param);
|
|
|
oErrorMessage = param[6];
|
|
@@ -540,9 +540,9 @@ namespace BenQGuru.eMES.DLLService
|
|
|
/// <param name="iTestResult"></param>
|
|
|
/// <param name="oErrMessage"></param>
|
|
|
/// <returns></returns>
|
|
|
- public bool SetTestDetail(string iSN, string iClass, string iSubClass1, string iSubClass2, string iSubClass3, string iMaxValue, string iMinValue, string iActualValue, string iValue1, string iValue2, string iValue3, string iTestResult, string iResCode, out string oErrMessage)
|
|
|
+ public bool SetTestDetail(string iSN, string iTestResult, string iResCode, string[] iTestDetail, out string oErrMessage)
|
|
|
{
|
|
|
- if (iSN == "")
|
|
|
+ if (iSN == "" || iSN == null)
|
|
|
{
|
|
|
oErrMessage = "SN不能为空";
|
|
|
return false;
|
|
@@ -551,12 +551,14 @@ namespace BenQGuru.eMES.DLLService
|
|
|
sql.Length = 0;
|
|
|
string omakeCode;
|
|
|
GetRcardMOInfo(iSN, out omakeCode, out oErrMessage);
|
|
|
- sql.Append("Insert into STEPTESTDETAIL (STD_ID,STD_SN,STD_MAKECODE,STD_CLASS,STD_SUBCLASS1,STD_SUBCLASS2,");
|
|
|
- sql.Append("STD_SUBCLASS3,STD_MAXVALUE,STD_MINVALUE,STD_ACTUALVALUE,STD_VALUE1,STD_VALUE2,STD_VALUE3,STD_TESTRESULT,");
|
|
|
- sql.Append("STD_DATE,STD_RESCODE) values (STEPTESTDETAIL_SEQ.nextval,:std_sn,:std_makecode,");
|
|
|
- sql.Append(":std_class,:std_subclass1,:std_subclass2,:std_subclass3,:std_maxvalue,:std_minvalue,:std_actualvalue,:std_value1,");
|
|
|
- sql.Append(":std_value2,:std_value3,:std_testresult,sysdate,:std_rescode)");
|
|
|
- ExecuteSql(sql.ToString(), "insert", iSN, omakeCode, iClass, iSubClass1, iSubClass2, iSubClass3, iMaxValue, iMinValue, iActualValue, iValue1, iValue2, iValue3, iTestResult, iResCode);
|
|
|
+ sql.Append("begin ");
|
|
|
+ for (int i = 0; i < iTestDetail.Length; i++)
|
|
|
+ {
|
|
|
+ sql.Append("Insert into STEPTESTDETAIL (STD_ID,STD_CLASS,STD_SN,STD_MAKECODE,STD_ACTUALVALUE,STD_TESTRESULT,STD_INDATE,STD_RESCODE)");
|
|
|
+ sql.Append("values(STEPTESTDETAIL_SEQ.nextval,'ITEM"+i+"','" + iSN + "','" + omakeCode + "','" + iTestDetail[i] + "','" + iTestResult + "',sysdate,'" + iResCode + "');");
|
|
|
+ }
|
|
|
+ sql.Append("end;");
|
|
|
+ ExecuteSql(sql.ToString(), "insert");
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -596,6 +598,16 @@ namespace BenQGuru.eMES.DLLService
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ ///
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="iSN"></param>
|
|
|
+ /// <param name="iResCode"></param>
|
|
|
+ /// <param name="iOperator"></param>
|
|
|
+ /// <param name="iResult"></param>
|
|
|
+ /// <param name="iErrCode"></param>
|
|
|
+ /// <param name="oErrMessage"></param>
|
|
|
+ /// <returns></returns>
|
|
|
public bool SetPcbaData(string iSN, string iResCode, string iOperator, string iResult, string iErrCode, out string oErrMessage)
|
|
|
{
|
|
|
if (iSN == "")
|
|
@@ -848,7 +860,7 @@ namespace BenQGuru.eMES.DLLService
|
|
|
addpar[i] = new StringBuilder();
|
|
|
for (int j = 0; j < c.Length; j++)
|
|
|
{
|
|
|
- if (c[j] != ' ' && c[j] != ','&&c[j]!=')')
|
|
|
+ if (c[j] != ' ' && c[j] != ',' && c[j] != ')')
|
|
|
{
|
|
|
addpar[i].Append(c[j]);
|
|
|
}
|