Merge branch 'master' of https://github.lci.ulsa.mx/PAAD/paad
This commit is contained in:
@@ -92,16 +92,32 @@ foreach($repEdo_rs as $redo){
|
|||||||
$drawing->setWorksheet($spreadsheet->getActiveSheet());
|
$drawing->setWorksheet($spreadsheet->getActiveSheet());
|
||||||
|
|
||||||
$spreadsheet->getActiveSheet()
|
$spreadsheet->getActiveSheet()
|
||||||
->setCellValue('A'.$row, 'Estado')
|
/*->setCellValue('A'.$row, 'Estado')
|
||||||
->setCellValue('B'.$row, 'Tipo')
|
->setCellValue('B'.$row, 'Tipo')
|
||||||
->setCellValue('C'.$row, 'Profesor')
|
->setCellValue('C'.$row, 'Profesor')
|
||||||
->setCellValue('D'.$row, 'Materia')
|
->setCellValue('D'.$row, 'Materia')
|
||||||
->setCellValue('E'.$row, 'Grupo')
|
->setCellValue('E'.$row, 'Grupo')
|
||||||
->setCellValue('F'.$row, 'Fecha falta')
|
->setCellValue('F'.$row, 'Fecha falta')
|
||||||
->setCellValue('G'.$row, 'Fecha reposición')
|
->setCellValue('G'.$row, 'Fecha reposición')
|
||||||
->setCellValue('H'.$row, 'Salón');
|
->setCellValue('H'.$row, 'Salón');*/
|
||||||
|
->setCellValue('A'.$row, 'Tipo de solicitud')
|
||||||
|
->setCellValue('B'.$row, 'Profesor')
|
||||||
|
->setCellValue('C'.$row, 'Dependencia')
|
||||||
|
->setCellValue('D'.$row, 'Carrera')
|
||||||
|
->setCellValue('E'.$row, 'Materia')
|
||||||
|
->setCellValue('F'.$row, 'Grupo')
|
||||||
|
->setCellValue('G'.$row, 'Ciclo')
|
||||||
|
->setCellValue('H'.$row, 'Bloque')
|
||||||
|
->setCellValue('I'.$row, 'Fecha de falta')
|
||||||
|
->setCellValue('J'.$row, 'Horario de falta inicio')
|
||||||
|
->setCellValue('K'.$row, 'Horario de falta fin')
|
||||||
|
->setCellValue('L'.$row, 'Fecha de reposición')
|
||||||
|
->setCellValue('M'.$row, 'Horario de reposición inicio')
|
||||||
|
->setCellValue('N'.$row, 'Horario de reposición fin')
|
||||||
|
->setCellValue('O'.$row, 'Tipo de aula')
|
||||||
|
->setCellValue('P'.$row, 'Salón');
|
||||||
|
|
||||||
$spreadsheet->getActiveSheet()->getStyle('A'.$row.':H'.$row)->applyFromArray($headerStyle);
|
$spreadsheet->getActiveSheet()->getStyle('A'.$row.':P'.$row)->applyFromArray($headerStyle);
|
||||||
$repoParams[":edo"]=$redo["estado_reposicion_id"];
|
$repoParams[":edo"]=$redo["estado_reposicion_id"];
|
||||||
if($user->rol["rol_id"] == 7){//es supervisor
|
if($user->rol["rol_id"] == 7){//es supervisor
|
||||||
$repoParams[":sup"] = $user->user["id"];
|
$repoParams[":sup"] = $user->user["id"];
|
||||||
@@ -115,28 +131,43 @@ foreach($repEdo_rs as $redo){
|
|||||||
$sheet->setTitle($redo["estado_nombre"]);
|
$sheet->setTitle($redo["estado_nombre"]);
|
||||||
if(isset($solicitudes_rs) && count($solicitudes_rs)>0){
|
if(isset($solicitudes_rs) && count($solicitudes_rs)>0){
|
||||||
foreach($solicitudes_rs as $reposicion){
|
foreach($solicitudes_rs as $reposicion){
|
||||||
|
/* RETURNS TABLE(solicitud_id integer, horario_id integer, fecha_nueva date, hora_nueva time without time zone, hora_nueva_fin time without time zone,
|
||||||
|
profesor_id integer, profesor_nombre character varying, profesor_clave character varying, descripcion text, estado_reposicion_id integer,
|
||||||
$sheet->setCellValue('A'.$row, $reposicion["estado_nombre"]);
|
estado_nombre character varying, estado_color character varying, alumnos integer, fecha_clase date, tipoaula_id integer, tipoaula_nombre character varying,
|
||||||
$sheet->setCellValue('B'.$row, $reposicion["solicitudtipo_nombre"]);
|
tipoaula_supervisor boolean, solicitudtipo_id integer, solicitudtipo_nombre character varying, salon_id integer, salon_nombre character varying,
|
||||||
$sheet->setCellValue('C'.$row, $reposicion["profesor_clave"]." - ".$reposicion["profesor_nombre"]);
|
salon_array json, usuario_id integer, usuario_nombre character varying, bloque integer, ciclo integer, duracion_interval interval, supervisor_id integer,
|
||||||
$sheet->setCellValue('D'.$row, $reposicion["materia_nombre"]);
|
supervisor_nombre character varying, facultad_id integer, facultad_nombre character varying, clave_dependencia character varying, carrera_nombre character varying,
|
||||||
|
materia_id integer, materia_nombre character varying, horario_grupo character varying, horario_hora time without time zone, horario_hora_fin time without time zone,
|
||||||
|
motivo_cancelacion text, horario_dia integer, horario_carrera character varying, carrera_comun boolean)
|
||||||
|
*/
|
||||||
|
$sheet->setCellValue('A'.$row, $reposicion["solicitudtipo_nombre"]);
|
||||||
|
$sheet->setCellValue('B'.$row, $reposicion["profesor_clave"]." - ".$reposicion["profesor_nombre"]);
|
||||||
|
$sheet->setCellValue('C'.$row, $reposicion["facultad_nombre"]);
|
||||||
|
$sheet->setCellValue('D'.$row, $reposicion["carrera_nombre"]);
|
||||||
|
$sheet->setCellValue('E'.$row, $reposicion["materia_nombre"]);
|
||||||
if($reposicion["horario_grupo"]!="")
|
if($reposicion["horario_grupo"]!="")
|
||||||
$sheet->setCellValue('E'.$row, $reposicion["horario_grupo"]);
|
$sheet->setCellValue('F'.$row, $reposicion["horario_grupo"]);
|
||||||
|
else
|
||||||
if($reposicion["fecha_clase"]!=""){
|
$sheet->setCellValue('F'.$row, "Sin grupo");
|
||||||
$fechaI = DateTime::createFromFormat('Y-m-d', $reposicion["fecha_nueva"])->format('d/m/Y');
|
$sheet->setCellValue('G'.$row, $reposicion["ciclo"]);
|
||||||
$sheet->setCellValue('F'.$row, $fechaI." ".substr($reposicion["horario_hora"],0, 5));
|
$sheet->setCellValue('H'.$row, $reposicion["bloque"]);
|
||||||
|
if(!empty($reposicion["fecha_clase"])){
|
||||||
|
$fechaI = DateTime::createFromFormat('Y-m-d', $reposicion["fecha_clase"])->format('d/m/Y');
|
||||||
|
$sheet->setCellValue('I'.$row, $fechaI);
|
||||||
|
$sheet->setCellValue('J'.$row, "".substr($reposicion["horario_hora"],0, 5));
|
||||||
|
$sheet->setCellValue('K'.$row, "".substr($reposicion["horario_hora_fin"],0, 5));
|
||||||
}
|
}
|
||||||
|
$fechaF = DateTime::createFromFormat('Y-m-d', $reposicion["fecha_nueva"])->format('d/m/Y');
|
||||||
$fechaF = date("d/m/Y", strtotime($reposicion["fecha_nueva"]));
|
$sheet->setCellValue('L'.$row, $fechaF);
|
||||||
$sheet->setCellValue('G'.$row, $fechaF." ".substr($reposicion["hora_nueva"],0, 5)." a ".substr($reposicion["hora_nueva_fin"],0, 5));
|
$sheet->setCellValue('M'.$row, "".substr($reposicion["hora_nueva"],0, 5));
|
||||||
|
$sheet->setCellValue('N'.$row, "".substr($reposicion["hora_nueva_fin"],0, 5));
|
||||||
|
$sheet->setCellValue('O'.$row, $reposicion["tipoaula_nombre"]);
|
||||||
if($reposicion["salon_id"] != ""){
|
if($reposicion["salon_id"] != ""){
|
||||||
$salon_json = json_decode($reposicion["salon_array"], true);
|
$salon_json = json_decode($reposicion["salon_array"], true);
|
||||||
$sheet->setCellValue('H'.$row, $salon_json[count($salon_json)-1]);
|
$sheet->setCellValue('P'.$row, $salon_json[count($salon_json)-1]);
|
||||||
}else
|
}else
|
||||||
$sheet->setCellValue('H'.$row, "Pendiente");
|
$sheet->setCellValue('P'.$row, "Pendiente");
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
}//foreach
|
}//foreach
|
||||||
@@ -145,7 +176,7 @@ foreach($repEdo_rs as $redo){
|
|||||||
foreach ($sheet->getColumnIterator() as $column) {
|
foreach ($sheet->getColumnIterator() as $column) {
|
||||||
$sheet->getColumnDimension($column->getColumnIndex())->setAutoSize(true);
|
$sheet->getColumnDimension($column->getColumnIndex())->setAutoSize(true);
|
||||||
}
|
}
|
||||||
$sheet->setAutoFilter('A'.$row_base.':H'.$row_base);
|
$sheet->setAutoFilter('A'.$row_base.':P'.$row_base);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$spreadsheet->setActiveSheetIndex(0);
|
$spreadsheet->setActiveSheetIndex(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user