|
@@ -14,10 +14,10 @@ namespace MOKA_Factory_Tools
|
|
|
{
|
|
|
public static SanhuaMESLoginInfo sanhuaLoginInfo = new SanhuaMESLoginInfo();
|
|
|
|
|
|
- public static bool CheckLogin(string url)
|
|
|
+ public static bool CheckLogin()
|
|
|
{
|
|
|
HttpHelper http = new HttpHelper();
|
|
|
- HttpItem item = new HttpItem() {URL = url + "api/MESTestCollect/CheckLogin", Encoding = Encoding.UTF8,Method = "post", PostEncoding = Encoding.UTF8, KeepAlive = false};
|
|
|
+ HttpItem item = new HttpItem() {URL = sanhuaLoginInfo.url + "api/MESTestCollect/CheckLogin", Encoding = Encoding.UTF8,Method = "post", PostEncoding = Encoding.UTF8, KeepAlive = false};
|
|
|
item.ContentType = "application/json;charset=utf-8";
|
|
|
item.Postdata = string.Format("{{\"password\":\"{0}\",\"resourceCode\":\"{1}\",\"staffCode\":\"{2}\"}}", sanhuaLoginInfo.staffCode, sanhuaLoginInfo.password, sanhuaLoginInfo.resourceCode);
|
|
|
HttpResult result = http.GetHtml(item);
|
|
@@ -42,10 +42,10 @@ namespace MOKA_Factory_Tools
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- public static bool ProductRouteCheck(string url, string productSN)
|
|
|
+ public static bool ProductRouteCheck(string productSN)
|
|
|
{
|
|
|
HttpHelper http = new HttpHelper();
|
|
|
- HttpItem item = new HttpItem() { URL = url + "api/MESTestCollect/ProductRouteCheck", Encoding = Encoding.UTF8, Method = "post", PostEncoding = Encoding.UTF8, KeepAlive = false };
|
|
|
+ HttpItem item = new HttpItem() { URL = sanhuaLoginInfo.url + "api/MESTestCollect/ProductRouteCheck", Encoding = Encoding.UTF8, Method = "post", PostEncoding = Encoding.UTF8, KeepAlive = false };
|
|
|
item.ContentType = "application/json;charset=utf-8";
|
|
|
item.Postdata = string.Format("{{\"jigEdition\":\"{0}\",\"resourceCode\":\"{1}\",\"staffCode\":\"{2}\",\"productSN\":\"{3}\"}}",
|
|
|
sanhuaLoginInfo.jigEdtion, sanhuaLoginInfo.resourceCode, sanhuaLoginInfo.staffCode, productSN);
|
|
@@ -71,10 +71,10 @@ namespace MOKA_Factory_Tools
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- public static bool UploadIdcData(string url, string productSN, string acasId)
|
|
|
+ public static bool UploadIdcData(string productSN, string acasId)
|
|
|
{
|
|
|
HttpHelper http = new HttpHelper();
|
|
|
- HttpItem item = new HttpItem() { URL = url + "api/MESTestCollect/UploadIdcData", Encoding = Encoding.UTF8, Method = "post", PostEncoding = Encoding.UTF8, KeepAlive = false };
|
|
|
+ HttpItem item = new HttpItem() { URL = sanhuaLoginInfo.url + "api/MESTestCollect/UploadIdcData", Encoding = Encoding.UTF8, Method = "post", PostEncoding = Encoding.UTF8, KeepAlive = false };
|
|
|
item.ContentType = "application/json;charset=utf-8";
|
|
|
item.Postdata = string.Format("{{\"jigEdition\":\"{0}\",\"resourceCode\":\"{1}\",\"staffCode\":\"{2}\",\"productSN\":\"{3}\",\"attr\":\"{{\"ACASID\",\"{4}\"}}\"}}",
|
|
|
sanhuaLoginInfo.jigEdtion, sanhuaLoginInfo.resourceCode, sanhuaLoginInfo.staffCode, productSN, acasId);
|
|
@@ -100,10 +100,10 @@ namespace MOKA_Factory_Tools
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- public static bool ProductMoveNext(string url, string productSN, string result, string defectCode)
|
|
|
+ public static bool ProductMoveNext(string productSN, string result, string defectCode)
|
|
|
{
|
|
|
HttpHelper http = new HttpHelper();
|
|
|
- HttpItem item = new HttpItem() { URL = url + "api/MESTestCollect/ProductMoveNext", Encoding = Encoding.UTF8, Method = "post", PostEncoding = Encoding.UTF8, KeepAlive = false };
|
|
|
+ HttpItem item = new HttpItem() { URL = sanhuaLoginInfo.url + "api/MESTestCollect/ProductMoveNext", Encoding = Encoding.UTF8, Method = "post", PostEncoding = Encoding.UTF8, KeepAlive = false };
|
|
|
item.ContentType = "application/json;charset=utf-8";
|
|
|
item.Postdata = string.Format("{{\"jigEdition\":\"{0}\",\"resourceCode\":\"{1}\",\"staffCode\":\"{2}\",\"productSN\":\"{3}\",\"defectCode\":\"{4}\",\"result\":\"{5}\"}}",
|
|
|
sanhuaLoginInfo.jigEdtion, sanhuaLoginInfo.resourceCode, sanhuaLoginInfo.staffCode, productSN, defectCode, result);
|