Fix
parent
4b467fa7b0
commit
a33d981dcc
|
|
@ -76,7 +76,7 @@ class DeviceLogDailyReportCommand extends Command
|
||||||
protected function createReportToLinkosMeteorologicalDevice(Device $device): void
|
protected function createReportToLinkosMeteorologicalDevice(Device $device): void
|
||||||
{
|
{
|
||||||
$lastReportedAt = MeteorologicalDailyReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at')
|
$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) {
|
if ($lastReportedAt === null) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -104,7 +104,7 @@ class DeviceLogDailyReportCommand extends Command
|
||||||
protected function createReportToLinkosWaterQualityDevice(Device $device): void
|
protected function createReportToLinkosWaterQualityDevice(Device $device): void
|
||||||
{
|
{
|
||||||
$lastReportedAt = WaterQualityDailyReport::where('device_id', $device->id)->latest('reported_at')->value('reported_at')
|
$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) {
|
if ($lastReportedAt === null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue