|
@@ -12,7 +12,7 @@ namespace BenQGuru.eMES.DLLService
|
|
|
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
|
|
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
|
|
|
public interface IMESHelper
|
|
public interface IMESHelper
|
|
|
{
|
|
{
|
|
|
- [DispId(10)]
|
|
|
|
|
|
|
+ [DispId(12)]
|
|
|
bool CheckRoutePassed(string iSN, string iResCode, out string oErrMessage);
|
|
bool CheckRoutePassed(string iSN, string iResCode, out string oErrMessage);
|
|
|
bool GetRcardMOInfo(string iSN, out string oMoCode, out string oErrMessage);
|
|
bool GetRcardMOInfo(string iSN, out string oMoCode, out string oErrMessage);
|
|
|
bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord, out string oErrMessage);
|
|
bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord, out string oErrMessage);
|
|
@@ -38,9 +38,9 @@ namespace BenQGuru.eMES.DLLService
|
|
|
//用于存放批量执行的SQL
|
|
//用于存放批量执行的SQL
|
|
|
List<string> sqls = new List<string>();
|
|
List<string> sqls = new List<string>();
|
|
|
//系统默认的的连接字符串
|
|
//系统默认的的连接字符串
|
|
|
- private string ConnectionStrings = "Password=select!#%*(;User ID=MES_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
|
|
|
|
+ private string ConnectionStrings = "Password=select!#%*(;User ID=MES_TEST;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
//用户选择的数据库的连接字符串
|
|
//用户选择的数据库的连接字符串
|
|
|
- private OracleConnection connection = new OracleConnection("Password=select!#%*(;User ID=MES_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));");
|
|
|
|
|
|
|
+ private OracleConnection connection = new OracleConnection("Password=select!#%*(;User ID=MES_TEST;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));");
|
|
|
//用户选择的数据库的连接字符串
|
|
//用户选择的数据库的连接字符串
|
|
|
private OracleCommand command = null;
|
|
private OracleCommand command = null;
|
|
|
|
|
|
|
@@ -425,8 +425,8 @@ namespace BenQGuru.eMES.DLLService
|
|
|
if (ms_status == "3")
|
|
if (ms_status == "3")
|
|
|
{
|
|
{
|
|
|
string nextstepcode = getFieldDataByCondition("craft left join craftdetail on cr_id=cd_crid ", "cd_nextstepcode", "cr_code='" + ms_craftcode + "' and cr_prodcode='" + ms_prodcode + "' and cd_stepcode='" + CurrentStep + "'").ToString();
|
|
string nextstepcode = getFieldDataByCondition("craft left join craftdetail on cr_id=cd_crid ", "cd_nextstepcode", "cr_code='" + ms_craftcode + "' and cr_prodcode='" + ms_prodcode + "' and cd_stepcode='" + CurrentStep + "'").ToString();
|
|
|
- UpdateByCondition("makeserial", "ms_status=1,ms_nextstepcode='" + nextstepcode + "'", "ms_sncode='" + iSN + "' and ms_makecode='"+iMakeCode+"'");
|
|
|
|
|
- UpdateByCondition("makebad", "mb_status=-1", "mb_sncode='" + iSN + "' and mb_makecode='"+iMakeCode+"'");
|
|
|
|
|
|
|
+ UpdateByCondition("makeserial", "ms_status=1,ms_nextstepcode='" + nextstepcode + "'", "ms_sncode='" + iSN + "' and ms_makecode='" + iMakeCode + "'");
|
|
|
|
|
+ UpdateByCondition("makebad", "mb_status=-1", "mb_sncode='" + iSN + "' and mb_makecode='" + iMakeCode + "'");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -446,9 +446,14 @@ namespace BenQGuru.eMES.DLLService
|
|
|
/// <returns></returns>
|
|
/// <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 iMPKind, string iResult, string iErrCode, string flag, out string oErrorMessage)
|
|
|
{
|
|
{
|
|
|
- string omakecode = "";
|
|
|
|
|
- GetRcardMOInfo(iSN, out omakecode, out oErrorMessage);
|
|
|
|
|
- return SetStepFinish(omakecode, iSourceCode, iSN, iMPKind, iResult, "", iErrCode, out oErrorMessage);
|
|
|
|
|
|
|
+ oErrorMessage = "";
|
|
|
|
|
+ string[] param = new string[] { iTSN, iSN, iSourceCode, "", iResult, iErrCode, oErrorMessage };
|
|
|
|
|
+ CallProcedure("CS_DLLSNCHANGE", ref param);
|
|
|
|
|
+ oErrorMessage = param[6];
|
|
|
|
|
+ if (oErrorMessage == "" || oErrorMessage == null || oErrorMessage == "null")
|
|
|
|
|
+ return true;
|
|
|
|
|
+ else
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private bool CS_SetFinish(string iMakeCode, string iSourceCode, string iSN, string iUserCode, string iResult, out string oErrorMessage)
|
|
private bool CS_SetFinish(string iMakeCode, string iSourceCode, string iSN, string iUserCode, string iResult, out string oErrorMessage)
|
|
@@ -525,6 +530,31 @@ namespace BenQGuru.eMES.DLLService
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public bool SetPcbaData(string iSN, string iResCode, string iOperator, string iResult, string iErrCode, out string oErrMessage)
|
|
|
|
|
+ {
|
|
|
|
|
+ oErrMessage = "";
|
|
|
|
|
+ string omakecode = "";
|
|
|
|
|
+ string[] param = new string[] { "", iResCode, iSN, "", omakecode, "", oErrMessage };
|
|
|
|
|
+ CallProcedure("CS_CHECKSTEPSNANDMACODE", ref param);
|
|
|
|
|
+ oErrMessage = param[6];
|
|
|
|
|
+ if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
|
|
|
|
|
+ return SetStepFinish(omakecode, iResCode, iSN, iOperator, iResult, "", iErrCode, out oErrMessage);
|
|
|
|
|
+ else
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public bool GoMo(string iMO, string iSN, string iResCode, out string oErrMessage)
|
|
|
|
|
+ {
|
|
|
|
|
+ oErrMessage = "";
|
|
|
|
|
+ string[] param = new string[] { iMO, iResCode, iSN, "", "", "", oErrMessage };
|
|
|
|
|
+ CallProcedure("CS_CHECKSTEPSNANDMACODE", ref param);
|
|
|
|
|
+ oErrMessage = param[6];
|
|
|
|
|
+ if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
|
|
|
|
|
+ return true;
|
|
|
|
|
+ else
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// 获取执行步骤代码,名称和线别
|
|
/// 获取执行步骤代码,名称和线别
|
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -905,24 +935,5 @@ namespace BenQGuru.eMES.DLLService
|
|
|
cmd.Connection.Open();
|
|
cmd.Connection.Open();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- public bool SetPcbaData(string iSN, string iResCode, string iOperator, string iResult, string iErrCode, out string oErrMessage)
|
|
|
|
|
- {
|
|
|
|
|
- oErrMessage = "";
|
|
|
|
|
- //SetMobileData();
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public bool GoMo(string iMO, string iSN, string iResCode, out string oErrMessage)
|
|
|
|
|
- {
|
|
|
|
|
- oErrMessage = "";
|
|
|
|
|
- string[] param = new string[] { iMO, iResCode, iSN, "", "", "", oErrMessage };
|
|
|
|
|
- CallProcedure("CS_CHECKSTEPSNANDMACODE", ref param);
|
|
|
|
|
- oErrMessage = param[6];
|
|
|
|
|
- if (oErrMessage == "" || oErrMessage == null || oErrMessage == "null")
|
|
|
|
|
- return true;
|
|
|
|
|
- else
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|