fix: production_hour 计算错误
This commit is contained in:
parent
972b460a9f
commit
d01f12aa3f
|
|
@ -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
|
enstat.run_hour = enstat.total_hour_now - enstat.shut_hour
|
||||||
try:
|
try:
|
||||||
enstat.run_rate = (enstat.run_hour / enstat.total_hour_now) * 100
|
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:
|
except ZeroDivisionError:
|
||||||
pass
|
pass
|
||||||
enstat.save()
|
enstat.save()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue