Browse Source

接口修复。

Jeff 3 years ago
parent
commit
494915dc4d

+ 1 - 1
FactoryTool_CShare/Business/CommonMethod.cs

@@ -510,7 +510,7 @@ namespace MOKA_Factory_Tools
             Stopwatch watch = new Stopwatch();
             watch.Start();
 
-            item.URL = url;
+            item.URL = url + "/bind/order";
             item.Postdata = string.Format("{{\"orderNum\":\"{0}\",\"sn\":\"{1}\",\"psn\":\"{2}\",\"orderCode\":\"{3}\"}}", order, sn, psn, firetv_device_code);
             HttpResult httpResult = http.GetHtml(item);
             if (httpResult.StatusCode == System.Net.HttpStatusCode.OK)

+ 8 - 7
FactoryTool_CShare/Views/OperationPanel.cs

@@ -686,7 +686,7 @@ namespace MOKA_Factory_Tools
                 ClientTypeText.Text = midListNow.clienttype;
                 SVText.Text = midListNow.version;
                 ProjectIDText.Text = midListNow.projectid;
-                UpdateKeys(midListNow.keytype, false);
+                UpdateKeysOnline(midListNow.keytype, false);
             }
             else
             {
@@ -4707,7 +4707,7 @@ namespace MOKA_Factory_Tools
                 Log.WriteGetKeyLog("Order:" + orderNow + " host is null,scanning sn:" + SN);
                 TestResult = 1;
                 UploadCopyCount();
-                UpdateKeys(midListNow.keytype, false);
+                UpdateKeysOnline(midListNow.keytype, false);
             }
             else
             {// 在线抄写;
@@ -4721,7 +4721,7 @@ namespace MOKA_Factory_Tools
                         UploadCopyCount();
                         ErrMsg = "上报结果到MID系统失败";
                         Log.WriteErrorLog(ErrMsg);
-                        UpdateKeys(midListNow.keytype, false);
+                        UpdateKeysOnline(midListNow.keytype, false);
                         goto end;
                     }
                 }
@@ -4738,7 +4738,7 @@ namespace MOKA_Factory_Tools
                             UploadCopyCount();
                             ErrMsg = "上报结果到MID系统失败";
                             Log.WriteErrorLog(ErrMsg);
-                            UpdateKeys(midListNow.keytype, false);
+                            UpdateKeysOnline(midListNow.keytype, false);
                             goto end;
                         }
                     }
@@ -4761,7 +4761,7 @@ namespace MOKA_Factory_Tools
                 // 上报完成后,更新本地数据库Key的数量;
                 UploadCopyCount();
                 // 同时,在线更新Key数量;
-                UpdateKeys(midListNow.keytype, false);
+                UpdateKeysOnline(midListNow.keytype, false);
             }
 
             if (FunctionSettingNow.ExportSNACASID)
@@ -4923,8 +4923,9 @@ namespace MOKA_Factory_Tools
         /// </summary>
         /// <param name="keys">GetMIDInfo的keytype字典</param>
         /// <returns></returns>
-        public bool UpdateKeys(Dictionary<string, string> keys, bool autokey)
+        public bool UpdateKeysOnline(Dictionary<string, string> keys, bool autokey)
         {
+            return true;
             GetOrderRemainKeyCount(orderNow);
             if (keys.ContainsKey("DeviceID"))
             {
@@ -5184,7 +5185,7 @@ namespace MOKA_Factory_Tools
 
             preloadresult = true;
             timer1.Start();
-            UpdateKeys(midListNow.keytype, true);
+            UpdateKeysOnline(midListNow.keytype, true);
             WritekeyThread = new Thread(Writekey);
             WritekeyThread.Start();
             if (!preloadresult)