liuhr 1 year ago
commit e3ad6c726b

Binary file not shown.

@ -207,6 +207,12 @@ namespace PVDEMCS.Controllers
public Result<EquipmentOEETotal> GetEquipmentOEEMonthTotal(string equipmentId, DateTime begDate, DateTime endDate)
{
var result = _equipmentRecordService.GetEquipmentOEEMonthTotal(equipmentId, begDate, endDate);
if (result.IsSuccess && !result.Content.IsNullOrEmpty())
{
result.Content.TotalAlarmTime = Math.Round(result.Content.TotalAlarmTime / 60, 2);
result.Content.TotalStopTime = Math.Round(result.Content.TotalStopTime / 60, 2);
result.Content.TotalRunningTime = Math.Round(result.Content.TotalRunningTime / 60, 2);
}
return result;
}

@ -35,7 +35,7 @@ public partial class EquipmentRecordTotal
/// <summary>
/// 开炉次数
/// </summary>
public int FurnaceNum { get; set; }
public decimal FurnaceNum { get; set; }
/// <summary>
/// 总运行时长

@ -714,7 +714,7 @@ namespace PVDEMCS.Services.Repositories.Impl
var result = list.GroupBy(f => f.TotalMonth).Select(f => new EquipmentOEEMonthTotal
{
TotalMonth = f.Key,
OEE = Math.Round(f.Sum(f => f.OEE) / f.Count(), 2)
OEE = Math.Round(f.Sum(f => f.OEE) / f.Count(), 4) * 100
}).ToList();
return new Result<List<EquipmentOEEMonthTotal>>(result);
@ -788,7 +788,7 @@ namespace PVDEMCS.Services.Repositories.Impl
{
days = Convert.ToDecimal((now - begDate).TotalDays);
}
else
else
{
days = Convert.ToDecimal((endDate - begDate).TotalDays);
}
@ -797,11 +797,11 @@ namespace PVDEMCS.Services.Repositories.Impl
days = days - 1;
minutes = days * 60 * 24 + (now.Hour - 1) * 60 + now.Minute;
}
else
else
{
minutes = days * 60 * 24;
}
var value = 0m;
switch (detail.EquipmentType)
{
@ -819,7 +819,7 @@ namespace PVDEMCS.Services.Repositories.Impl
}
if (minutes > 0)
{
detail.OEE = Math.Round((detail.TotalRunningTime + value) / minutes,2);
detail.OEE = Math.Round((detail.TotalRunningTime + value) / minutes, 4) * 100;
}

Loading…
Cancel
Save