diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 72abef0..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/Resources/views/cea/solicitudes_mostar.html.twig b/app/Resources/views/cea/solicitudes_mostar.html.twig index 3b59c6f..e3f0a84 100644 --- a/app/Resources/views/cea/solicitudes_mostar.html.twig +++ b/app/Resources/views/cea/solicitudes_mostar.html.twig @@ -2,279 +2,576 @@ {% block stylesheets %} {{ parent() }} + {% endblock %} -{%block body %} - -
+{% block body %} + +
{% for message in app.session.flashBag.get('notice') %} -

{{ message }}

- - {%endfor %} +

{{ message }}

+ + {% endfor %}
-

Solicitud de Adscripción número CEA-{{adscripcion.idRolInstitucion.idInstitucion.idEjeParroquia.IdEje.abreviacion}}-{{ adscripcion.anoAdscripcion }}-{{adscripcion.correlativoAdscripcion}}: - {{ adscripcion.idRolInstitucion.idRol.idPersona.primerNombre }}, - {{ adscripcion.idRolInstitucion.idRol.idPersona.primerApellido }} -

+

Solicitud de Adscripción número + CEA-{{ todo.idInstitucion.idEjeParroquia.IdEje.abreviacion }} + -{{ todo.adscripcion.anoAdscripcion }}-{{ todo.adscripcion.correlativoAdscripcion }}: + {{ todo }} +

{% if servicio.idEstatus.id == 1 %} -

Estatus {{servicio.idEstatus}}

+

Estatus {{ servicio.idEstatus }}

{% elseif servicio.idEstatus.id == 3 %} -

Estatus {{servicio.idEstatus}}

+

Estatus {{ servicio.idEstatus }}

{% else %} -

Estatus {{servicio.idEstatus}}

- {% endif %} +

Estatus {{ servicio.idEstatus }}

+ {% endif %}
-
- -
+
+
-
- -
+
-
- - - -
- - +
+
- {% if escalas is not null %} -
- - - - - - {% for escala in escalas %} - - - - - - - {%endfor %} -
EscalafónFechaTipo
{{escala.idEscala }}{{escala.fechaEscala | date('d-m-Y') }}{{escala.idTipoEscala }}
- {% if adscripcion.oposicion is null %} + +
+ + +
+ + +
+ {% if todo.escalafones is not null %}
-
El Docente al momento de la solicitud informa no haber realizado Concurso de oposición
-
- - {% endif %} - - -
- {% endif %} - - - {% if adscripcion.idLineaInvestigacion is not null %} -
- -
    -
  • {{adscripcion.idLineaInvestigacion.idAreaInvestigacion}}
  • -
  • {{adscripcion.idLineaInvestigacion}}
  • -
-
- {% endif %} - - - {% if adscripcion.tituloTrabajo is not null %} -
- - -
- {% endif %} + + + + + + {% for escala in todo.escalafones %} + + + + + + + {% endfor %} +
EscalafónFechaTipo
{{ escala.idEscala }}{{ escala.fechaEscala | date('d-m-Y') }}{{ escala.idTipoEscala }}
+ {% if todo.adscripcion.oposicion is null %} +
+
El Docente al momento de la solicitud + informa no + haber realizado Concurso de oposición
+
+ + {% endif %} + + +
+ {% endif %} + + + {% if todo.adscripcion.idLineaInvestigacion is not null %} +
+ +
    +
  • {{ todo.adscripcion.idLineaInvestigacion.idAreaInvestigacion }}
  • +
  • {{ todo.adscripcion.idLineaInvestigacion }}
  • +
+
+ {% endif %} + + + {% if todo.adscripcion.tituloTrabajo is not null %} +
+ + +
+ {% endif %}
-
- -
-

Documentos Consignados

-
- - - -
-
- - - -
-

Constancia de Trabajo

-
-
-
- -
-
- - - -
-

Título de Pregrado

-
-
-
- - {% if adscripcion.postgrado is not null %} -
-
- - - -
-

Título de Postgrado

-
-
-
- {% endif %} - - {% if adscripcion.oposicion is not null %} -
-
- - - -
-

Concurso de Oposición

