解决 设备OEE月统计 不正确的问题

main
xiaoguo 1 year ago
parent 303d4f3874
commit ce553a5523

@ -742,7 +742,7 @@ namespace PVDEMCS.Services.Repositories.Impl
if (item.TotalMonth == DateTime.Now.ToString("yyyy-MM"))
{
//初尝值不包括今天
// days = now.Day - 1;
days = now.Day - 1;
//获取当月到当前的分钟
minutes = days * 60 * 24 + (now.Hour - 1) * 60 + now.Minute;
}
@ -816,7 +816,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";
@ -858,9 +858,8 @@ 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;
}
else

Loading…
Cancel
Save