ソースを参照

修复抄写EDID无SN时无法抄写的Bug.

JeffWang 2 年 前
コミット
ccb3217145
1 ファイル変更14 行追加11 行削除
  1. 14 11
      FactoryTool_CShare/Views/OperationPanel.cs

+ 14 - 11
FactoryTool_CShare/Views/OperationPanel.cs

@@ -2238,19 +2238,22 @@ namespace MOKA_Factory_Tools
 #endif
 #endif
                 }
                 }
 
 
-                // 部分订单无key,只有Roku信息;
-                if (midListNow.keytype.Count() != 0)
+                if (!CommonMethod.IsEDIDCopy(midListNow))
                 {
                 {
-                    if (!V2Method.GetMidKey(midListNow.host, SN, orderNow, psn, devicecode, key2Write, errorDBNow, ref keyInfo, out error))
+                    // 部分订单无key,只有Roku信息;
+                    if (midListNow.keytype.Count() != 0 )
                     {
                     {
-                        ErrMsg = string.Format("{0} GetIDMKeys Failed!\r\n{1}", SN, error);
-                        Log.WriteErrorLog(ErrMsg);
-                        goto end;
+                        if (!V2Method.GetMidKey(midListNow.host, SN, orderNow, psn, devicecode, key2Write, errorDBNow, ref keyInfo, out error))
+                        {
+                            ErrMsg = string.Format("{0} GetIDMKeys Failed!\r\n{1}", SN, error);
+                            Log.WriteErrorLog(ErrMsg);
+                            goto end;
+                        }
+                    }
+                    else
+                    {
+                        Log.WriteInfoLog("mid type is null, don't query idm keys");
                     }
                     }
-                }
-                else
-                {
-                    Log.WriteInfoLog("mid type is null, don't query idm keys");
                 }
                 }
 
 
                 if (midListNow.keytype.ContainsKey("DSN"))
                 if (midListNow.keytype.ContainsKey("DSN"))
@@ -5273,7 +5276,7 @@ namespace MOKA_Factory_Tools
         /// <param name="e"></param>
         /// <param name="e"></param>
         private void OnBtnClickStart(object sender, EventArgs e)
         private void OnBtnClickStart(object sender, EventArgs e)
         {
         {
-            SN = "";    // SN置为空,用于不需要扫码SN的某些工厂;
+            SN = SNText.Text;    // SN置为空,用于不需要扫码SN的某些工厂;
             keyInfo = new KeyInfo();
             keyInfo = new KeyInfo();
             if (preloadNow)
             if (preloadNow)
             {
             {