|
@@ -874,16 +874,8 @@ class LargeScreenService extends Service
|
|
|
$deviceId = $order['device_id'];
|
|
|
$crtTime = $order['crt_time'];
|
|
|
|
|
|
- // 统计当日
|
|
|
- if ($crtTime >= $todayStart) {
|
|
|
- if (!isset($todayCount[$deviceId])) {
|
|
|
- $todayCount[$deviceId] = 0;
|
|
|
- }
|
|
|
- $todayCount[$deviceId]++;
|
|
|
- }
|
|
|
-
|
|
|
// 统计上一周
|
|
|
- if ($crtTime >= $lastWeekStart && $crtTime < $todayStart) {
|
|
|
+ if ($crtTime >= $lastWeekStart && $crtTime <= $lastWeekEnd) {
|
|
|
if (!isset($lastWeekCount[$deviceId])) {
|
|
|
$lastWeekCount[$deviceId] = 0;
|
|
|
}
|
|
@@ -891,7 +883,7 @@ class LargeScreenService extends Service
|
|
|
}
|
|
|
|
|
|
// 统计上一个月
|
|
|
- if ($crtTime >= $lastMonthStart && $crtTime < $lastWeekStart) {
|
|
|
+ if ($crtTime >= $lastMonthStart && $crtTime <= $lastMonthEnd) {
|
|
|
if (!isset($lastMonthCount[$deviceId])) {
|
|
|
$lastMonthCount[$deviceId] = 0;
|
|
|
}
|
|
@@ -909,7 +901,6 @@ class LargeScreenService extends Service
|
|
|
|
|
|
foreach ($allDeviceIds as $deviceId) {
|
|
|
$result_wx[$deviceId] = [
|
|
|
- 'today' => $todayCount[$deviceId] ?? 0,
|
|
|
'last_week' => $lastWeekCount[$deviceId] ?? 0,
|
|
|
'last_month' => $lastMonthCount[$deviceId] ?? 0,
|
|
|
];
|