Фикс подсчета времени работы
Если запись была более 5 минут назад - Добавляется разница во времени в группу "Не работает"
This commit is contained in:
parent
af361bb2a4
commit
ed8c05b4dc
@ -30,7 +30,10 @@ class FabricWorkTimeService(DashboardBaseService):
|
||||
|
||||
now_date = cls.get_current_time()
|
||||
duration = now_date - previous_time
|
||||
status_durations[previous_status] += duration
|
||||
if duration.seconds // 60 > 5:
|
||||
status_durations['NW'] += duration
|
||||
else:
|
||||
status_durations[previous_status] += duration
|
||||
if return_duration:
|
||||
return status_durations
|
||||
status_durations_hours = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user