|
@@ -15,6 +15,8 @@ namespace MOKA_Factory_Tools
|
|
|
internal class GMethod
|
|
|
{
|
|
|
public static MaInfo s_maInfo = null;
|
|
|
+ private static string strLastOrder = "";
|
|
|
+ private static string strOrderKind = ""; // 试产 or 量产;
|
|
|
private static Dictionary<string, string> LastKaylaOrderInfo = new Dictionary<string, string>();
|
|
|
|
|
|
private static string url_MaInfo = "http://smes-prd-app01.tclking.com:9002/SAPService.asmx";
|
|
@@ -200,10 +202,20 @@ namespace MOKA_Factory_Tools
|
|
|
/// </summary>
|
|
|
/// <param name="sn"></param>
|
|
|
/// <returns></returns>
|
|
|
- public static bool GetOrderTypeFromSN(string sn, out string result, out string msg)
|
|
|
+ public static bool GetOrderTypeFromSN(string sn, string order, out string result, out string msg)
|
|
|
{
|
|
|
msg = "";
|
|
|
result = "";
|
|
|
+
|
|
|
+ if (order.Equals(strLastOrder, StringComparison.OrdinalIgnoreCase))
|
|
|
+ {
|
|
|
+ if (strOrderKind.Equals("量产") || strOrderKind.Equals("试产"))
|
|
|
+ {
|
|
|
+ result = strOrderKind;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
HttpHelper http = new HttpHelper();
|
|
|
HttpItem item = new HttpItem()
|
|
|
{
|
|
@@ -237,6 +249,8 @@ namespace MOKA_Factory_Tools
|
|
|
result = "试产";
|
|
|
else
|
|
|
result = "错误返回";
|
|
|
+
|
|
|
+ strOrderKind = result;
|
|
|
Log.WriteInfoLog("\r\nIsCuringBOM :\r\n" + item.URL + "\r\n" + item.Postdata + "\r\n" + hResult.Html);
|
|
|
return true;
|
|
|
}
|
|
@@ -256,6 +270,8 @@ namespace MOKA_Factory_Tools
|
|
|
Log.WriteInfoLog("IsCuringBOM Http-error:" + hResult.StatusDescription + "\r\n" + hResult.Html + "\r\nAddress: " + item.URL + "\r\nPostdata: " + item.Postdata);
|
|
|
}
|
|
|
|
|
|
+ strOrderKind = "";
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
|