|
@@ -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
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|
|
|
|
- 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;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
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]);
|
|
|
}
|