2021-04 30 17:43:55 Nuevo(87101017,1) Caso :11 2021-04 30 17:43:56 cargar datos del sujeto(,,s,107,11) select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso from wf_caso_107 w inner join core_sujetoverificacion s on w.id=11 AND s.id =w.core_sujetoverificacion_id inner join plan_municipio m on s.plan_municipio_id=m.id inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id 2021-04 30 17:43:56 tabla dat adic select tabla from core_sujetoverificaciontipo where id=7 2021-04 30 17:43:56 tabla :core_sujetoverificaciongeneral SELECT * FROM core_sujetoverificaciongeneral where id=87101017 CasoSeguimiento :18 EjecutarTarea_277() Formulario de reubicacion id_comp1117 1 ValidarUsuario(277):1 EjecutarPaso_454: form:42 , caso=11 id_comp 1117 Mostrar form fin 2021-04-30 17:43:56 /******************************************************************************************************/ 2021-04-30 17:43:56TraerCaso(11,107,) CargarCaso :11 2021-04 30 17:43:56 CargarDatos: Caso :11 cargar datos de ejecucion de los ultimos pasos select p.*,b.wf_tarea_id as tarea_id, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec from (select max(id) as id, wf_caso_107_seguimiento_id,wf_paso_id from wf_caso_107_pasos a1 group by wf_caso_107_seguimiento_id,wf_paso_id order by id )a inner join wf_caso_107_pasos p using(id,wf_caso_107_seguimiento_id) inner join ( select max(id) as wf_caso_107_seguimiento_id,wf_caso_107_id,wf_tarea_id from wf_caso_107_seguimiento where wf_caso_107_id =? group by wf_caso_107_id,wf_tarea_id order by wf_caso_107_id,wf_caso_107_seguimiento_id ) b using(wf_caso_107_seguimiento_id) left join usuarios u using(core_usuario_id) where tabla not in ('sce.t53') Error : cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos) select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from wf_caso_107_seguimiento a inner join ( select max(b0.id) as id,b0.wf_caso_107_id,b0.wf_tarea_id from wf_caso_107_seguimiento b0 where b0.wf_caso_107_id =? group by b0.wf_caso_107_id,b0.wf_tarea_id order by wf_caso_107_id,id ) b using(id) left join usuarios u using(core_usuario_id) left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol {"0":"18","id":"18","1":"11","wf_caso_107_id":"11","2":"277","wf_tarea_id":"277","3":null,"core_usuario_id":null,"4":"2021-04-30 17:43:55","fec_asig":"2021-04-30 17:43:55","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"277","wf_tarea_id_sig":"277","8":null,"usr_asig":null,"9":null,"usr_resol":null} 2021-04 30 17:43:56 cargar datos del sujeto(,,s,107,11) select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso from wf_caso_107 w inner join core_sujetoverificacion s on w.id=11 AND s.id =w.core_sujetoverificacion_id inner join plan_municipio m on s.plan_municipio_id=m.id inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id 2021-04 30 17:43:56 tabla dat adic select tabla from core_sujetoverificaciontipo where id=7 2021-04 30 17:43:56 tabla :core_sujetoverificaciongeneral SELECT * FROM core_sujetoverificaciongeneral where id=87101017 fin 2021-04-30 17:43:56 /******************************************************************************************************/ 2021-04-30 17:44:10TraerCaso(11,107,) CargarCaso :11 2021-04 30 17:44:10 CargarDatos: Caso :11 cargar datos de ejecucion de los ultimos pasos select p.*,b.wf_tarea_id as tarea_id, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec from (select max(id) as id, wf_caso_107_seguimiento_id,wf_paso_id from wf_caso_107_pasos a1 group by wf_caso_107_seguimiento_id,wf_paso_id order by id )a inner join wf_caso_107_pasos p using(id,wf_caso_107_seguimiento_id) inner join ( select max(id) as wf_caso_107_seguimiento_id,wf_caso_107_id,wf_tarea_id from wf_caso_107_seguimiento where wf_caso_107_id =? group by wf_caso_107_id,wf_tarea_id order by wf_caso_107_id,wf_caso_107_seguimiento_id ) b using(wf_caso_107_seguimiento_id) left join usuarios u using(core_usuario_id) where tabla not in ('sce.t53') Error : cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos) select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from wf_caso_107_seguimiento a inner join ( select max(b0.id) as id,b0.wf_caso_107_id,b0.wf_tarea_id from wf_caso_107_seguimiento b0 where b0.wf_caso_107_id =? group by b0.wf_caso_107_id,b0.wf_tarea_id order by wf_caso_107_id,id ) b using(id) left join usuarios u using(core_usuario_id) left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol {"0":"18","id":"18","1":"11","wf_caso_107_id":"11","2":"277","wf_tarea_id":"277","3":null,"core_usuario_id":null,"4":"2021-04-30 17:43:55","fec_asig":"2021-04-30 17:43:55","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"277","wf_tarea_id_sig":"277","8":null,"usr_asig":null,"9":null,"usr_resol":null} 2021-04 30 17:44:10 cargar datos del sujeto(,,s,107,11) select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso from wf_caso_107 w inner join core_sujetoverificacion s on w.id=11 AND s.id =w.core_sujetoverificacion_id inner join plan_municipio m on s.plan_municipio_id=m.id inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id 2021-04 30 17:44:10 tabla dat adic select tabla from core_sujetoverificaciontipo where id=7 2021-04 30 17:44:10 tabla :core_sujetoverificaciongeneral SELECT * FROM core_sujetoverificaciongeneral where id=87101017 2021-04 30 17:44:10 Continuar(s,277,454,) EjecutarTarea_277() Formulario de reubicacion id_comp1117 1 ValidarUsuario(277):1 EjecutarPaso_454: form:42 , caso=11 id_comp 1117 Paso::Guardar(Caso:11) Datos a guardar: Array ( [wf_proceso_id] => 107 [wf_paso_id] => 454 [wf_tarea_id] => 277 [wf_caso_id] => 11 [id] => 1117 [accion] => nextPaso [reg] => s [rta] => n [cod_formulario2] => 42 [id_periodo] => 2021 [obs_ingreso] => [cod_bloque] => 242 [oid] => [oid_maestro] => [2533] => 124 [2534] => 2 [2535] => sa [2536] => 2021-04-23 ) OID: 17 rta: 1 dato:17 tabla:sce.t42 CasoPaso:8 CargarDatos_454(17) se carga 107_277_454_42_242_25362021-04-23 se carga 107_277_454_42_242_2535sa se carga 107_277_454_42_242_25342 se carga 107_277_454_42_242_2533124 SiguientePasoDe454: Funcion para ejecutar el siguiente paso Condicion Tarea : true TerminarTarea(277,278) Ultimo seg :18 Ultimo seg :19 EjecutarTarea_278() Acta id_comp1117 1 1 ValidarUsuario(278):1 EjecutarPaso_455: docs:102 , caso=11 id_comp 1117 Mostrar docs $tit_formato='SEGUIMIENTO DE PETICIONES, QUEJAS, RECLAMOS Y/O SOLICITUDES PGGS'; /*-------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------*/ require_once($root.'/lib/tcpdf/config/lang/eng.php'); require_once($root.'/lib/tcpdf/tcpdf.php'); //-------------------------------------------------------------------------- class MYPDF extends TCPDF { //Page header public function Header() { // Logo //echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']); $codigo='GCSP-F-135'; $versión='001'; $fecha='05/09/2014'; $titulo='SEGUIMIENTO DE PETICIONES, QUEJAS, RECLAMOS Y/O SOLICITUDES PGGS'; $cab=$CONFIG['CABECERA_REPORTES']; $h="'".str_replace(array('$root_js','_LOGO_','_TITULO_','_CODFORM_','_VERSION_','_FECHAACTUAL_','border="1"'), array($root_js,$root_js.$CONFIG['LOGO_REPORTES'],'BANCO DE PROGRAMAS Y PROYECTOS DE INVERSIÓN DEPARTAMENTAL',' BPI-FVR01',' 01',' 03-12-2014','border="1" bordercolor="#000000"'), $cab)."'"; $image_file = K_PATH_IMAGES.'logo_uds_3.png'; $image_file2 = K_PATH_IMAGES.'logo_ani.jpg'; $htm='<table width="100%" height="5%" border="0.2" cellspacing="0" bordercolor="#000000" cellpadding="3" style="font-size:8pt" > <tr> <td rowspan="3" width="15%"><img src="'.$image_file2.'" alt="a" /></td> <td colspan="2" width="50%"><div align="center"><strong>SISTEMA INTEGRADO DE GESTIÓN</strong></div></td> <td rowspan="3" width="15%"><img src="'.$image_file.'" alt="a" /></td> <td width="20%"><strong>Código:</strong> '.$codigo.'</td> </tr> <tr> <td width="12%"><strong>PROCESO</strong></td> <td width="38%"><div align="center">GESTIÓN CONTRACTUAL Y SEGUIMIENTO DE PROYECTOS DE INFRAESTRUCTURA DE TRANSPORTE</div></td> <td><strong>Versión:</strong> '.$versión.'</td> </tr> <tr> <td><strong>FORMATO</strong></td> <td><div align="center">'.$titulo.'</div></td> <td><strong>Fecha:</strong> '.$fecha.'</td> </tr> </table>'; $this->writeHTMLCell( 0, 0, '', '', $htm, 0,1, 0, true, 'top', true); } // Page footer public function Footer() { // Position at 15 mm from bottom $this->SetY(-18); $this->writeHTMLCell( 0, 0, '', '', "<div align=\"center\">Avenida Calle 26 Nro. 59-51 Torre 4 y/o Calle 24A Nro. 59-42 Torre 4 Piso 2 <br/>PBX: 4848860-www.ani.gov.co, Nit 830125996-9 </div>", 0,1, 0, true, 'top', true); } } //-------------------------------------------------------------------------- // create new PDF document $pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false); // set document information $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor('Siti'); $pdf->SetTitle('Seguimiento'); $pdf->SetSubject('Certificado'); $pdf->SetKeywords('TCPDF, PDF, example, test, guide'); // set default header data $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); // set header and footer fonts $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_MAIN, '', 8)); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); // set margins $pdf->SetMargins(PDF_MARGIN_LEFT, 45, PDF_MARGIN_RIGHT); $pdf->SetHeaderMargin(13); $pdf->SetFooterMargin(40); // set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); // set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set some language-dependent strings $pdf->setLanguageArray($l); // --------------------------------------------------------- // NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file. // set font $pdf->SetFont('times', '', 10); // add a page $pdf->AddPage(); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $fils=4; $cols=3; $logo_empresa=$CONFIG['LOGO_EMPRESA']; $codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER']; $izq=10+2;$der=10;$arr=10; $abj=10; $sxp=$fils*$cols; $tot=$rangoF-$rangoI+1; $pags=ceil(($tot)/$sxp); $anchoR=216-$izq-$der; $altoR=279-$arr-$abj; $anchoS=$anchoR/$cols; $margenSV=2; $margenSH=5; $altoS=$altoR/$fils; $altoImg=10; $altoText=8; $altoC=50; // set style for barcode $style = array( 'border' => 2, 'vpadding' => 'auto', 'hpadding' => 'auto', 'fgcolor' => array(0,0,0), 'bgcolor' => false, //array(255,255,255) 'module_width' => 1, // width of a single module in points 'module_height' => 1 // height of a single module in points ); $pdf->SetFont('times', '', 9, '', false); $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); $s=0;$p=1;$consc=$rangoI; $y=$arr; $x=$izq; // create some HTML content ob_start(); /*-------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------*/ $fecha_reg=' 95_267_433_1_195_2344 '; $sql="select oid_rad, extract (year from fecha_core_usuario_id_creacion )-2000 as anio_rad from sce.t1 where wf_caso_id=? order by oid desc"; $id='{"pro":"95","cas":"'.$this->caso->id.'"}'; $rs_u=$con->Execute($sql,$id); $fil_u=$rs_u->fetchRow(); $oid_1=$fil_u['oid_rad']; $anio_rad=$fil_u['anio_rad']; /*$anio_rad='select extract (year from fecha_core_usuario_id_creacion ) as anio from sce.t1 where wf_caso_id=?'; $id_rad='{"pro":"95","cas":"'.$this->caso->id.'"}'; $rs_u_rad=$con->Execute($anio_rad,$id_rad); $anio=$rs_u_rad['anio']-2000;*/ $anio=date('Y')-2000; $radicado_ing='GSAU'.str_pad($fil_u['oid_rad'], 4, "0", STR_PAD_LEFT).'-'.$anio_rad; if(!$_REQUEST['NRS'] || $_REQUEST['NRS']!='s') $radicado_sal='GSAUR'.str_pad($fil_u['oid_rad'], 4, "0", STR_PAD_LEFT).'-'.$anio_rad; else $radicado_sal='SIN RADICADO DE SALIDA'; $area=' 95_269_435_7_201_2379 '; $fecha_remision=' 95_270_436_8_202_2386 '; $avance_tram=' 95_272_439_12_206_2411 ';/*95_270_436_8_202_2387*/ $fecha_resp=' 95_272_439_12_206_2408 '; $res='95_272_439_12_206_2410'; if($res=='SÃ'){$resp1='<u><strong> x </strong></u>';}else {$resp1='__';} if($res=='No'){$resp2='<u><strong> x </strong></u>';}else {$resp2='__';} $estado='95_272_439_12_206_2412'; if($estado=='Abierto'){$estado1='<u><strong> x </strong></u>';}else {$estado1='__';} if($estado=='Cerrado'){$estado2='<u><strong> x </strong></u>';}else {$estado2='__';} $obs='95_272_439_12_206_2413'; $anexos='';/*95_272_439_12_206_2414*/ ?> <div align="center"><br /> <strong>PROYECTO DE CONCESIÓN RUMICHACA - PASTO<br /> CONTRATO DE CONCESIÓN NO. 15 DEL 11 DE SEPTIEMBRE DE 2015<br /><br /> PROGRAMA DE ATENCIÓN AL USUARIO<br /> SEGUIMIENTO DE PETICIONES, QUEJAS, RECLAMOS Y/O SOLICITUDES </strong><br /><br /> </div> <table width="100%" border="1"> <tr> <td width="50%"><strong>Fecha de ingreso: </strong><?php echo $fecha_reg;?></td> <td width="50%"><strong>Radicado de Ingreso: </strong><?php echo $radicado_ing;?></td> </tr> </table> <br /> <table width="100%" border="1"> <tr> <td width="50%"><strong>Area responsable del trámite: </strong><?php echo $area;?></td> <td width="50%"><strong>Fecha de remisión: </strong><?php echo $fecha_remision;?></td> </tr> </table> <br /> <table width="100%" border="1"> <tr> <td valign="top"><strong>Avance en el trámite: </strong><br /><?php echo $avance_tram;?></td> </tr> </table> <br /> <table width="100%" border="1"> <tr> <td width="50%"><strong>Fecha de respuesta: </strong><?php echo $fecha_resp;?></td> <td width="50%"><strong>Radicado de salida: </strong><?php echo $radicado_sal;?></td> </tr> </table> <br /> <table width="100%" border="1"> <tr> <td width="60%"><strong>Respuesta recibida a satisfacción por el peticionario</strong></td> <td width="20%">Si <?php echo $resp1;?></td> <td width="20%">No <?php echo $resp2;?></td> </tr> <tr> <td><strong>Estado del requerimiento</strong></td> <td>Abierto <?php echo $estado1;?></td> <td>Cerrado <?php echo $estado2;?></td> </tr> </table> <br /> <table width="100%" border="1"> <tr> <td ><strong>Observaciones: </strong><br /><?php echo nl2br($obs);?></td> </tr> <tr> <td><strong>Anexos: </strong><br /><?php echo $anexos;?></td> </tr> </table> <br /><br /> <table width="100%" border="1"> <tr> <td width="50%"><strong>Profesional Social Concesionario:</strong></td> <td width="50%"><strong>Profesional Social Interventoria que verifica:</strong></td> </tr> <tr> <td>Nombre:</td> <td>Nombre:</td> </tr> <tr> <td>Firma:</td> <td>Firma:</td> </tr> <tr> <td>Cédula:</td> <td>Cédula:</td> </tr> <tr> <td>Fecha revisión:</td> <td>Fecha revisión:</td> </tr> </table> <? /*-------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------*/ $html=ob_get_clean(); // output the HTML content $pdf->writeHTML($html, true, false,false,false); // reset pointer to the last page $pdf->lastPage(); $nomdoc=md5(time()).'.pdf'; $pdf->Output($root."/tmp/".$nomdoc, 'F'); $url=$root_js.'tmp/'.$nomdoc; Retorno : Array ( [ret] => inicioComponente_WF_DocSalida({"id":"1117","caso_id":"11","proceso_id":107,"tit":"Acta","tarea_id":278,"paso_id":455,"desc":"<strong>prueba<\/strong>: prueba","url":"<a href=\"http:\/\/201.182.250.54\/sisad16\/tmp\/ef701a419ccea82adf9277df76bbe70b.pdf\" target=\"_blank\" >De clic aquí para descargar el archivo<\/a><\/div>"}); [suc] => 1 ) fin 2021-04-30 17:44:11 /******************************************************************************************************/