baowei 2 週間 前
コミット
26b441fab1

+ 6 - 6
ProductionLineMonitor.Application/Services/OEEService/Dtos/MachineOEEInfoByPeriod.cs

@@ -110,19 +110,19 @@ namespace ProductionLineMonitor.Application.Services.OEEService.Dtos
         }
         public void CalculateOEE(int i, int daysnum)
         {
-            Outputs = OutPutPerHours.Sum(s => s.OutPut.Value);
-            RunTime = OutPutPerHours.Sum(s => s.AutoRunTime.Value);
-            IdelTime = OutPutPerHours.Sum(s => s.IdleTime.Value);
-            DownTime = OutPutPerHours.Sum(s => s.AlarmTime.Value);
-            LoadMATTime = OutPutPerHours.Sum(s => s.LoadMATTime.Value);
             if (i == 1)
             {
                 TotalTime = OutPutPerHours.Count() * 60 * 60;
             }
             else
             {
-                TotalTime = OutPutPerHours.Count() * 60 * 60 * 24 * daysnum;
+                TotalTime = 60 * 60 * 24 * daysnum;
             }
+            Outputs = OutPutPerHours.Sum(s => s.OutPut.Value);
+            RunTime = OutPutPerHours.Sum(s => s.AutoRunTime.Value);
+            IdelTime = OutPutPerHours.Sum(s => s.IdleTime.Value);
+            DownTime = OutPutPerHours.Sum(s => s.AlarmTime.Value);
+            LoadMATTime = OutPutPerHours.Sum(s => s.LoadMATTime.Value);
         }
     }
 

+ 1 - 1
ProductionLineMonitor.Application/Services/OEEService/OEEService.cs

@@ -162,7 +162,7 @@ namespace ProductionLineMonitor.Application.Services.OEEService
                             EndTime = tempTime1,
                             OutPutPerHours = outputhourslist
                         };
-                        machineOEE.CalculateOEE(peroid, 1);
+                        machineOEE.CalculateOEE(peroid, 7);
                         OEES.Add(machineOEE);
                     }
                     OEES_Dic.Add(item, OEES);