fix: production_hour 计算错误

This commit is contained in:
caoqianming 2024-05-09 10:09:23 +08:00
parent 972b460a9f
commit d01f12aa3f
1 changed files with 1 additions and 1 deletions

View File

@ -501,7 +501,7 @@ def cal_enstat(type, sflogId, mgroupId, year, month, day, hour, year_s, month_s,
enstat.run_hour = enstat.total_hour_now - enstat.shut_hour
try:
enstat.run_rate = (enstat.run_hour / enstat.total_hour_now) * 100
enstat.production_hour = enstat.total_production / enstat.total_hour_now
enstat.production_hour = enstat.total_production / enstat.run_hour
except ZeroDivisionError:
pass
enstat.save()