Loading data/ddl.php +41 −6 Original line number Diff line number Diff line Loading @@ -14713,6 +14713,17 @@ 'default' => '0', 'commentaire' => 'NB d\'heures de seuil pour la demande', ), 'OBLIGATOIRE' => array ( 'name' => 'OBLIGATOIRE', 'type' => 'NUMBER', 'length' => 0, 'scale' => '0', 'precision' => 1, 'nullable' => false, 'default' => '1', 'commentaire' => NULL, ), ), ), 'TBL_PIECE_JOINTE_DEMANDE' => Loading Loading @@ -14790,6 +14801,17 @@ 'default' => '0', 'commentaire' => NULL, ), 'OBLIGATOIRE' => array ( 'name' => 'OBLIGATOIRE', 'type' => 'NUMBER', 'length' => 0, 'scale' => '0', 'precision' => NULL, 'nullable' => true, 'default' => NULL, 'commentaire' => NULL, ), ), ), 'TBL_PIECE_JOINTE_FOURNIE' => Loading Loading @@ -30259,7 +30281,8 @@ END UNICAEN_TBL;', CASE WHEN pjd.intervenant_id IS NULL THEN 0 ELSE 1 END demandee, CASE WHEN pjf.fichier = pjf.count THEN 1 ELSE 0 END fournie, CASE WHEN pjf.validation = pjf.count THEN 1 ELSE 0 END validee, NVL(pjd.heures_pour_seuil,0) heures_pour_seuil NVL(pjd.heures_pour_seuil,0) heures_pour_seuil, pjd.obligatoire obligatoire FROM tbl_piece_jointe_demande pjd FULL JOIN pjf ON pjf.type_piece_jointe_id = pjd.type_piece_jointe_id AND pjf.intervenant_id = pjd.intervenant_id) tv Loading @@ -30277,6 +30300,7 @@ END UNICAEN_TBL;', FOURNIE = v.FOURNIE, VALIDEE = v.VALIDEE, HEURES_POUR_SEUIL = v.HEURES_POUR_SEUIL, OBLIGATOIRE = v.OBLIGATOIRE, to_delete = 0 WHEN NOT MATCHED THEN INSERT ( Loading @@ -30289,6 +30313,7 @@ END UNICAEN_TBL;', FOURNIE, VALIDEE, HEURES_POUR_SEUIL, OBLIGATOIRE, TO_DELETE ) VALUES ( Loading @@ -30301,6 +30326,7 @@ END UNICAEN_TBL;', v.FOURNIE, v.VALIDEE, v.HEURES_POUR_SEUIL, v.OBLIGATOIRE, 0 ); Loading Loading @@ -30351,7 +30377,8 @@ END UNICAEN_TBL;', i.annee_id annee_id, 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, tpjs.obligatoire obligatoire FROM intervenant i Loading Loading @@ -30387,7 +30414,8 @@ END UNICAEN_TBL;', GROUP BY i.annee_id, i.id, tpj.id) tv tpj.id, tpjs.obligatoire) tv WHERE \' || conds || \' Loading @@ -30399,6 +30427,7 @@ END UNICAEN_TBL;', ANNEE_ID = v.ANNEE_ID, HEURES_POUR_SEUIL = v.HEURES_POUR_SEUIL, OBLIGATOIRE = v.OBLIGATOIRE, to_delete = 0 WHEN NOT MATCHED THEN INSERT ( Loading @@ -30408,6 +30437,7 @@ END UNICAEN_TBL;', TYPE_PIECE_JOINTE_ID, INTERVENANT_ID, HEURES_POUR_SEUIL, OBLIGATOIRE, TO_DELETE ) VALUES ( Loading @@ -30417,6 +30447,7 @@ END UNICAEN_TBL;', v.TYPE_PIECE_JOINTE_ID, v.INTERVENANT_ID, v.HEURES_POUR_SEUIL, v.OBLIGATOIRE, 0 ); Loading Loading @@ -35918,7 +35949,8 @@ SELECT CASE WHEN pjd.intervenant_id IS NULL THEN 0 ELSE 1 END demandee, CASE WHEN pjf.fichier = pjf.count THEN 1 ELSE 0 END fournie, CASE WHEN pjf.validation = pjf.count THEN 1 ELSE 0 END validee, NVL(pjd.heures_pour_seuil,0) heures_pour_seuil NVL(pjd.heures_pour_seuil,0) heures_pour_seuil, pjd.obligatoire obligatoire FROM tbl_piece_jointe_demande pjd FULL JOIN pjf ON pjf.type_piece_jointe_id = pjd.type_piece_jointe_id AND pjf.intervenant_id = pjd.intervenant_id', Loading Loading @@ -35949,7 +35981,8 @@ SELECT i.annee_id annee_id, 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, tpjs.obligatoire obligatoire FROM intervenant i Loading Loading @@ -35985,7 +36018,8 @@ WHERE GROUP BY i.annee_id, i.id, tpj.id', tpj.id, tpjs.obligatoire', ), 'V_TBL_PIECE_JOINTE_FOURNIE' => array ( Loading Loading @@ -36317,6 +36351,7 @@ WITH pj AS ( WHERE 1 = OSE_WORKFLOW.match_intervenant(intervenant_id) AND demandee > 0 AND obligatoire != 0 GROUP BY annee_id, intervenant_id module/Application/src/Application/Controller/PieceJointeController.php +5 −2 Original line number Diff line number Diff line Loading @@ -117,11 +117,13 @@ class PieceJointeController extends AbstractController $nbDemandees = 0; $nbFournies = 0; $nbValidees = 0; $nbObligatoiresNonFournis = 0; foreach ($demandees as $demandee) { if ($demandee->isObligatoire()) { $nbDemandees++; if (isset($fournies[$demandee->getId()])) { $pj = $fournies[$demandee->getId()]; if (isset($fournies[$demandee->getTypePieceJointe()->getId()])) { $pj = $fournies[$demandee->getTypePieceJointe()->getId()]; if (!$pj->getFichier()->isEmpty()) { $nbFournies++; if ($pj->getValidation()) { Loading @@ -130,6 +132,7 @@ class PieceJointeController extends AbstractController } } } } $msgs = []; Loading module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.TblPieceJointe.dcm.xml +5 −0 Original line number Diff line number Diff line Loading @@ -44,5 +44,10 @@ <join-column name="ANNEE_ID" referenced-column-name="ID"/> </join-columns> </many-to-one> <field name="obligatoire" type="integer" column="OBLIGATOIRE" nullable="false" > <options> <option name="default">1</option> </options> </field> </entity> </doctrine-mapping> module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.TblPieceJointeDemande.dcm.xml +5 −0 Original line number Diff line number Diff line Loading @@ -29,5 +29,10 @@ <join-column name="ANNEE_ID" referenced-column-name="ID"/> </join-columns> </many-to-one> <field name="obligatoire" type="integer" column="OBLIGATOIRE" nullable="false" > <options> <option name="default">1</option> </options> </field> </entity> </doctrine-mapping> module/Application/src/Application/Entity/Db/TblPieceJointe.php +16 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,11 @@ class TblPieceJointe */ private $annee; /** * @var integer */ private $obligatoire; /** Loading Loading @@ -140,5 +145,16 @@ class TblPieceJointe { return $this->annee; } public function isObligatoire() { if ($this->obligatoire) { return true; } return false; } } Loading
data/ddl.php +41 −6 Original line number Diff line number Diff line Loading @@ -14713,6 +14713,17 @@ 'default' => '0', 'commentaire' => 'NB d\'heures de seuil pour la demande', ), 'OBLIGATOIRE' => array ( 'name' => 'OBLIGATOIRE', 'type' => 'NUMBER', 'length' => 0, 'scale' => '0', 'precision' => 1, 'nullable' => false, 'default' => '1', 'commentaire' => NULL, ), ), ), 'TBL_PIECE_JOINTE_DEMANDE' => Loading Loading @@ -14790,6 +14801,17 @@ 'default' => '0', 'commentaire' => NULL, ), 'OBLIGATOIRE' => array ( 'name' => 'OBLIGATOIRE', 'type' => 'NUMBER', 'length' => 0, 'scale' => '0', 'precision' => NULL, 'nullable' => true, 'default' => NULL, 'commentaire' => NULL, ), ), ), 'TBL_PIECE_JOINTE_FOURNIE' => Loading Loading @@ -30259,7 +30281,8 @@ END UNICAEN_TBL;', CASE WHEN pjd.intervenant_id IS NULL THEN 0 ELSE 1 END demandee, CASE WHEN pjf.fichier = pjf.count THEN 1 ELSE 0 END fournie, CASE WHEN pjf.validation = pjf.count THEN 1 ELSE 0 END validee, NVL(pjd.heures_pour_seuil,0) heures_pour_seuil NVL(pjd.heures_pour_seuil,0) heures_pour_seuil, pjd.obligatoire obligatoire FROM tbl_piece_jointe_demande pjd FULL JOIN pjf ON pjf.type_piece_jointe_id = pjd.type_piece_jointe_id AND pjf.intervenant_id = pjd.intervenant_id) tv Loading @@ -30277,6 +30300,7 @@ END UNICAEN_TBL;', FOURNIE = v.FOURNIE, VALIDEE = v.VALIDEE, HEURES_POUR_SEUIL = v.HEURES_POUR_SEUIL, OBLIGATOIRE = v.OBLIGATOIRE, to_delete = 0 WHEN NOT MATCHED THEN INSERT ( Loading @@ -30289,6 +30313,7 @@ END UNICAEN_TBL;', FOURNIE, VALIDEE, HEURES_POUR_SEUIL, OBLIGATOIRE, TO_DELETE ) VALUES ( Loading @@ -30301,6 +30326,7 @@ END UNICAEN_TBL;', v.FOURNIE, v.VALIDEE, v.HEURES_POUR_SEUIL, v.OBLIGATOIRE, 0 ); Loading Loading @@ -30351,7 +30377,8 @@ END UNICAEN_TBL;', i.annee_id annee_id, 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, tpjs.obligatoire obligatoire FROM intervenant i Loading Loading @@ -30387,7 +30414,8 @@ END UNICAEN_TBL;', GROUP BY i.annee_id, i.id, tpj.id) tv tpj.id, tpjs.obligatoire) tv WHERE \' || conds || \' Loading @@ -30399,6 +30427,7 @@ END UNICAEN_TBL;', ANNEE_ID = v.ANNEE_ID, HEURES_POUR_SEUIL = v.HEURES_POUR_SEUIL, OBLIGATOIRE = v.OBLIGATOIRE, to_delete = 0 WHEN NOT MATCHED THEN INSERT ( Loading @@ -30408,6 +30437,7 @@ END UNICAEN_TBL;', TYPE_PIECE_JOINTE_ID, INTERVENANT_ID, HEURES_POUR_SEUIL, OBLIGATOIRE, TO_DELETE ) VALUES ( Loading @@ -30417,6 +30447,7 @@ END UNICAEN_TBL;', v.TYPE_PIECE_JOINTE_ID, v.INTERVENANT_ID, v.HEURES_POUR_SEUIL, v.OBLIGATOIRE, 0 ); Loading Loading @@ -35918,7 +35949,8 @@ SELECT CASE WHEN pjd.intervenant_id IS NULL THEN 0 ELSE 1 END demandee, CASE WHEN pjf.fichier = pjf.count THEN 1 ELSE 0 END fournie, CASE WHEN pjf.validation = pjf.count THEN 1 ELSE 0 END validee, NVL(pjd.heures_pour_seuil,0) heures_pour_seuil NVL(pjd.heures_pour_seuil,0) heures_pour_seuil, pjd.obligatoire obligatoire FROM tbl_piece_jointe_demande pjd FULL JOIN pjf ON pjf.type_piece_jointe_id = pjd.type_piece_jointe_id AND pjf.intervenant_id = pjd.intervenant_id', Loading Loading @@ -35949,7 +35981,8 @@ SELECT i.annee_id annee_id, 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, tpjs.obligatoire obligatoire FROM intervenant i Loading Loading @@ -35985,7 +36018,8 @@ WHERE GROUP BY i.annee_id, i.id, tpj.id', tpj.id, tpjs.obligatoire', ), 'V_TBL_PIECE_JOINTE_FOURNIE' => array ( Loading Loading @@ -36317,6 +36351,7 @@ WITH pj AS ( WHERE 1 = OSE_WORKFLOW.match_intervenant(intervenant_id) AND demandee > 0 AND obligatoire != 0 GROUP BY annee_id, intervenant_id
module/Application/src/Application/Controller/PieceJointeController.php +5 −2 Original line number Diff line number Diff line Loading @@ -117,11 +117,13 @@ class PieceJointeController extends AbstractController $nbDemandees = 0; $nbFournies = 0; $nbValidees = 0; $nbObligatoiresNonFournis = 0; foreach ($demandees as $demandee) { if ($demandee->isObligatoire()) { $nbDemandees++; if (isset($fournies[$demandee->getId()])) { $pj = $fournies[$demandee->getId()]; if (isset($fournies[$demandee->getTypePieceJointe()->getId()])) { $pj = $fournies[$demandee->getTypePieceJointe()->getId()]; if (!$pj->getFichier()->isEmpty()) { $nbFournies++; if ($pj->getValidation()) { Loading @@ -130,6 +132,7 @@ class PieceJointeController extends AbstractController } } } } $msgs = []; Loading
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.TblPieceJointe.dcm.xml +5 −0 Original line number Diff line number Diff line Loading @@ -44,5 +44,10 @@ <join-column name="ANNEE_ID" referenced-column-name="ID"/> </join-columns> </many-to-one> <field name="obligatoire" type="integer" column="OBLIGATOIRE" nullable="false" > <options> <option name="default">1</option> </options> </field> </entity> </doctrine-mapping>
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.TblPieceJointeDemande.dcm.xml +5 −0 Original line number Diff line number Diff line Loading @@ -29,5 +29,10 @@ <join-column name="ANNEE_ID" referenced-column-name="ID"/> </join-columns> </many-to-one> <field name="obligatoire" type="integer" column="OBLIGATOIRE" nullable="false" > <options> <option name="default">1</option> </options> </field> </entity> </doctrine-mapping>
module/Application/src/Application/Entity/Db/TblPieceJointe.php +16 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,11 @@ class TblPieceJointe */ private $annee; /** * @var integer */ private $obligatoire; /** Loading Loading @@ -140,5 +145,16 @@ class TblPieceJointe { return $this->annee; } public function isObligatoire() { if ($this->obligatoire) { return true; } return false; } }