Добавлен фильтр на день
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Models\MisMedicalHistory;
|
|||||||
use App\Models\ObservationPatient;
|
use App\Models\ObservationPatient;
|
||||||
use App\Models\Report;
|
use App\Models\Report;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
@@ -109,6 +110,7 @@ class ReportController extends Controller
|
|||||||
DB::raw('ROW_NUMBER() OVER (ORDER BY "DateRecipient" DESC) as num')
|
DB::raw('ROW_NUMBER() OVER (ORDER BY "DateRecipient" DESC) as num')
|
||||||
])
|
])
|
||||||
->where('rf_EmerSignID', 1)
|
->where('rf_EmerSignID', 1)
|
||||||
|
->whereDate('DateRecipient', '>=', Carbon::now()->format('Y-m-d'))
|
||||||
->orderBy('DateRecipient', 'DESC')
|
->orderBy('DateRecipient', 'DESC')
|
||||||
->get();
|
->get();
|
||||||
} else if ($status === 'emergency') {
|
} else if ($status === 'emergency') {
|
||||||
@@ -118,7 +120,9 @@ class ReportController extends Controller
|
|||||||
DB::raw('ROW_NUMBER() OVER (ORDER BY "DateRecipient" DESC) as num')
|
DB::raw('ROW_NUMBER() OVER (ORDER BY "DateRecipient" DESC) as num')
|
||||||
])
|
])
|
||||||
->where('rf_EmerSignID', 2)
|
->where('rf_EmerSignID', 2)
|
||||||
|
->whereDate('DateRecipient', '>=', Carbon::now()->format('Y-m-d'))
|
||||||
->orderBy('DateRecipient', 'DESC')
|
->orderBy('DateRecipient', 'DESC')
|
||||||
|
->limit(20)
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,11 +141,13 @@ class ReportController extends Controller
|
|||||||
if ($status === 'plan') {
|
if ($status === 'plan') {
|
||||||
$count = MisMedicalHistory::select($model->getFillable())
|
$count = MisMedicalHistory::select($model->getFillable())
|
||||||
->where('rf_EmerSignID', 1)
|
->where('rf_EmerSignID', 1)
|
||||||
|
->whereDate('DateRecipient', '>=', Carbon::now()->format('Y-m-d'))
|
||||||
->orderBy('DateRecipient', 'DESC')
|
->orderBy('DateRecipient', 'DESC')
|
||||||
->count();
|
->count();
|
||||||
} else if ($status === 'emergency') {
|
} else if ($status === 'emergency') {
|
||||||
$count = MisMedicalHistory::select($model->getFillable())
|
$count = MisMedicalHistory::select($model->getFillable())
|
||||||
->where('rf_EmerSignID', 2)
|
->where('rf_EmerSignID', 2)
|
||||||
|
->whereDate('DateRecipient', '>=', Carbon::now()->format('Y-m-d'))
|
||||||
->orderBy('DateRecipient', 'DESC')
|
->orderBy('DateRecipient', 'DESC')
|
||||||
->count();
|
->count();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user