From c2475f4baa6dbd33779f375ffd896dd78163a4a7 Mon Sep 17 00:00:00 2001 From: Jing Li Date: Fri, 4 Aug 2023 12:11:06 +0800 Subject: [PATCH] Fix --- app/Services/BiAngDeviceLogService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Services/BiAngDeviceLogService.php b/app/Services/BiAngDeviceLogService.php index 942aece..c1dfef7 100644 --- a/app/Services/BiAngDeviceLogService.php +++ b/app/Services/BiAngDeviceLogService.php @@ -176,7 +176,11 @@ class BiAngDeviceLogService }; if ($attribute) { - $attributes[$attribute] = $v; + if ($attribute == 'moment_rainfall') { + $attributes[$attribute] = bcadd($attributes[$attribute] ?? '0.00', $v, 2); + } else { + $attributes[$attribute] = $v; + } } } }