dev
Jing Li 2023-08-12 13:59:46 +08:00
parent 9c037037c6
commit 943099a5d3
4 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@ use App\Models\MeteorologicalMonitoringDailyLog;
use App\Models\MeteorologicalMonitoringLog; use App\Models\MeteorologicalMonitoringLog;
use App\Models\SoilMonitoringDailyLog; use App\Models\SoilMonitoringDailyLog;
use App\Models\SoilMonitoringLog; use App\Models\SoilMonitoringLog;
use App\Services\BiAngDeviceLogService; use App\Services\BiAngDeviceService;
use Illuminate\Console\Command; use Illuminate\Console\Command;
class DeviceLogDailyReportCommand extends Command class DeviceLogDailyReportCommand extends Command
@ -118,7 +118,7 @@ class DeviceLogDailyReportCommand extends Command
return; return;
} }
$service = new BiAngDeviceLogService(); $service = new BiAngDeviceService();
/** @var \Carbon\Carbon */ /** @var \Carbon\Carbon */
$startAt = $lastReportedAt->copy()->startOfDay(); $startAt = $lastReportedAt->copy()->startOfDay();

View File

@ -7,7 +7,7 @@ use App\Models\Device;
use App\Models\DeviceLog; use App\Models\DeviceLog;
use App\Models\MeteorologicalMonitoringLog; use App\Models\MeteorologicalMonitoringLog;
use App\Models\SoilMonitoringLog; use App\Models\SoilMonitoringLog;
use App\Services\BiAngDeviceLogService; use App\Services\BiAngDeviceService;
use Illuminate\Console\Command; use Illuminate\Console\Command;
class DeviceLogReportCommand extends Command class DeviceLogReportCommand extends Command
@ -70,7 +70,7 @@ class DeviceLogReportCommand extends Command
return; return;
} }
$service = new BiAngDeviceLogService(); $service = new BiAngDeviceService();
/** @var \Carbon\Carbon */ /** @var \Carbon\Carbon */
$startAt = $lastReportedAt->copy()->startOfHour(); $startAt = $lastReportedAt->copy()->startOfHour();

View File

@ -5,7 +5,7 @@ namespace App\Console\Commands\BiAng;
use App\Enums\DeviceStatus; use App\Enums\DeviceStatus;
use App\Enums\DeviceType; use App\Enums\DeviceType;
use App\Models\Device; use App\Models\Device;
use App\Services\BiAngDeviceLogService; use App\Services\BiAngDeviceService;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Throwable; use Throwable;
@ -76,7 +76,7 @@ class DeviceLogSyncCommand extends Command
}); });
try { try {
(new BiAngDeviceLogService())->sync($device, $now->copy()); (new BiAngDeviceService())->sync($device, $now->copy());
$this->info('同步成功!'); $this->info('同步成功!');
} catch (Throwable $e) { } catch (Throwable $e) {

View File

@ -17,7 +17,7 @@ use Illuminate\Support\Arr;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
class BiAngDeviceLogService class BiAngDeviceService
{ {
public function sync(Device $device, Carbon $syncTime): void public function sync(Device $device, Carbon $syncTime): void
{ {