-
-
-
- {% endif %} - - - - {% if adscripcion.asistente is not null %} -
-
- - - -
-

Ascenso Asistente

-
-
-
- {% endif %} - - {% if adscripcion.agreado is not null %} -
-
- - - -
-

Ascenso Agregado

-
-
-
- {% endif %} - - - {% if adscripcion.asociado is not null %} -
-
- - - -
-

Ascenso Asociado

-
-
-
- {% endif %} - - {% if adscripcion.titular is not null %} -
-
- - - -
-

Ascenso Titular

-
-
-
- {% endif %} - - - - - - - - - +
+
+

Documentos Consignados

+ +
+ + {% for verificado in todo.documentosVerificados %} + {{ dump(verificado.idTipoDocumentos.identificador)}} +
+
+ + + +
+

Constancia de Trabajo

+
+ + + +
+
+
+
+
+ {% endfor %} +
+
+ + + +
+

Constancia de Trabajo

+
+ + + + +
+
+
+
+
+ +
+
+ + + +
+

Título de Pregrado

+
+ + + + +
+
+
+ +
+
+ + {% if todo.adscripcion.postgrado is not null %} +
+
+ + + +
+

Título de Postgrado

+
+ + + + +
+
+
+
+
+ {% endif %} + + {% if todo.adscripcion.oposicion is not null %} +
+
+ + + +
+

Concurso de Oposición

+
+ + + + + +
+
+
+
+
+ {% endif %} + + + + {% if todo.adscripcion.asistente is not null %} +
+
+ + + +
+

Ascenso Asistente

+
+ + + + +
+
+
+
+
+ {% endif %} + + {% if todo.adscripcion.agreado is not null %} +
+
+ + + +
+

Ascenso Agregado

+
+ + + + +
+
+
+
+
+ {% endif %} + + + {% if todo.adscripcion.asociado is not null %} +
+
+ + + +
+

Ascenso Asociado

+
+ + + + +
+
+
+
+
+ {% endif %} + + {% if todo.adscripcion.titular is not null %} +
+
+ + + +
+

Ascenso Titular

+
+ + + + +
+
+
+
+
+ {% endif %} + + +
+ +
- - -
- - {% if not pida %} -

El Docente no ha registrado todavía su actividad PIDA

- {% else %} -
- + + {% if not todo.pida %} +

El Docente no ha registrado todavía su actividad PIDA

+ {% else %} +
+ + {% for pida in todo.pida %}
    -
  • Objetivo Estratégico: {{pida.idPlanHistoricoNacionalEstrategico.nombre}}
  • +
  • Objetivo Estratégico: {{ pida.idPlanHistoricoNacionalEstrategico.nombre }}
  • Ámbito: {{ pida.idActividadDocente.nombre }}
  • Objetivo Específico: {{ pida.ObjetivoEspecifico }}
  • Fecha inicio: {{ pida.fechaInicio | date('d-m-Y') }}
  • Fecha final: {{ pida.fechaFinal | date('d-m-Y') }}
  • - -
