init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
<?php
namespace App\Http\Controllers\ProntoAtendimento;
use App\Http\Controllers\Controller;
use App\Services\ProntoAtendimento\FechamentoFaaMassaService;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class FechamentoFaaMassaController extends Controller
{
protected $modulo = 'pronto-atendimento';
protected $funcionalidade = 'fechamento-faa-massa';
public function create()
{
$this->auth(__FUNCTION__);
return response()->json(FechamentoFaaMassaService::create(), Response::HTTP_OK);
}
public function list()
{
$this->auth(__FUNCTION__);
return response()->json(FechamentoFaaMassaService::list(), Response::HTTP_OK);
}
public function store(Request $request)
{
$this->auth(__FUNCTION__);
return response()->json(FechamentoFaaMassaService::store($request), Response::HTTP_CREATED);
}
public function datatable()
{
return datatables()
->of(FechamentoFaaMassaService::datatable())
->filterColumn('pronto_atendimento_faa.created_at', function ($query, $keyword) {
$query->whereRaw("DATE_FORMAT(pronto_atendimento_faa.created_at, '%d/%m/%Y') LIKE ?", ["%{$keyword}%"])
->orWhereRaw(
"CONCAT(
SUBSTR(pronto_atendimento_faa.created_at,9,2),
SUBSTR(pronto_atendimento_faa.created_at,6,2),
SUBSTR(pronto_atendimento_faa.created_at,1,4)
) like ?",
["%{$keyword}%"]
);
})
->filterColumn('cadastro_infraestrutura.nome', function ($query, $keyword) {
$query->whereRaw("COALESCE(cadastro_infraestrutura.nome, cadastro_unidade.nome_fantasia) LIKE ?", ["%{$keyword}%"]);
})
->skipTotalRecords()
->make(true);
}
}