예제 #1
0
 public function colaboradors($returns)
 {
     $this->SetFillColor(200);
     foreach ($returns as $setor => $return) {
         $totalSetor[$setor] = 0;
         $this->AddPage();
         $this->Cell(280, 5, Setor::find($setor)->descricao, 'LTRB', 0, 'C', 1);
         $this->SetFillColor(230);
         $this->Ln();
         $this->Cell(60, 4, 'Nome', 'LTRB', 0, 'L', 1);
         $this->Cell(15, 4, 'Jan', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Fev', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Mar', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Abr', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Mai', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Jun', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Jul', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Ago', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Set', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Out', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Nov', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Dez', 'LTRB', 0, 'C', 1);
         $this->Cell(15, 4, 'Total', 'LTRB', 0, 'C', 1);
         $this->Ln();
         foreach ($returns[$setor] as $key => $return) {
             $this->Cell(60, 4, $key, 'LTRB', 0, 'L');
             for ($mes = 1; $mes <= 12; $mes++) {
                 $this->Cell(15, 4, empty($returns[$setor][$key][2015][$mes]) ? 0 : $returns[$setor][$key][2015][$mes], 'LTRB', 0, 'C');
             }
             $this->Cell(15, 4, array_sum($returns[$setor][$key][2015]), 'LTRB', 0, 'C');
             $totalSetor[$setor] = array_sum($returns[$setor][$key][2015]) + $totalSetor[$setor];
             $this->Ln();
         }
     }
 }
예제 #2
0
파일: routes.php 프로젝트: kuell/buriti
    Route::resource('users', 'UserController');
    Route::get('users/permissao/{id}', 'PermissaoController@getSistema');
    Route::post('users/permissao', 'PermissaoController@postMenu');
});
/**
 *
 *	Ordem Interna
 *
 **/
Route::group(['before' => 'auth'], function () {
    Route::get('/setors/find/{id}/postoTrabalho', function ($setor_id) {
        $setor = Setor::find($setor_id);
        return Response::json($setor->postoTrabalhos);
    });
    Route::get('/setors/find/{id}/funcao', function ($setor_id) {
        $setor = Setor::find($setor_id);
        return Response::json($setor->funcaos);
    });
    Route::get('/farmacia/{cod}/cid', function ($cod) {
        $cid = FarmaciaCid::where('cod_cid', '=', $cod)->get();
        if ($cid->count() == 0) {
            return 0;
        } else {
            return $cid;
        }
    });
    Route::get('/fichas/find/{rg}/rg', function ($rg) {
        $ficha = Ficha::where('rg', $rg)->where('situacao', '<>', 0)->get();
        if (count($ficha)) {
            return $ficha;
        }
예제 #3
0
파일: show.blade.php 프로젝트: kuell/buriti
$fpdf->Cell(190, 7, 'Posto de Trabalho: ' . utf8_decode(!$aso->postoTrabalho ? null : $aso->postoTrabalho->descricao), 'LTR', 0, 'L');
$fpdf->Ln();
$fpdf->SetFillColor(200);
if (!empty($aso->postoTrabalho)) {
    $fpdf->SetFont('Arial', '', 7);
    $fpdf->MultiCell(190, 6, utf8_decode('Atividades: ' . implode(', ', $aso->postoTrabalho->atividades->lists('descricao'))), 'LTRB', 'L');
}
$fpdf->SetFont('Arial', 'B', 10);
$fpdf->Cell(190, 6, utf8_decode('Tipo de Exame Médico: ') . strtoupper($aso->tipo), 'TLRB', 0, 'C', 1);
$fpdf->Ln();
$fpdf->SetFont('Arial', '', 9);
if ($aso->tipo == 'mudanca de funcao') {
    $novo = DB::table('farmacia.asos')->where('id', $aso->id)->first();
    $fpdf->Cell(0, 6, utf8_decode('NOVO POSTO DE TRABALHO'), 'TLRB', 0, 'C', 0);
    $fpdf->Ln();
    $fpdf->Cell(70, 7, utf8_decode('Setor: ' . Setor::find($novo->colaborador_setor_id)->descricao), 'LTR', 0, 'L');
    $fpdf->Cell(0, 7, utf8_decode('Função: ' . SetorFuncao::find($novo->colaborador_funcao_id)->descricao), 'LTR', 0, 'L');
    $fpdf->Ln();
    $fpdf->Cell(190, 7, utf8_decode('Posto de Trabalho: ' . SetorPosto::find($novo->posto_id)->descricao), 'LTR', 0, 'L');
    $fpdf->Ln();
}
$fpdf->SetFont('Arial', 'B', 10);
$fpdf->Cell(190, 6, utf8_decode('Riscos'), 'TLRB', 0, 'C', 1);
$fpdf->Ln();
$fpdf->SetFont('Arial', '', 9);
$fpdf->SetFillColor(255);
$fpdf->Cell(38, 6, utf8_decode('Físicos'), 'TLRB', 0, 'C');
$fpdf->Cell(28, 6, utf8_decode('Químicos'), 'TLRB', 0, 'C');
$fpdf->Cell(28, 6, utf8_decode('Biológicos'), 'TLRB', 0, 'C');
$fpdf->Cell(43, 6, utf8_decode('Ergonomicos'), 'TLRB', 0, 'C');
$fpdf->Cell(53, 6, utf8_decode('Acidentes'), 'TLRB', 0, 'C');
예제 #4
0
 public function getColaboradorMonitoramento()
 {
     $setor = Setor::find(Input::get('setor'));
     return View::make('sesmt::relatorios.reports.colaborador_monitoramento', compact('setor'));
 }
예제 #5
0
파일: Aso.php 프로젝트: kuell/buriti
 public function getSetorAttribute()
 {
     if (empty($this->attributes['colaborador_id'])) {
         return Setor::find($this->attributes['colaborador_setor_id'])->descricao;
     } else {
         return $this->colaborador->setor->descricao;
     }
 }