Jing Li 2022-10-25 09:01:56 +08:00
parent f5d74ab9fe
commit 675acf05c6
1 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ class LinkosDeviceLogService
]); ]);
foreach ($data as $key => $item) { 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(); $dailyLog->save();
@ -329,7 +329,7 @@ class LinkosDeviceLogService
break; break;
default: default:
$dailyLog->{$key} = round(bcmul($item['sum'], $item['count'], 2), 2); $dailyLog->{$key} = round(bcdiv($item['sum'], $item['count'], 2), 2);
break; break;
} }
} }
@ -412,7 +412,7 @@ class LinkosDeviceLogService
]); ]);
foreach ($data as $key => $item) { 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(); $dailyLog->save();