KWD 3 месяцев назад
Родитель
Сommit
5b4f326be6
1 измененных файлов с 9 добавлено и 8 удалено
  1. 9 8
      TeamAAS-VM/Core/Management.cs

+ 9 - 8
TeamAAS-VM/Core/Management.cs

@@ -1698,11 +1698,11 @@ namespace TeamAAS_VP.Core
                                 {
                                     UpCameraPutResults[1] = new PointF((float)visionResult.X, (float)visionResult.Y);
                                 }
-                                else if(systemConfig.WorkMode==2)
+                                else if (systemConfig.WorkMode == 2)
                                 {
                                     UpCameraPutResults[cameraIndex] = new PointF((float)visionResult.X, (float)visionResult.Y);
                                 }
-                                else if(systemConfig.WorkMode==3)
+                                else if (systemConfig.WorkMode == 3)
                                 {
                                     if (cameraIndex <= 3)
                                     {
@@ -2437,7 +2437,7 @@ namespace TeamAAS_VP.Core
                             return;
                         }
                         if (state == 1)
-                        {                           
+                        {
                             SendTaskMessage(Lang.收到多相机坐标合并请求开始合并, MessageLevel.Debug);
                             //位置编号
                             Int16 positionIndex = plc.ReadNode<Int16>(addressConfig.In_ProductNum.Address);
@@ -3045,7 +3045,7 @@ namespace TeamAAS_VP.Core
                                                             if (currentProduct.ID != productId)
                                                             {
                                                                 //切换产品
-                                                                 _productService.LoadProduct(productId);
+                                                                _productService.LoadProduct(productId);
                                                                 _productService.SetCurrentProduct(productId);
                                                                 await WriteParameterToPlcExAsync();
                                                                 SendTaskMessage($"切换产品成功", MessageLevel.Debug);
@@ -3167,7 +3167,7 @@ namespace TeamAAS_VP.Core
                                                             if (currentProduct.ID != productId)
                                                             {
                                                                 //切换产品
-                                                                 _productService.LoadProduct(productId);
+                                                                _productService.LoadProduct(productId);
                                                                 _productService.SetCurrentProduct(productId);
                                                                 await WriteParameterToPlcExAsync();
                                                                 SendTaskMessage($"切换产品成功", MessageLevel.Debug);
@@ -3280,7 +3280,7 @@ namespace TeamAAS_VP.Core
                                                 Remark = $"TotalSeconds:{serverTimeResult.Now.Subtract(_LastMesCheckTime[i]).TotalSeconds.ToString("F2")}",
                                             });
                                     }
-                                      
+
 
                                     LogHelper.WriteLogMes($"【mes开始ADD】");
                                     SendTaskMessage($"mes开始ADD", MessageLevel.Info);
@@ -3780,7 +3780,7 @@ namespace TeamAAS_VP.Core
                                     await plc.WriteNodeAsync(string.Format(addressConfig.Out_MesStatus.Address, i), (Int16)0);
                                     return;
                                 }
-                               // _LastMesCheck[i] = 0;
+                                // _LastMesCheck[i] = 0;
                             }
                         }
                     }
@@ -4232,8 +4232,8 @@ namespace TeamAAS_VP.Core
                     TotalQuantityToday += await _systemDatabaseService.GetTodayProductionAsync(product.Name);
                     CurrentUPH += await _systemDatabaseService.GetLastHourProductionAsync(product.Name);
                     NgNumber += await _systemDatabaseService.GetNGProductionAsync(product.Name);
-                    Yield += ((double)TotalQuantityToday - (double)NgNumber) / (double)TotalQuantityToday * 100;
                 }
+                Yield += ((double)TotalQuantityToday - (double)NgNumber) / (double)TotalQuantityToday * 100;
             }
             catch (Exception)
             {
@@ -4420,6 +4420,7 @@ namespace TeamAAS_VP.Core
             }
         }
         #endregion
+
         #region 产品锁付记录进行存储
         /// <summary>
         /// 产品锁付记录进行存储