From 675acf05c6a90b82b387c722756e348aa3281cac Mon Sep 17 00:00:00 2001 From: Jing Li Date: Tue, 25 Oct 2022 09:01:56 +0800 Subject: [PATCH] Fix --- app/Services/LinkosDeviceLogService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Services/LinkosDeviceLogService.php b/app/Services/LinkosDeviceLogService.php index f0459b0..7e8a51a 100644 --- a/app/Services/LinkosDeviceLogService.php +++ b/app/Services/LinkosDeviceLogService.php @@ -196,7 +196,7 @@ class LinkosDeviceLogService ]); foreach ($data as $key => $item) { - $dailyLog->{$key} = round(bcmul($item['sum'], $item['count'], 2), 2); + $dailyLog->{$key} = round(bcdiv($item['sum'], $item['count'], 2), 2); } $dailyLog->save(); @@ -329,7 +329,7 @@ class LinkosDeviceLogService break; default: - $dailyLog->{$key} = round(bcmul($item['sum'], $item['count'], 2), 2); + $dailyLog->{$key} = round(bcdiv($item['sum'], $item['count'], 2), 2); break; } } @@ -412,7 +412,7 @@ class LinkosDeviceLogService ]); foreach ($data as $key => $item) { - $dailyLog->{$key} = round(bcmul($item['sum'], $item['count'], 2), 2); + $dailyLog->{$key} = round(bcdiv($item['sum'], $item['count'], 2), 2); } $dailyLog->save();