<?php

namespace Modules\Parametrage\Consultation\Repository;

use Helpers\QueryBuilder\AbsRepository;

class ParamConsultation extends AbsRepository
{
    /**
     * Summary of getListeParamFonctionnel
     * @return string[][]
     */
    public function getListeParamFonctionnel(): array
    {
        $req = "select * from PARAVRAC with (nolock) where (CODEPARV = 'ACTIF' and (TYPEPARV='AO_VAL_FOU' OR TYPEPARV='AO_NOMAJAF')) OR CODEPARV = 'AO_AFF_CODE_ART' OR CODEPARV = 'AO_AFF_CODE_REF_FAB' OR CODEPARV= 'AO_AFF_REF_ART_FOUR' OR CODEPARV= 'AO_ACC_CONF_VAL_ACH'";

        return $this->fetchAssocAll($req, []);
    }
    
    /**
     * Summary of getListeParamEntete
     * @return string[][]
     */
    public function getListeParamEntete(): array
    {
        $req = "select * from PARAVRAC with (nolock) where TYPEPARV = 'OXAPROC' and CODEPARV like 'CONSULT_%'";

        return $this->fetchAssocAll($req, []);
    }
    
    /**
     * Summary of getListeDocReponse
     * @return string[][]
     */
    public function getListeDocReponse(): array
    {
        $req = "select * from CONSULT_DOC_DEFAUT where TYPE_DOC = 'A'";

        return $this->fetchAssocAll($req, []);
    }
    
    /**
     * Summary of getListePJClause
     * @return string[][]
     */
    public function getListePJClause(): array
    {
        $req = "select * from CONSULT_DOC_DEFAUT where TYPE_DOC = 'P'";

        return $this->fetchAssocAll($req, []);
    }
}
