This commit is contained in:
2025-08-13 16:47:11 +03:30
parent f4060cd04e
commit dd2e016ad2
2 changed files with 3 additions and 3 deletions

View File

@@ -25,14 +25,14 @@ class ReportService
COUNT(CASE WHEN lastapp = 'Busy' THEN 1 END) AS dnd,
COUNT(CASE WHEN dst BETWEEN 502 AND 599 THEN 1 END) AS trans,
COUNT(CASE WHEN disposition <> 'BUSY' AND dst BETWEEN 101 AND 105 THEN 1 END) AS all_calls,
AVG(CASE WHEN dcontext = 'from-internal' AND disposition = 'ANSWERED' THEN billsec END) AS avg
AVG(CASE WHEN dcontext = 'from-internal' AND disposition = 'ANSWERED' THEN billsec END) AS avg,
(
COUNT(CASE WHEN disposition <> 'BUSY' AND dst BETWEEN 101 AND 105 THEN 1 END)
- (
COUNT(CASE WHEN dcontext = 'from-internal' AND disposition = 'ANSWERED' AND dst BETWEEN 101 AND 104 THEN 1 END)
+ COUNT(CASE WHEN dcontext = 'from-internal' AND disposition = 'NO ANSWER' AND dst BETWEEN 101 AND 104 AND duration > 14 THEN 1 END)
)
) AS fail,
) AS fail
")->groupByRaw('DATE(calldate)');
$data = DataTableFacade::run(

View File

@@ -153,7 +153,7 @@ Route::middleware('auth')
->group(function () {
Route::get('/', 'index')->name('index');
Route::get('/excel', 'excel')->name('excel');
Route::post('/rate/{operatorDialogue}', 'rate')->name('rate');
Route::post('/rate', 'rate')->name('rate');
Route::get('/{operatorDialogue}', 'show')->name('show');
});
});