解决OEE计算错误的问题

main^2
xiaoguo 12 months ago
parent 77f7161132
commit c1a1c72c20

Binary file not shown.

@ -743,10 +743,9 @@ namespace PVDEMCS.Services.Repositories.Impl
if (item.TotalMonth == DateTime.Now.ToString("yyyy-MM"))
{
//初尝值不包括今天
//days = now.Day - 1;
days = now.Day;
days = now.Day - 1;
//获取当月到当前的分钟
minutes = days * 60 * 24 + (now.Hour - 1) * 60 + now.Minute;
minutes = days * 24 * 60 + now.Hour * 60 + now.Minute;
}
else
{
@ -754,7 +753,7 @@ namespace PVDEMCS.Services.Repositories.Impl
if (sptr.Length == 2)
{
days = DateTime.DaysInMonth(int.Parse(sptr[0]), int.Parse(sptr[1]));
minutes = days * 60 * 24;
minutes = days * 24 * 60;
}
}
@ -818,7 +817,7 @@ namespace PVDEMCS.Services.Repositories.Impl
WHERE
info.id = '{equipmentId}'
AND total_day >= '{beg}'
AND total_day <= '{endDate}'
AND total_day <= '{end}'
GROUP BY
EquipmentId,
EquipmentType";
@ -860,14 +859,13 @@ namespace PVDEMCS.Services.Repositories.Impl
{
days = Convert.ToDecimal((endDate - begDate).TotalDays);
}
if (end == DateTime.Now.ToString("yyyy-MM-dd"))
if (endDate.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
{
//days = days - 1;
minutes = days * 60 * 24 + (now.Hour - 1) * 60 + now.Minute;
minutes = days * 24 * 60 + now.Hour * 60 + now.Minute;
}
else
{
minutes = days * 60 * 24;
minutes = days * 24 * 60;
}
var value = 0m;

Loading…
Cancel
Save