Update
parent
9c037037c6
commit
943099a5d3
|
|
@ -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();
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
{
|
{
|
||||||
Loading…
Reference in New Issue