-
- {% endif %} -  Aprobar -  Rechazar - - - - + + + {% endfor %} + +
+ {% endif %} + + Rechazar + + + +
- +
- + {% endblock %} {% block javascripts %} {{ parent() }} - {% endblock %} \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/src/AppBundle/Controller/AdscripcionController.php b/src/AppBundle/Controller/AdscripcionController.php index ff9771e..6b518e9 100644 --- a/src/AppBundle/Controller/AdscripcionController.php +++ b/src/AppBundle/Controller/AdscripcionController.php @@ -8,7 +8,7 @@ namespace AppBundle\Controller; -use AppBundle\Form\UserType; +use AppBundle\Entity\DocumentosVerificados; use Symfony\Component\HttpFoundation\File\UploadedFile; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; @@ -38,6 +38,7 @@ class AdscripcionController extends Controller $adscripcion = new Adscripcion(); $escala = new DocenteEscala(); + /** @var TYPE_NAME $form */ $form = $this->createForm('AppBundle\Form\UserType'); $form->handleRequest($request); @@ -45,8 +46,9 @@ class AdscripcionController extends Controller $form->get('escala')->getData(); if ($form->isSubmitted() && $form->isValid()) { + $em = $this->getDoctrine()->getManager(); //var_dump($form->get('lineas_investigacion')->getData()); exit; - + verificar_documentos($this->getUser()->getIdRolInstitucion()->getId(), 1, 2, $em); // $file stores the uploaded PDF file /** @var UploadedFile $constanciaTrabajo */ $constanciaTrabajo = $form->get('trabajo')->getData(); @@ -71,7 +73,7 @@ class AdscripcionController extends Controller $nombrePregrado ); thumbnail($nombrePregrado, $this->container->getParameter('adscripcion_directory'), $this->container->getParameter('adscripcion_thumb_directory')); - + verificar_documentos($this->getUser()->getIdRolInstitucion()->getId(), 2, 2, $em); if($form->get('postgrado')->getData()) { /** @var UploadedFile $constanciaPostgrado */ $constanciaPostgrado = $form->get('postgrado')->getData(); @@ -82,11 +84,12 @@ class AdscripcionController extends Controller ); thumbnail($nombrePostgrado, $this->container->getParameter('adscripcion_directory'), $this->container->getParameter('adscripcion_thumb_directory')); $adscripcion->setPostgrado($nombrePostgrado); + verificar_documentos($this->getUser()->getIdRolInstitucion()->getId(), 3, 2, $em); } - $em = $this->getDoctrine()->getManager(); + $adscripcion->setTrabajo($nombreTrabajo); - $adscripcion->setPregrado($nombrePregrado); + $adscripcion->setPregrado($nombrePregrado); $adscripcion->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); $adscripcion->setFechaIngreso($form->get('fecha_ingreso')->getData()); $adscripcion->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(2)); @@ -121,7 +124,8 @@ class AdscripcionController extends Controller $nombreOposicion ); thumbnail($nombreOposicion, $this->container->getParameter('adscripcion_directory'), $this->container->getParameter('adscripcion_thumb_directory')); - $adscripcion->setOposicion($nombreOposicion); + $adscripcion->setOposicion($nombreOposicion); + verificar_documentos($this->getUser()->getIdRolInstitucion()->getId(), 4, 2, $em); } @@ -135,6 +139,7 @@ class AdscripcionController extends Controller $escala2->setIdEscala($asistente); $escala2->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); $em->persist($escala2); + verificar_documentos($this->getUser()->getIdRolInstitucion()->getId(), 5, 2, $em); $constanciaAsistente = $form->get('documento_asistente')->getData(); $nombreAsistente = md5(uniqid()).'.'.$constanciaAsistente->guessExtension(); @@ -156,6 +161,7 @@ class AdscripcionController extends Controller $escala3->setIdEscala($asociado); $escala3->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); $em->persist($escala3); + verificar_documentos($this->getUser()->getIdRolInstitucion()->getId(), 6, 2, $em); $constanciaAsociado = $form->get('documento_asociado')->getData(); $nombreAsociado = md5(uniqid()).'.'.$constanciaAsociado->guessExtension(); @@ -176,6 +182,7 @@ class AdscripcionController extends Controller $escala4->setIdEscala($agregado); $escala4->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); $em->persist($escala4); + verificar_documentos($this->getUser()->getIdRolInstitucion()->getId(), 7, 2, $em); $constanciaAgregado = $form->get('documento_agregado')->getData(); $nombreAgregado = md5(uniqid()).'.'.$constanciaAgregado->guessExtension(); @@ -196,6 +203,7 @@ class AdscripcionController extends Controller $escala5->setIdEscala($titular); $escala5->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById(2)); $em->persist($escala5); + verificar_documentos($this->getUser()->getIdRolInstitucion()->getId(), 8, 2, $em); $constanciaTitular = $form->get('documento_titular')->getData(); $nombreTitular = md5(uniqid()).'.'.$constanciaTitular->guessExtension(); @@ -365,24 +373,15 @@ class AdscripcionController extends Controller */ public function solicitudesAdscripcionShowAction(DocenteServicio $servicio) { - $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findBy(array( - 'idRolInstitucion' => $servicio->getIdRolInstitucion()->getId() - )); - - $adscripcion = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); - $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); - $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy(array( - 'idRolInstitucion' => $servicio->getIdRolInstitucion(), - - )); + $em = $this->getDoctrine()->getManager(); + $todo = $em->getRepository("AppBundle:RolInstitucion")->findOneById($servicio->getIdRolInstitucion()); + + return $this->render('cea/solicitudes_mostar.html.twig', array( - 'adscripcion' => $adscripcion, 'servicio' => $servicio, - 'escalas' => $escala, 'servicio' => $servicio, - 'pida' => $pida, - 'ascenso' => $ascenso + 'todo' => $todo )); } @@ -390,19 +389,41 @@ class AdscripcionController extends Controller /** * Encuentra y muestra una entidad de tipo Adscripción. * - * @Route("/solicitudes/actualizar/{id}/{estatus}", name="cea_solicitudes_actualizar") + * @Route("/solicitudes/actualizar/{id}", name="cea_solicitudes_actualizar") * @Method({"GET", "POST"}) * @Security("has_role('ROLE_COORDINADOR_REGIONAL')") */ - public function solicitudesAdscripcionEditAction(Adscripcion $adscripcion, $estatus, Request $request) + public function solicitudesAdscripcionEditAction(Adscripcion $adscripcion, Request $request) { + $em = $this->getDoctrine()->getManager(); $mensaje = ""; - //$adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneById($adscripcion->getId()); - $serviciosAdscripcion = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(array( + $serviciosAdscripcion = $em->getRepository('AppBundle:DocenteServicio')->findOneBy(array( 'idRolInstitucion' => $adscripcion->getIdRolInstitucion(), 'idServicioCe' => 2 )); - + $parametros = $request->request->all(); + + //Guardar el resultado de la verificación de Documentos + foreach ($parametros as $key => $value){ + if($key === 'trabajo') { + verificar_documentos($adscripcion, 1, $value, $em); + }else if($key === 'pregrado') { + verificar_documentos($adscripcion, 2, $value, $em); + }else if($key === 'postgrado') { + verificar_documentos($adscripcion, 3, $value, $em); + }else if($key === 'oposicion') { + verificar_documentos($adscripcion, 4, $value, $em); + }else if($key === 'asistente') { + verificar_documentos($adscripcion, 5, $value, $em); + }else if($key === 'agregado') { + verificar_documentos($adscripcion, 6, $value, $em); + }else if($key === 'asociado') { + verificar_documentos($adscripcion, 7, $value, $em); + }else if($key === 'titular') { + verificar_documentos($adscripcion, 8, $value, $em); + } + } + $serviciosPida = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(array( 'idRolInstitucion' => $adscripcion->getIdRolInstitucion(), @@ -410,7 +431,11 @@ class AdscripcionController extends Controller )); $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($adscripcion->getIdRolInstitucion()); - + if(isset($parametros['aprobar'])) { + $estatus = true; + }else{ + $estatus = false; + } if($estatus == "true") { $serviciosAdscripcion->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(1)); $serviciosPida->setIdEstatus($serviciosAdscripcion->getIdEstatus()); @@ -458,13 +483,8 @@ class AdscripcionController extends Controller $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findBy(array( 'idRolInstitucion' => $adscripcion->getIdRolInstitucion()->getId() )); - - return $this->render('cea/solicitudes_mostar.html.twig', array( - 'servicio' => $serviciosAdscripcion, - 'adscripcion' => $adscripcion, - 'escalas' => $escala, - 'pida' => $pida - )); + + return $this->redirect($this->generateUrl('cea_adscripcion_show', array('id' => $serviciosAdscripcion->getId()))); } @@ -553,3 +573,25 @@ function thumbnail ($filename, $fuente, $destino){ imagejpeg($nm, $destino . "/" . $filename); } + +function verificar_documentos($adscripcion, $tipo, $estatus, $em, $servicio = 2){ + $existe = $em->getRepository("AppBundle:DocumentosVerificados")->findOneBy(array( + 'idRolInstitucion' => $adscripcion, + 'idTipoDocumentos' => $tipo + )); + + if(!$existe) { + $verificacion = new DocumentosVerificados(); + $verificacion->setIdEstatus($em->getRepository("AppBundle:Estatus")->findOneById($estatus)); + $verificacion->setIdRolInstitucion($em->getRepository("AppBundle:RolInstitucion")->findOneById($adscripcion)); + $verificacion->setIdServicio($em->getRepository("AppBundle:ServiciosCe")->findOneById($servicio)); + $verificacion->setIdTipoDocumentos($em->getRepository("AppBundle:TipoDocumentos")->findOneById($tipo)); + $em->persist($verificacion); + $em->flush(); + }else{ + $existe->setIdEstatus($em->getRepository("AppBundle:Estatus")->findOneById($estatus)); + $em->persist($existe); + $em->flush(); + } + +} diff --git a/src/AppBundle/Entity/Adscripcion.php b/src/AppBundle/Entity/Adscripcion.php index 921a5bb..217b929 100644 --- a/src/AppBundle/Entity/Adscripcion.php +++ b/src/AppBundle/Entity/Adscripcion.php @@ -31,18 +31,19 @@ class Adscripcion * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1) */ private $id; - - + /** * @var \AppBundle\Entity\RolInstitucion * - * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion") + * @ORM\OneToOne(targetEntity="AppBundle\Entity\RolInstitucion", inversedBy="adscripcion") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false) * }) */ protected $idRolInstitucion; + + /** @ORM\Column(type="date", nullable=false, options={"comment" = "Fecha de de Ingreso a la Institucion"}) /** @@ -303,28 +304,7 @@ class Adscripcion } - /** - * Set idRolInstitucion - * - * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion - * @return Usuarios - */ - public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion = null) - { - $this->idRolInstitucion = $idRolInstitucion; - - return $this; - } - /** - * Get idRolInstitucion - * - * @return \AppBundle\Entity\RolInstitucion - */ - public function getIdRolInstitucion() - { - return $this->idRolInstitucion; - } @@ -504,4 +484,27 @@ class Adscripcion { return $this->correlativoAdscripcion; } + + /** + * Set idRolInstitucion + * + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion + * @return Adscripcion + */ + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion) + { + $this->idRolInstitucion = $idRolInstitucion; + + return $this; + } + + /** + * Get idRolInstitucion + * + * @return \AppBundle\Entity\RolInstitucion + */ + public function getIdRolInstitucion() + { + return $this->idRolInstitucion; + } } diff --git a/src/AppBundle/Entity/AdscripcionPida.php b/src/AppBundle/Entity/AdscripcionPida.php index 50ce432..5adb882 100644 --- a/src/AppBundle/Entity/AdscripcionPida.php +++ b/src/AppBundle/Entity/AdscripcionPida.php @@ -39,7 +39,7 @@ class AdscripcionPida /** * @var \AppBundle\Entity\RolInstitucion * - * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion") + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion", inversedBy="pida") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false) * }) diff --git a/src/AppBundle/Entity/Ascenso.php b/src/AppBundle/Entity/Ascenso.php index 56ae3c3..6b25364 100644 --- a/src/AppBundle/Entity/Ascenso.php +++ b/src/AppBundle/Entity/Ascenso.php @@ -30,7 +30,7 @@ class Ascenso /** * @var \AppBundle\Entity\RolInstitucion * - * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion") + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion", inversedBy="ascensos") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false) * }) diff --git a/src/AppBundle/Entity/DocenteEscala.php b/src/AppBundle/Entity/DocenteEscala.php index 59cfa6d..89c23ba 100644 --- a/src/AppBundle/Entity/DocenteEscala.php +++ b/src/AppBundle/Entity/DocenteEscala.php @@ -35,7 +35,7 @@ class DocenteEscala /** * @var \AppBundle\Entity\RolInstitucion * - * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion") + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion", inversedBy="escalafones") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false) * }) diff --git a/src/AppBundle/Entity/DocumentosVerificados.php b/src/AppBundle/Entity/DocumentosVerificados.php new file mode 100644 index 0000000..e0ed761 --- /dev/null +++ b/src/AppBundle/Entity/DocumentosVerificados.php @@ -0,0 +1,267 @@ +created = new \DateTime(); + $this->modified = new \DateTime(); + + } + + + /** + * @ORM\PreUpdate + */ + public function preUpdate() + { + $this->modified = new \DateTime(); + + } + + + + + /** + * Set created + * + * @param \DateTime $created + * @return Inscripcion + */ + public function setCreated($created) + { + $this->created = $created; + + return $this; + } + + /** + * Get created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->created; + } + + /** + * Set modified + * + * @param \DateTime $modified + * @return Inscripcion + */ + public function setModified($modified) + { + $this->modified = $modified; + + return $this; + } + + /** + * Get modified + * + * @return \DateTime + */ + public function getModified() + { + return $this->modified; + } + + + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set idEstatus + * + * @param \AppBundle\Entity\Estatus $idEstatus + * @return DocumentosVerificados + */ + public function setIdEstatus(\AppBundle\Entity\Estatus $idEstatus) + { + $this->idEstatus = $idEstatus; + + return $this; + } + + /** + * Get idEstatus + * + * @return \AppBundle\Entity\Estatus + */ + public function getIdEstatus() + { + return $this->idEstatus; + } + + /** + * Set idRolInstitucion + * + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion + * @return DocumentosVerificados + */ + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion) + { + $this->idRolInstitucion = $idRolInstitucion; + + return $this; + } + + /** + * Get idRolInstitucion + * + * @return \AppBundle\Entity\RolInstitucion + */ + public function getIdRolInstitucion() + { + return $this->idRolInstitucion; + } + + /** + * Set idTipoDocumentos + * + * @param \AppBundle\Entity\TipoDocumentos $idTipoDocumentos + * @return DocumentosVerificados + */ + public function setIdTipoDocumentos(\AppBundle\Entity\TipoDocumentos $idTipoDocumentos) + { + $this->idTipoDocumentos = $idTipoDocumentos; + + return $this; + } + + /** + * Get idTipoDocumentos + * + * @return \AppBundle\Entity\TipoDocumentos + */ + public function getIdTipoDocumentos() + { + return $this->idTipoDocumentos; + } + + /** + * Set idServicio + * + * @param \AppBundle\Entity\ServiciosCe $idServicio + * @return DocumentosVerificados + */ + public function setIdServicio(\AppBundle\Entity\ServiciosCe $idServicio) + { + $this->idServicio = $idServicio; + + return $this; + } + + /** + * Get idServicio + * + * @return \AppBundle\Entity\ServiciosCe + */ + public function getIdServicio() + { + return $this->idServicio; + } +} diff --git a/src/AppBundle/Entity/RolInstitucion.php b/src/AppBundle/Entity/RolInstitucion.php index 496b7c9..1e48d39 100644 --- a/src/AppBundle/Entity/RolInstitucion.php +++ b/src/AppBundle/Entity/RolInstitucion.php @@ -9,6 +9,7 @@ namespace AppBundle\Entity; +use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; /** @@ -59,6 +60,35 @@ class RolInstitucion */ private $idEstatus; + /** + * @ORM\OneToMany(targetEntity="AppBundle\Entity\AdscripcionPida", mappedBy="idRolInstitucion") + */ + private $pida; + + + /** + * @ORM\OneToMany(targetEntity="AppBundle\Entity\DocenteEscala", mappedBy="idRolInstitucion") + */ + private $escalafones; + + + /** + * @ORM\OneToMany(targetEntity="AppBundle\Entity\Ascenso", mappedBy="idRolInstitucion") + */ + private $ascensos; + + + /** + * @ORM\OneToMany(targetEntity="AppBundle\Entity\DocumentosVerificados", mappedBy="idRolInstitucion") + */ + private $documentosVerificados; + + + /** + * @ORM\OneToOne(targetEntity="AppBundle\Entity\Adscripcion", mappedBy="idRolInstitucion") + */ + private $adscripcion; + /** @@ -143,13 +173,181 @@ class RolInstitucion /** * Get __toString - * + * @return string * */ public function __toString() { - return $this->getIdRol()->getIdPersona()->getCedulaPasaporte(); + return $this->getIdRol()->getIdPersona()->getPrimerNombre() . ", " . $this->getIdRol()->getIdPersona()->getPrimerApellido(); + } + + + /** + * Constructor + */ + public function __construct() + { + $this->pida = new ArrayCollection(); + $this->escalafones = new ArrayCollection(); + $this->ascensos = new ArrayCollection(); + $this->documentosVerificados = new ArrayCollection(); + + } + + /** + * Add pida + * + * @param \AppBundle\Entity\AdscripcionPida $pida + * @return RolInstitucion + */ + public function addPida(\AppBundle\Entity\AdscripcionPida $pida) + { + $this->pida[] = $pida; + + return $this; + } + + /** + * Remove pida + * + * @param \AppBundle\Entity\AdscripcionPida $pida + */ + public function removePida(\AppBundle\Entity\AdscripcionPida $pida) + { + $this->pida->removeElement($pida); + } + + /** + * Get pida + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getPida() + { + return $this->pida; + } + + + + /** + * Set adscripcion + * + * @param \AppBundle\Entity\Adscripcion $adscripcion + * @return RolInstitucion + */ + public function setAdscripcion(\AppBundle\Entity\Adscripcion $adscripcion = null) + { + $this->adscripcion = $adscripcion; + + return $this; + } + + /** + * Get adscripcion + * + * @return \AppBundle\Entity\Adscripcion + */ + public function getAdscripcion() + { + return $this->adscripcion; + } + + /** + * Add escalafones + * + * @param \AppBundle\Entity\DocenteEscala $escalafones + * @return RolInstitucion + */ + public function addEscalafone(\AppBundle\Entity\DocenteEscala $escalafones) + { + $this->escalafones[] = $escalafones; + + return $this; + } + + /** + * Remove escalafones + * + * @param \AppBundle\Entity\DocenteEscala $escalafones + */ + public function removeEscalafone(\AppBundle\Entity\DocenteEscala $escalafones) + { + $this->escalafones->removeElement($escalafones); + } + + /** + * Get escalafones + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getEscalafones() + { + return $this->escalafones; } + /** + * Add ascensos + * + * @param \AppBundle\Entity\Ascenso $ascensos + * @return RolInstitucion + */ + public function addAscenso(\AppBundle\Entity\Ascenso $ascensos) + { + $this->ascensos[] = $ascensos; + + return $this; + } -} \ No newline at end of file + /** + * Remove ascensos + * + * @param \AppBundle\Entity\Ascenso $ascensos + */ + public function removeAscenso(\AppBundle\Entity\Ascenso $ascensos) + { + $this->ascensos->removeElement($ascensos); + } + + /** + * Get ascensos + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getAscensos() + { + return $this->ascensos; + } + + /** + * Add documentosVerificados + * + * @param \AppBundle\Entity\DocumentosVerificados $documentosVerificados + * @return RolInstitucion + */ + public function addDocumentosVerificado(\AppBundle\Entity\DocumentosVerificados $documentosVerificados) + { + $this->documentosVerificados[] = $documentosVerificados; + + return $this; + } + + /** + * Remove documentosVerificados + * + * @param \AppBundle\Entity\DocumentosVerificados $documentosVerificados + */ + public function removeDocumentosVerificado(\AppBundle\Entity\DocumentosVerificados $documentosVerificados) + { + $this->documentosVerificados->removeElement($documentosVerificados); + } + + /** + * Get documentosVerificados + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getDocumentosVerificados() + { + return $this->documentosVerificados; + } +} diff --git a/src/AppBundle/Entity/TipoDocumentos.php b/src/AppBundle/Entity/TipoDocumentos.php index 632b196..f6db179 100644 --- a/src/AppBundle/Entity/TipoDocumentos.php +++ b/src/AppBundle/Entity/TipoDocumentos.php @@ -25,6 +25,14 @@ class TipoDocumentos */ private $nombre; + + /** + * @var string + * + * @ORM\Column(name="identificador", type="string", length=255, nullable=false, options={"comment" = "Nombre para identificar la ruta del documento en la vista"}) + */ + private $identificador; + /** * @var integer * @@ -81,4 +89,27 @@ class TipoDocumentos } + + /** + * Set identificador + * + * @param string $identificador + * @return TipoDocumentos + */ + public function setIdentificador($identificador) + { + $this->identificador = $identificador; + + return $this; + } + + /** + * Get identificador + * + * @return string + */ + public function getIdentificador() + { + return $this->identificador; + } }