This commit is contained in:
44
api/app/Http/Controllers/Almoxarifado/BaixaController.php
Normal file
44
api/app/Http/Controllers/Almoxarifado/BaixaController.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\BaixaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class BaixaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'baixa';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return BaixaService::datatable();
|
||||
}
|
||||
|
||||
public function history()
|
||||
{
|
||||
return BaixaService::history();
|
||||
}
|
||||
|
||||
public function create($materialId)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(BaixaService::create($materialId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(BaixaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function reverse($saidaItemId)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(BaixaService::reverse($saidaItemId), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\BalanceteService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class BalanceteController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'balancete';
|
||||
|
||||
public function index()
|
||||
{
|
||||
return response()->json(BalanceteService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(BalanceteService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function checkDate($data)
|
||||
{
|
||||
return response()->json(BalanceteService::checkDate($data), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(BalanceteService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Services\Almoxarifado\DispensacaoService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class DispensacaoMateriaisController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'dispensacao-materiais';
|
||||
|
||||
public function create($pacienteId)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
return response()->json(DispensacaoService::create($pacienteId), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
return response()->json(DispensacaoService::store(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function print($id)
|
||||
{
|
||||
return response()->json(DispensacaoService::print($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function getHistorico($id)
|
||||
{
|
||||
return response()->json(DispensacaoService::getHistorico($id), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
58
api/app/Http/Controllers/Almoxarifado/EntradaController.php
Normal file
58
api/app/Http/Controllers/Almoxarifado/EntradaController.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\EntradaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class EntradaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'entrada';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return EntradaService::datatable();
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EntradaService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EntradaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EntradaService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EntradaService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EntradaService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(EntradaService::list(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\EntradaInicialService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class EntradaInicialController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'entrada-inicial';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return EntradaInicialService::datatable();
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EntradaInicialService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(EntradaInicialService::list(), Response::HTTP_CREATED);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\InventarioService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class InventarioController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'inventario';
|
||||
|
||||
public function index()
|
||||
{
|
||||
return response()->json(InventarioService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(InventarioService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(InventarioService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function getIntegracaoBnafarMedicamentos()
|
||||
{
|
||||
return response()->json(InventarioService::getIntegracaoBnafarMedicamentos(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\MotivoBaixaService;
|
||||
use DB;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class MotivoBaixaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'motivo-baixa';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return datatables()
|
||||
->of(MotivoBaixaService::datatable())
|
||||
->filterColumn('almoxarifado_motivo_baixa.justificar', function ($query, $keyword) {
|
||||
$query->whereRaw('DECODE_ORACLE(almoxarifado_motivo_baixa.justificar, 1, "Sim", "Não") LIKE ?', ["%{$keyword}%"]);
|
||||
})
|
||||
->skipTotalRecords()
|
||||
->toJson();
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(MotivoBaixaService::create(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(MotivoBaixaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(MotivoBaixaService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(MotivoBaixaService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(MotivoBaixaService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\ParametrizacaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ParametrizacaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'parametrizacao';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return ParametrizacaoService::datatable();
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(ParametrizacaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ParametrizacaoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ParametrizacaoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\ConsumoFinanceiroService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ConsumoFinanceiroController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-consumo-financeiro';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ConsumoFinanceiroService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ConsumoFinanceiroService::list(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\ConsumoMedioMensalService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ConsumoMedioMensalController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-consumo-medio-mensal';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ConsumoMedioMensalService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ConsumoMedioMensalService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(ConsumoMedioMensalService::autocompleteMaterial())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\EntradaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class EntradaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-entrada';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EntradaService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EntradaService::list(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\EstornoEntradaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class EstornoEntradaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-estorno-entrada';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EstornoEntradaService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EstornoEntradaService::list(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\EstornoSaidaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class EstornoSaidaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-estorno-saida';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EstornoSaidaService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(EstornoSaidaService::list(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\MovimentacaoGeralService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class MovimentacaoGeralController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-movimentacao-geral';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(MovimentacaoGeralService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return response()->json(MovimentacaoGeralService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
return response()->json(MovimentacaoGeralService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocomplete()
|
||||
{
|
||||
return datatables()->of(MovimentacaoGeralService::autocomplete())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\PosicaoEstoqueService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class PosicaoEstoqueController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-posicao-estoque';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(PosicaoEstoqueService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(PosicaoEstoqueService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(PosicaoEstoqueService::autocompleteMaterial())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\RequisicaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RequisicaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-requisicao';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(RequisicaoService::autocompleteMaterial())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\SaidaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class SaidaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-saida';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::list(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function autocompleteMaterial()
|
||||
{
|
||||
return datatables()->of(SaidaService::autocompleteMaterial())->make(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado\Relatorios;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\Relatorios\ValidadeMaterialService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ValidadeMaterialController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'relatorio-validade-material';
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ValidadeMaterialService::index(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function list()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(ValidadeMaterialService::list(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\RequisicaoAberturaFechamentoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RequisicaoAberturaFechamentoController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'requisicao-abertura-fechamento';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return RequisicaoAberturaFechamentoService::datatable();
|
||||
}
|
||||
|
||||
public function getEstoque($materialId, $centroCustoAlmoxarifadoId)
|
||||
{
|
||||
return response()->json(
|
||||
RequisicaoAberturaFechamentoService::getEstoque($materialId, $centroCustoAlmoxarifadoId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
|
||||
public function getMateriaisPermitidos($centroCustoAlmoxarifadoId)
|
||||
{
|
||||
return response()->json(
|
||||
RequisicaoAberturaFechamentoService::getMateriaisPermitidos($centroCustoAlmoxarifadoId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoAberturaFechamentoService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\RequisicaoPendentePermissaoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class RequisicaoPendentePermissaoController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'requisicao-pendente-permissao';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return RequisicaoPendentePermissaoService::datatable();
|
||||
}
|
||||
|
||||
public function datatablePermissao()
|
||||
{
|
||||
return RequisicaoPendentePermissaoService::datatablePermissao();
|
||||
}
|
||||
|
||||
public function getMateriais($centroCustoRequisitanteId)
|
||||
{
|
||||
return response()->json(
|
||||
RequisicaoPendentePermissaoService::getMateriais($centroCustoRequisitanteId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
|
||||
public function datatableHistorico()
|
||||
{
|
||||
return RequisicaoPendentePermissaoService::datatableHistorico();
|
||||
}
|
||||
|
||||
public function storePermissoes()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoPendentePermissaoService::storePermissoes(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function createImportacao($centroCustoDestinoId)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(
|
||||
RequisicaoPendentePermissaoService::createImportacao($centroCustoDestinoId),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
|
||||
public function storeImportacao()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoPendentePermissaoService::storeImportacao(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoPendentePermissaoService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(RequisicaoPendentePermissaoService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
53
api/app/Http/Controllers/Almoxarifado/SaidaController.php
Normal file
53
api/app/Http/Controllers/Almoxarifado/SaidaController.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\SaidaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class SaidaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'saida';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return SaidaService::datatable();
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\TransferenciaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class TransferenciaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'transferencia';
|
||||
|
||||
public function datatableEnviadas()
|
||||
{
|
||||
return TransferenciaService::datatableEnviadas();
|
||||
}
|
||||
|
||||
public function datatableRecebidas()
|
||||
{
|
||||
return TransferenciaService::datatableRecebidas();
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(TransferenciaService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(TransferenciaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(TransferenciaService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(TransferenciaService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(TransferenciaService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
public function getTransferenciaRecebida($id)
|
||||
{
|
||||
return response()->json(TransferenciaService::getTransferenciaRecebida($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function accept($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
TransferenciaService::accept($id);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
public function reject($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
TransferenciaService::reject($id);
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user