1
0
Fork 0
develop
李静 2023-05-12 13:32:25 +08:00
parent 4b467fa7b0
commit a33d981dcc
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class DeviceLogDailyReportCommand extends Command
protected function createReportToLinkosMeteorologicalDevice(Device $device): void
{
$lastReportedAt = MeteorologicalDailyReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at')
?: MeteorologicalReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at');
?: MeteorologicalReport::where('device_id', $device->id)->oldest('reported_at')->value('reported_at');
if ($lastReportedAt === null) {
return;
@ -104,7 +104,7 @@ class DeviceLogDailyReportCommand extends Command
protected function createReportToLinkosWaterQualityDevice(Device $device): void
{
$lastReportedAt = WaterQualityDailyReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at')
?: WaterQualityReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at');
?: WaterQualityReport::where('device_id', $device->id)->oldest('reported_at')->value('reported_at');
if ($lastReportedAt === null) {
return;