Commit 2af783eb authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Ajout des codes et libellés des plafonds dans le PlafondControle

parent 45a3ef57
Loading
Loading
Loading
Loading
+64
Changes for module/Plafond/src/Entity/PlafondControle.php: 64 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,16 @@ use Plafond\Controller\PlafondController;
 */
class PlafondControle
{
    /**
     * @var string
     */
    private $code;

    /**
     * @var string
     */
    private $libelle;

    /**
     * @var string
     */
@@ -53,6 +63,54 @@ class PlafondControle



    /**
     * @return string
     */
    public function getCode(): string
    {
        return $this->code;
    }



    /**
     * @param string $code
     *
     * @return PlafondControle
     */
    public function setCode(string $code): PlafondControle
    {
        $this->code = $code;

        return $this;
    }



    /**
     * @return string
     */
    public function getLibelle(): string
    {
        return $this->libelle;
    }



    /**
     * @param string $libelle
     *
     * @return PlafondControle
     */
    public function setLibelle(string $libelle): PlafondControle
    {
        $this->libelle = $libelle;

        return $this;
    }



    /**
     * @return string
     */
@@ -268,6 +326,12 @@ class PlafondControle
    public static function fromArray(array $a): PlafondControle
    {
        $pc = new PlafondControle();
        if (isset($a['CODE'])) {
            $pc->setCode($a['CODE']);
        }
        if (isset($a['LIBELLE'])) {
            $pc->setLibelle($a['LIBELLE']);
        }
        if (isset($a['MESSAGE'])) {
            $pc->setMessage($a['MESSAGE']);
        }
+2
Changes for module/Plafond/src/Service/PlafondService.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -163,6 +163,8 @@ class PlafondService extends AbstractEntityService

        $sql = "
            SELECT
              p.code         code,
              p.libelle      libelle,
              p.libelle      message,
              pp.code        perimetre,
              pe.code        etat,