Commit f66de148 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Début implémentation durée de vie des PJ

parent 17f2b111
Loading
Loading
Loading
Loading
+81 −10
Original line number Diff line number Diff line
@@ -14724,6 +14724,17 @@
          'default' => '0',
          'commentaire' => 'NB d\'heures de seuil pour la demande',
        ),
        'DUREE_VIE' => 
        array (
          'name' => 'DUREE_VIE',
          'type' => 'NUMBER',
          'length' => 0,
          'scale' => NULL,
          'precision' => NULL,
          'nullable' => true,
          'default' => NULL,
          'commentaire' => NULL,
        ),
      ),
    ),
    'TBL_PIECE_JOINTE_DEMANDE' => 
@@ -14801,6 +14812,28 @@
          'default' => '0',
          'commentaire' => NULL,
        ),
        'DUREE_VIE' => 
        array (
          'name' => 'DUREE_VIE',
          'type' => 'NUMBER',
          'length' => 0,
          'scale' => NULL,
          'precision' => NULL,
          'nullable' => true,
          'default' => NULL,
          'commentaire' => NULL,
        ),
        'CODE_INTERVENANT' => 
        array (
          'name' => 'CODE_INTERVENANT',
          'type' => 'VARCHAR2',
          'length' => 255,
          'scale' => NULL,
          'precision' => NULL,
          'nullable' => true,
          'default' => NULL,
          'commentaire' => NULL,
        ),
      ),
    ),
    'TBL_PIECE_JOINTE_FOURNIE' => 
@@ -14900,6 +14933,28 @@
          'default' => NULL,
          'commentaire' => NULL,
        ),
        'DUREE_VIE' => 
        array (
          'name' => 'DUREE_VIE',
          'type' => 'NUMBER',
          'length' => 0,
          'scale' => NULL,
          'precision' => NULL,
          'nullable' => true,
          'default' => NULL,
          'commentaire' => NULL,
        ),
        'CODE_INTERVENANT' => 
        array (
          'name' => 'CODE_INTERVENANT',
          'type' => 'VARCHAR2',
          'length' => 255,
          'scale' => NULL,
          'precision' => NULL,
          'nullable' => true,
          'default' => NULL,
          'commentaire' => NULL,
        ),
      ),
    ),
    'TBL_SERVICE' => 
@@ -17914,6 +17969,17 @@
          'default' => '0',
          'commentaire' => NULL,
        ),
        'DUREE_VIE' => 
        array (
          'name' => 'DUREE_VIE',
          'type' => 'NUMBER',
          'length' => 0,
          'scale' => NULL,
          'precision' => NULL,
          'nullable' => true,
          'default' => NULL,
          'commentaire' => 'Durée de vie de la pièce jointe',
        ),
      ),
    ),
    'TYPE_RESSOURCE' => 
@@ -35958,9 +36024,11 @@ WITH i_h AS (
)
SELECT
  i.annee_id                      annee_id,
  i.code code_intervenant,
  i.id                            intervenant_id,
  tpj.id                          type_piece_jointe_id,
  MAX(COALESCE(i_h.heures, 0))    heures_pour_seuil
  MAX(COALESCE(i_h.heures, 0))    heures_pour_seuil,
  COALESCE(tpjs.duree_vie,1) duree_vie
FROM
            intervenant                 i
@@ -35995,8 +36063,10 @@ WHERE
  AND (tpjs.fc = 0 OR i_h.fc > 0)
GROUP BY
  i.annee_id,
  i.code,
  i.id,
  tpj.id',
  tpj.id,
  tpjs.duree_vie',
    ),
    'V_TBL_PIECE_JOINTE_FOURNIE' => 
    array (
@@ -36004,16 +36074,17 @@ GROUP BY
      'definition' => 'CREATE OR REPLACE FORCE VIEW V_TBL_PIECE_JOINTE_FOURNIE AS
SELECT
  i.annee_id,
  i.code code_intervenant,
  pj.type_piece_jointe_id,
  pj.intervenant_id,
  pj.id piece_jointe_id,
  v.id validation_id,
  f.id fichier_id
  f.id fichier_id,
  (SELECT COALESCE(duree_vie,1) FROM type_piece_jointe_statut WHERE statut_intervenant_id = i.statut_id AND type_piece_jointe_id = pj.type_piece_jointe_id) as duree_vie
FROM
            piece_jointe          pj
       JOIN intervenant            i ON i.id = pj.intervenant_id
                                    AND i.histo_destruction IS NULL
       JOIN piece_jointe_fichier pjf ON pjf.piece_jointe_id = pj.id
       JOIN fichier                f ON f.id = pjf.fichier_id
                                    AND f.histo_destruction IS NULL
+6 −6
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ class PieceJointeController extends AbstractController
     */
    public function indexAction()
    {
        $this->initFilters();
        //$this->initFilters();

        $role = $this->getServiceContext()->getSelectedIdentityRole();

+5 −0
Original line number Diff line number Diff line
@@ -44,5 +44,10 @@
        <join-column name="ANNEE_ID" referenced-column-name="ID"/>
      </join-columns>
    </many-to-one>
    <field name="dureeVie" type="integer" column="DUREE_VIE" nullable="true" >
      <options>
        <option name="default">1</option>
      </options>
    </field>
  </entity>
</doctrine-mapping>
+8 −0
Original line number Diff line number Diff line
@@ -29,5 +29,13 @@
        <join-column name="ANNEE_ID" referenced-column-name="ID"/>
      </join-columns>
    </many-to-one>
    <field name="dureeVie" type="integer" column="DUREE_VIE" nullable="true" >
      <options>
        <option name="default">1</option>
      </options>
    </field>
    <field name="codeIntervenant" type="string" column="CODE_INTERVENANT" nullable="true" >
    </field>

  </entity>
</doctrine-mapping>
+7 −0
Original line number Diff line number Diff line
@@ -45,5 +45,12 @@
        <join-column name="ANNEE_ID" referenced-column-name="ID"/>
      </join-columns>
    </many-to-one>
    <field name="dureeVie" type="integer" column="DUREE_VIE" nullable="true" >
      <options>
        <option name="default">1</option>
      </options>
    </field>
    <field name="codeIntervenant" type="string" column="CODE_INTERVENANT" nullable="true" >
    </field>
  </entity>
</doctrine-mapping>
Loading