ExportXls.php 47KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941
  1. <?php
  2. defined('BASEPATH') or exit('No direct script access allowed');
  3. use PhpOffice\PhpSpreadsheet\Spreadsheet;
  4. use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
  5. class ExportXls extends CI_Controller
  6. {
  7. private $filaDocumentoGeneral = 2;
  8. private $filaDocumentoTech = 2;
  9. private $filaDocumentoAdd = 2;
  10. private $filaDocumentoLegal = 2;
  11. private $filaProjectLot = 2;
  12. private $filaDatoLicitacion = 2;
  13. public function __construct()
  14. {
  15. parent::__construct();
  16. $this->load->model("Xlsexport_model");
  17. }
  18. public function index()
  19. {
  20. $licitaciones = $this->Xlsexport_model->getLicitaciones("HAVING LI.fecha_creacion_log = '2022-02-23 11:06:44'");
  21. insertBucleDuplicateOnKey($licitaciones['datos'], "vista_datos_licitacion", "");
  22. }
  23. public function exportDatosCompletos()
  24. {
  25. $licitacionesResult = $this->Xlsexport_model->getFullDatosUltimasInsertadas();
  26. $result = array();
  27. //$start = $this->starttime();
  28. if ($licitacionesResult['num_rows'] > 0) {
  29. $result = $this->mapearDatos($licitacionesResult);
  30. }
  31. $spreadsheet = new Spreadsheet();
  32. $spreadsheet->createSheet();
  33. $spreadsheet->createSheet();
  34. $spreadsheet->createSheet();
  35. $spreadsheet->createSheet();
  36. $spreadsheet->createSheet();
  37. $spreadsheet->createSheet();
  38. $spreadsheet->createSheet();
  39. $spreadsheet->createSheet();
  40. $spreadsheet->createSheet();
  41. $spreadsheet->createSheet();
  42. $spreadsheet->createSheet();
  43. $spreadsheet->createSheet();
  44. $spreadsheet->createSheet();
  45. $spreadsheet->createSheet();
  46. $spreadsheet = $this->cabecerasOpenPlacspFirstSheet($spreadsheet);
  47. $spreadsheet = $this->cabecerasOpenPlacsBitacora($spreadsheet, 1);
  48. $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 11);
  49. $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 12);
  50. $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 13);
  51. $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 14);
  52. $spreadsheet = $this->cabeceraMediosComunicacion($spreadsheet);
  53. $spreadsheet = $this->cabeceraMediosComunicacionDocumentos($spreadsheet);
  54. $spreadsheet = $this->cabeceraTenderResult($spreadsheet);
  55. $spreadsheet = $this->cabeceraTipoProcedimiento($spreadsheet);
  56. $spreadsheet = $this->cabeceraTenderingTerms($spreadsheet);
  57. $spreadsheet = $this->cabeceraCriterioADjudicacion($spreadsheet);
  58. $spreadsheet = $this->cabeceraCriteriosFinancieros($spreadsheet);
  59. $spreadsheet = $this->cabeceraCriteriosTecnicos($spreadsheet);
  60. $spreadsheet = $this->cabeceraRequisitosParticipacion($spreadsheet);
  61. $spreadsheet = $this->datosCompletosHojaLicitacion($spreadsheet, $result['hoja1']);
  62. $spreadsheet = $this->datosCompletosHojaBitacora($spreadsheet, $result);
  63. $spreadsheet = $this->datosCompletosMediosPublicacion($spreadsheet, $result['validNoticeInfo']);
  64. $spreadsheet = $this->datosMedioPublicacion($spreadsheet, $result['validNoticeInfoDocumentos']);
  65. $spreadsheet = $this->datosCriterioAdjudicacion($spreadsheet, $result['tenderFinancial']);
  66. $spreadsheet = $this->datosCriterioEvaluacionFinanciera($spreadsheet, $result['tenderAwarding']);
  67. $spreadsheet = $this->datosCriterioEvaluacionTecnica($spreadsheet, $result['tenderTecnicos']);
  68. $spreadsheet = $this->datosRequisitosParticipacion($spreadsheet, $result['tenderQualification']);
  69. $spreadsheet = $this->datosCompletosDocumentosGenerales($spreadsheet, $result['generalDocs']);
  70. $spreadsheet = $this->datosCompletosDocumentosAdicionales($spreadsheet, $result['additDocs']);
  71. $spreadsheet = $this->datosCompletosDocumentosTecnicos($spreadsheet, $result['techDocs']);
  72. $spreadsheet = $this->datosCompletosDocumentosLegales($spreadsheet, $result['legalDocs']);
  73. $spreadsheet = $this->datosCompletosTipoProcedimiento($spreadsheet, $result['tenderProcess']);
  74. $spreadsheet = $this->datosCompletosOfertas($spreadsheet, $result['tenderingTerms']);
  75. $spreadsheet = $this->datosCompletosResultadoDelProcedimiento($spreadsheet, $result['tenderResult']);
  76. $nombreAchivo = 'test.xlsx';
  77. $ruta = FCPATH . 'uploads/' . $nombreAchivo;
  78. guardar_log("Excel", "Guardando Datos en excel--");
  79. $writer = new Xlsx($spreadsheet);
  80. $writer->save($ruta);
  81. // Write the Excel file to filename some_excel_file.xlsx in the current directory
  82. // Redirect output to a client’s web browser (Excel5)
  83. guardar_log("Excel", "Enviando Excel");
  84. header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  85. header('Content-Disposition: attachment;filename=' . $nombreAchivo . '');
  86. header('Pragma: cache');
  87. header('Cache-Control: private');
  88. //$objWriter = PHPExcel_IOFactory::createWriter($spreadsheet, 'Excel2007');
  89. //$objWriter->save(FCPATH . 'uploads/' . $nombreAchivo);*/
  90. }
  91. public function starttime()
  92. {
  93. $r = explode(' ', microtime());
  94. $r = $r[1] + $r;
  95. return $r;
  96. }
  97. public function endtime($starttime)
  98. {
  99. $r = explode(' ', microtime());
  100. $r = $r[1] + $r;
  101. $r = round($r - $starttime, 4);
  102. return '<strong>Execution Time</strong>: ' . $r . ' seconds<br />';
  103. }
  104. public function mapearDatos($licitacionesResult): array
  105. {
  106. $result = array();
  107. guardar_log("Excel", "Montando array datos licitacion");
  108. foreach ($licitacionesResult['datos'] as $licitacion) {
  109. $result['hoja1'][$licitacion->id_licitacion]['licitacion'] = array(
  110. 'id_licitacion' => $licitacion->id_licitacion,
  111. "link_uri" => $licitacion->link_uri,
  112. "updated" => $licitacion->updated,
  113. );
  114. $result['hoja1'][$licitacion->id_licitacion]['contract'] = array(
  115. "descripcion" => $licitacion->contrato_status,
  116. "contractFolderStatusCode" => $licitacion->contractFolderStatusCode,
  117. "contractFolderID" => $licitacion->contractFolderID,
  118. );
  119. $result['hoja1'][$licitacion->id_licitacion]['locatedParty'] = array(
  120. "contractingPartyTypeCode" => $licitacion->contractingPartyTypeCode,
  121. "buyerProfileURIID" => $licitacion->buyerProfileURIID,
  122. "tipo_administracion" => $licitacion->tipo_administracion,
  123. "itemClassification_attr" => $licitacion->itemClassification_attr,
  124. );
  125. $result['hoja1'][$licitacion->id_licitacion]['party'] = array(
  126. "partyName" => $licitacion->partyName,
  127. "codpostal" => $licitacion->codpostal,
  128. "websiteURI" => $licitacion->websiteURI,
  129. "city" => $licitacion->city,
  130. "direccion" => $licitacion->direccion,
  131. "contact_name" => $licitacion->contact_name,
  132. "contact_email" => $licitacion->contact_email,
  133. "partyItem" => $licitacion->partyItem,
  134. "tipoIdParty" => $licitacion->tipoIdParty,
  135. );
  136. $result['hoja1'][$licitacion->id_licitacion]['project'] = array(
  137. "name" => $licitacion->nameProject,
  138. "estimatedOverallContractAmount" => $licitacion->estimatedOverallContractAmount,
  139. "taxExclusiveAmount" => $licitacion->taxExclusiveAmount,
  140. "totalAmount" => $licitacion->totalAmount,
  141. "tipo_contrato" => $licitacion->tipo_contrato,
  142. "countrySubentityCode" => $licitacion->countrySubentityCode,
  143. "countrySubentity" => $licitacion->countrySubentity,
  144. "durationMesure" => $licitacion->durationMesure,
  145. "medida" => $licitacion->medida,
  146. "duracion_inicio" => $licitacion->duracion_inicio,
  147. "duracion_fin" => $licitacion->duracion_fin,
  148. "contractExtension" => $licitacion->contractExtension,
  149. );
  150. $result['hoja1'][$licitacion->id_licitacion]['tenderProcess'] = array(
  151. "tipoTender" => $licitacion->tipoTender,
  152. "contrato_sistema" => $licitacion->contrato_sistema,
  153. "urgency" => $licitacion->urgency,
  154. "submision" => $licitacion->submision,
  155. );
  156. $result['hoja1'][$licitacion->id_licitacion]['tenderTerms'] = array(
  157. "procurementLegislationDocumentReference" => $licitacion->procurementLegislationDocumentReference,
  158. "allowedSubcontractTerms" => $licitacion->allowedSubcontractTerms,
  159. );
  160. }
  161. guardar_log("Excel", "Consulta Valid notice info");
  162. $result['validNoticeInfo'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_valid_notice_info");
  163. guardar_log("Excel", "Consulta Valid notice info documentos");
  164. $result['validNoticeInfoDocumentos'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_valid_notice_info_documento");
  165. guardar_log("Excel", "Consulta projectLot");
  166. $result['projectLot'] = $this->Xlsexport_model->getProjectLotItem();
  167. guardar_log("Excel", "Consulta documentos tecnicos");
  168. $result['techDocs'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_technical_documents");
  169. guardar_log("Excel", "Consulta documentos legales");
  170. $result['legalDocs'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_legal_documents");
  171. guardar_log("Excel", "Consulta documentos adicionales");
  172. $result['additDocs'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_additional_documents");
  173. guardar_log("Excel", "Consulta documentos generales");
  174. $result['generalDocs'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_general_documents");
  175. guardar_log("Excel", "Consulta tender process");
  176. $result['tenderProcess'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_process");
  177. guardar_log("Excel", "Consulta tender terms");
  178. $result['tenderingTerms'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms");
  179. guardar_log("Excel", "Consulta tender result");
  180. $result['tenderResult'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tender_result");
  181. guardar_log("Excel", "Consulta tender criterio financieros");
  182. $result['tenderFinancial'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms_financial_evaluation");
  183. guardar_log("Excel", "Consulta tender criterio adjudicacion");
  184. $result['tenderAwarding'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms_awarding_terms");
  185. guardar_log("Excel", "Consulta tender criterios tecnicos");
  186. $result['tenderTecnicos'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms_qualification_request");
  187. guardar_log("Excel", "Consulta tender requisitos participacion");
  188. $result['tenderQualification'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms_qualification_request");
  189. return $result;
  190. }
  191. private function datosCompletosHojaLicitacion($spreadsheet, $datosLicitacion)
  192. {
  193. $sheet = $spreadsheet->getSheet(0);
  194. $sheet->setTitle("Datos Licitación");
  195. $styleArr = array(
  196. "font" => array(
  197. "bold" => true,
  198. "color" => array("rgb" => "22B9FF"),
  199. "size" => 13,
  200. ),
  201. );
  202. //Primera Publicacion
  203. $contador = 0;
  204. foreach ($datosLicitacion as $row) {
  205. guardar_log("Excel", "Escribir excel datos licitacion--" . $contador);
  206. $contador++;
  207. $primeraPublicacion = $this->primeraPublicacion($row['licitacion']['id_licitacion']);
  208. $updated = $this->formatFechas($row['licitacion']['updated']);
  209. $sheet->getStyle("A1:AJ1")->applyFromArray($styleArr);
  210. $sheet->setCellValue('A' . $this->filaDatoLicitacion, $row['licitacion']['id_licitacion']);
  211. $sheet->setCellValue('B' . $this->filaDatoLicitacion, $row['licitacion']['link_uri']);
  212. $sheet->setCellValue('C' . $this->filaDatoLicitacion, $updated);
  213. $sheet->getStyle('C' . $this->filaDatoLicitacion)
  214. ->getNumberFormat()
  215. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
  216. $sheet->setCellValue('E' . $this->filaDatoLicitacion, $primeraPublicacion);
  217. $sheet->getStyle('E' . $this->filaDatoLicitacion)
  218. ->getNumberFormat()
  219. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  220. $sheet->setCellValue('F' . $this->filaDatoLicitacion, $row['contract']['descripcion']);
  221. $sheet->setCellValue('G' . $this->filaDatoLicitacion, $row['contract']['contractFolderID']);
  222. $sheet->setCellValue('H' . $this->filaDatoLicitacion, $row['project']['name']);
  223. $sheet->setCellValue('I' . $this->filaDatoLicitacion, $row['project']['estimatedOverallContractAmount']);
  224. $sheet->getStyle('I' . $this->filaDatoLicitacion)
  225. ->getNumberFormat()
  226. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_ACCOUNTING_EUR);
  227. $sheet->setCellValue('J' . $this->filaDatoLicitacion, $row['project']['taxExclusiveAmount']);
  228. $sheet->getStyle('J' . $this->filaDatoLicitacion)
  229. ->getNumberFormat()
  230. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_ACCOUNTING_EUR);
  231. $sheet->setCellValue('K' . $this->filaDatoLicitacion, $row['locatedParty']['itemClassification_attr']);
  232. $sheet->setCellValue('L' . $this->filaDatoLicitacion, $row['project']['tipo_contrato']);
  233. $sheet->setCellValue('M' . $this->filaDatoLicitacion, $row['project']['countrySubentityCode'] . " - " . $row['project']['countrySubentity']);
  234. $sheet->setCellValue('N' . $this->filaDatoLicitacion, $row['party']['partyName']);
  235. $sheet->setCellValue('O' . $this->filaDatoLicitacion, ($row['party']['tipoIdParty'] == "ID_PLATAFORMA") ? $row['party']['partyItem'] : "");
  236. $sheet->setCellValue('P' . $this->filaDatoLicitacion, ($row['party']['tipoIdParty'] == "NIF") ? $row['party']['partyItem'] : "");
  237. $sheet->setCellValue('Q' . $this->filaDatoLicitacion, ($row['party']['tipoIdParty'] == "DIR3") ? $row['party']['partyItem'] : "");
  238. $sheet->setCellValue('R' . $this->filaDatoLicitacion, $row['locatedParty']['buyerProfileURIID']);
  239. $sheet->setCellValue('S' . $this->filaDatoLicitacion, $row['locatedParty']['tipo_administracion']);
  240. $sheet->setCellValue('T' . $this->filaDatoLicitacion, $row['party']['codpostal']);
  241. $sheet->setCellValue('U' . $this->filaDatoLicitacion, $row['tenderProcess']['tipoTender']);
  242. $sheet->setCellValue('V' . $this->filaDatoLicitacion, $row['tenderProcess']['contrato_sistema']);
  243. $sheet->setCellValue('W' . $this->filaDatoLicitacion, $row['tenderProcess']['urgency']);
  244. $sheet->setCellValue('X' . $this->filaDatoLicitacion, $row['tenderProcess']['submision']);
  245. $sheet->setCellValue('ZY' . $this->filaDatoLicitacion, $row['tenderTerms']['procurementLegislationDocumentReference']);
  246. $sheet->setCellValue('Z' . $this->filaDatoLicitacion, $row['tenderTerms']['allowedSubcontractTerms']);
  247. $sheet->setCellValue('AA' . $this->filaDatoLicitacion, $row['project']['durationMesure']);
  248. $sheet->setCellValue('AB' . $this->filaDatoLicitacion, $row['project']['medida']);
  249. $sheet->setCellValue('AC' . $this->filaDatoLicitacion, $this->formatFechas($row['project']['duracion_inicio']));
  250. $sheet->getStyle('AC' . $this->filaDatoLicitacion)
  251. ->getNumberFormat()
  252. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  253. $sheet->setCellValue('AD' . $this->filaDatoLicitacion, $this->formatFechas($row['project']['duracion_fin']));
  254. $sheet->getStyle('AD' . $this->filaDatoLicitacion)
  255. ->getNumberFormat()
  256. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  257. $sheet->setCellValue('AE' . $this->filaDatoLicitacion, $row['project']['contractExtension']);
  258. $sheet->setCellValue('AF' . $this->filaDatoLicitacion, $row['party']['websiteURI']);
  259. $sheet->setCellValue('AG' . $this->filaDatoLicitacion, $row['party']['city']);
  260. $sheet->setCellValue('AH' . $this->filaDatoLicitacion, $row['party']['direccion']);
  261. $sheet->setCellValue('AI' . $this->filaDatoLicitacion, $row['party']['contact_name']);
  262. $sheet->setCellValue('AJ' . $this->filaDatoLicitacion, $row['party']['contact_email']);
  263. $this->filaDatoLicitacion++;
  264. }
  265. return $spreadsheet;
  266. }
  267. private function formatFechas($fecha)
  268. {
  269. $fechaFinal = "";
  270. if ($fecha != "0000-00-00") {
  271. $fechaFormat = new DateTime($fecha);
  272. $fechaFinal = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($fechaFormat);
  273. }
  274. return $fechaFinal;
  275. }
  276. private function primeraPublicacion($idLicitacion)
  277. {
  278. $result = "";
  279. $fechasPublicaciones = $this->Xlsexport_model->getFechasPublicadas($idLicitacion);
  280. if ($fechasPublicaciones['num_rows'] > 0) {
  281. $primeraFechaFormat = new Datetime($fechasPublicaciones['datos']->fecha);
  282. $result = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($primeraFechaFormat);
  283. }
  284. return $result;
  285. }
  286. private function datosCompletosHojaBitacora($spreadsheet, $datosLicitacion)
  287. {
  288. $sheet = $spreadsheet->getSheet(1);
  289. $sheet->setTitle("Bitacora");
  290. $styleArr = array(
  291. "font" => array(
  292. "bold" => true,
  293. "color" => array("rgb" => "22B9FF"),
  294. "size" => 13,
  295. ),
  296. );
  297. $sheet->getStyle("A1:F1")->applyFromArray($styleArr);
  298. $contador = 0;
  299. foreach ($datosLicitacion['projectLot']['datos'] as $bitacora) {
  300. guardar_log("Excel", "Escribir bitacora--" . $contador);
  301. $contador++;
  302. $sheet->SetCellValue('A' . $this->filaProjectLot, $bitacora['id_ajena_licitacion']);
  303. $sheet->SetCellValue('B' . $this->filaProjectLot, $bitacora['name']);
  304. $sheet->setCellValue('C' . $this->filaProjectLot, $bitacora['idProcurementLot']);
  305. $sheet->SetCellValue('D' . $this->filaProjectLot, $bitacora['taxExclusiveAmount']);
  306. $sheet->SetCellValue('F' . $this->filaProjectLot, $bitacora['countrySubentity']);
  307. $sheet->SetCellValue('I' . $this->filaProjectLot, $bitacora['itemClassification_attr']);
  308. $this->filaProjectLot++;
  309. }
  310. return $spreadsheet;
  311. }
  312. private function datosCompletosMediosPublicacion($spreadsheet, $datos)
  313. {
  314. $spreadsheet->setActiveSheetIndex(2);
  315. $spreadsheet->getActiveSheet()->setTitle("Medios de publicación");
  316. if ($datos['num_rows'] > 0) {
  317. $contador = 0;
  318. $aux = 2;
  319. foreach ($datos['datos'] as $datos) {
  320. guardar_log("Excel", "Escribir datos medio publicacion--" . $contador);
  321. $contador++;
  322. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  323. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['noticeTypeCode']);
  324. $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['publicationMediaName']);
  325. $aux++;
  326. }
  327. }
  328. return $spreadsheet;
  329. }
  330. private function datosMedioPublicacion($spreadsheet, $datos)
  331. {
  332. $spreadsheet->setActiveSheetIndex(3);
  333. $spreadsheet->getActiveSheet()->setTitle("Documentos Medios Comm");
  334. if ($datos['num_rows'] > 0) {
  335. $aux = 2;
  336. $contador = 0;
  337. foreach ($datos['datos'] as $row) {
  338. guardar_log("Excel", "Escribir documentios medios comunicacion--" . $contador);
  339. $contador++;
  340. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $row['id_ajena_licitacion']);
  341. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $row['documento']);
  342. $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $row['filename']);
  343. $aux++;
  344. }
  345. }
  346. return $spreadsheet;
  347. }
  348. private function datosCompletosResultadoDelProcedimiento($spreadsheet, $datos)
  349. {
  350. $spreadsheet->setActiveSheetIndex(4);
  351. $spreadsheet->getActiveSheet()->setTitle("Resultado del Procedimiento");
  352. if ($datos['num_rows'] > 0) {
  353. $aux = 2;
  354. $contador = 0;
  355. foreach ($datos['datos'] as $datos) {
  356. guardar_log("Excel", "Escribir tender result--" . $contador);
  357. $contador++;
  358. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  359. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['resultCode']);
  360. $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['description']);
  361. $spreadsheet->getActiveSheet()->SetCellValue('D' . $aux, $datos['awardDate']);
  362. $spreadsheet->getActiveSheet()->SetCellValue('E' . $aux, $datos['receivedTenderQuantity']);
  363. $spreadsheet->getActiveSheet()->SetCellValue('F' . $aux, $datos['lowerTenderAmount']);
  364. $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['higherTenderAmount']);
  365. $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['startDate']);
  366. $spreadsheet->getActiveSheet()->SetCellValue('I' . $aux, $datos['smeawardedIndicator']);
  367. $spreadsheet->getActiveSheet()->SetCellValue('J' . $aux, $datos['contract_id']);
  368. $spreadsheet->getActiveSheet()->SetCellValue('K' . $aux, $datos['contract_issueDate']);
  369. $spreadsheet->getActiveSheet()->SetCellValue('L' . $aux, $datos['partyIdentification']);
  370. $spreadsheet->getActiveSheet()->SetCellValue('M' . $aux, $datos['partyName']);
  371. $spreadsheet->getActiveSheet()->SetCellValue('N' . $aux, $datos['TaxExclusiveAmount']);
  372. $spreadsheet->getActiveSheet()->SetCellValue('O' . $aux, $datos['PayableAmount']);
  373. $aux++;
  374. }
  375. }
  376. return $spreadsheet;
  377. }
  378. private function datosCompletosTipoProcedimiento($spreadsheet, $datos)
  379. {
  380. $spreadsheet->setActiveSheetIndex(5);
  381. $spreadsheet->getActiveSheet()->setTitle("Tipo Procedimiento");
  382. //$datos = $this->Xlsexport_model->getTenderProcessRelacion();
  383. if ($datos['num_rows'] > 0) {
  384. $aux = 2;
  385. $contador = 0;
  386. foreach ($datos['datos'] as $datos) {
  387. guardar_log("Excel", "Escribir tender process--" . $contador);
  388. $contador++;
  389. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  390. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['procedureCode']);
  391. $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['urgencyCode']);
  392. $spreadsheet->getActiveSheet()->SetCellValue('D' . $aux, $datos['contractingSystemCode']);
  393. $spreadsheet->getActiveSheet()->SetCellValue('E' . $aux, $datos['partPresentationCode']);
  394. $spreadsheet->getActiveSheet()->SetCellValue('F' . $aux, $datos['submissionMethodCode']);
  395. $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['maximumLotPresentationQuantity']);
  396. $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['maximumTendererAwardedLotsQuantity']);
  397. $spreadsheet->getActiveSheet()->SetCellValue('I' . $aux, $datos['lotsCombinationContractingAuthorityRights']);
  398. $spreadsheet->getActiveSheet()->SetCellValue('J' . $aux, $datos['deadLineEndDate']);
  399. $spreadsheet->getActiveSheet()->SetCellValue('K' . $aux, $datos['deadLineEndTime']);
  400. $spreadsheet->getActiveSheet()->SetCellValue('L' . $aux, $datos['deadLineDescription']);
  401. $spreadsheet->getActiveSheet()->SetCellValue('M' . $aux, $datos['auctionTerms']);
  402. $spreadsheet->getActiveSheet()->SetCellValue('N' . $aux, $datos['documentAvailablePeriod_EndDate']);
  403. $spreadsheet->getActiveSheet()->SetCellValue('O' . $aux, $datos['documentAvailablePeriod_EndTime']);
  404. $aux++;
  405. }
  406. }
  407. return $spreadsheet;
  408. }
  409. private function datosCompletosOfertas($spreadsheet, $datos)
  410. {
  411. $spreadsheet->setActiveSheetIndex(6);
  412. $spreadsheet->getActiveSheet()->setTitle("Ofertas");
  413. if ($datos['num_rows'] > 0) {
  414. $aux = 2;
  415. $contador = 0;
  416. foreach ($datos['datos'] as $datos) {
  417. guardar_log("Excel", "Escribir tender process--" . $contador);
  418. $contador++;
  419. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  420. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['requiredCurriculaIndicator']);
  421. $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['variantConstraintIndicator']);
  422. $spreadsheet->getActiveSheet()->SetCellValue('D' . $aux, $datos['fundingProgramCode']);
  423. $spreadsheet->getActiveSheet()->SetCellValue('E' . $aux, $datos['guaranteeTypeCode']);
  424. $spreadsheet->getActiveSheet()->SetCellValue('F' . $aux, $datos['requiredFinancialGuarantee_Amount']);
  425. $spreadsheet->getActiveSheet()->SetCellValue('G' . $aux, $datos['language']);
  426. $spreadsheet->getActiveSheet()->SetCellValue('H' . $aux, $datos['allowedSubcontractTerms']);
  427. $spreadsheet->getActiveSheet()->SetCellValue('I' . $aux, $datos['description']);
  428. $spreadsheet->getActiveSheet()->SetCellValue('J' . $aux, $datos['personalSituation']);
  429. $spreadsheet->getActiveSheet()->SetCellValue('K' . $aux, $datos['procurementLegislationDocumentReference']);
  430. $aux++;
  431. }
  432. }
  433. return $spreadsheet;
  434. }
  435. private function datosCriterioAdjudicacion($spreadsheet, $datos)
  436. {
  437. $spreadsheet->setActiveSheetIndex(7);
  438. $spreadsheet->getActiveSheet()->setTitle("Criterio Adjudicación");
  439. if ($datos['num_rows'] > 0) {
  440. $aux = 2;
  441. $contador = 0;
  442. foreach ($datos['datos'] as $datos) {
  443. guardar_log("Excel", "Escribir criterio adjucicacion--" . $contador);
  444. $contador++;
  445. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  446. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
  447. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['description']);
  448. $aux++;
  449. }
  450. }
  451. return $spreadsheet;
  452. }
  453. private function datosCriterioEvaluacionFinanciera($spreadsheet, $datos)
  454. {
  455. $spreadsheet->setActiveSheetIndex(8);
  456. $spreadsheet->getActiveSheet()->setTitle("CriteriosEvaluacionFinanciera");
  457. if ($datos['num_rows'] > 0) {
  458. $aux = 2;
  459. $contador = 0;
  460. foreach ($datos['datos'] as $datos) {
  461. guardar_log("Excel", "Escribir criterios evaluacion financiera--" . $contador);
  462. $contador++;
  463. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  464. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
  465. $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['description']);
  466. $aux++;
  467. }
  468. }
  469. return $spreadsheet;
  470. }
  471. private function datosCriterioEvaluacionTecnica($spreadsheet, $datos)
  472. {
  473. $spreadsheet->setActiveSheetIndex(9);
  474. $spreadsheet->getActiveSheet()->setTitle("Criterios Evaluación Técnica");
  475. if ($datos['num_rows'] > 0) {
  476. $aux = 2;
  477. $contador = 0;
  478. foreach ($datos['datos'] as $datos) {
  479. guardar_log("Excel", "Escribir criterio evaluacion tecnica--" . $contador);
  480. $contador++;
  481. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  482. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
  483. $spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['description']);
  484. $aux++;
  485. }
  486. }
  487. return $spreadsheet;
  488. }
  489. private function datosRequisitosParticipacion($spreadsheet, $datos)
  490. {
  491. $spreadsheet->setActiveSheetIndex(10);
  492. $spreadsheet->getActiveSheet()->setTitle("Requisitos Participación");
  493. if ($datos['num_rows'] > 0) {
  494. $aux = 2;
  495. $contador = 0;
  496. foreach ($datos['datos'] as $datos) {
  497. guardar_log("Excel", "Escribir requisitos participacion--" . $contador);
  498. $contador++;
  499. $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  500. $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
  501. $aux++;
  502. }
  503. }
  504. return $spreadsheet;
  505. }
  506. private function datosCompletosDocumentosGenerales($spreadsheet, $datosLicitacion)
  507. {
  508. $spreadsheet->setActiveSheetIndex(11);
  509. $spreadsheet->getActiveSheet()->setTitle("Documentos Generales");
  510. $contador = 0;
  511. foreach ($datosLicitacion['datos'] as $doc) {
  512. guardar_log("Excel", "Escribir documentos generales--" . $contador);
  513. $contador++;
  514. $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoGeneral, $doc['id_ajena_licitacion']);
  515. $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoGeneral, $doc['attachment']);
  516. $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoGeneral, $doc['fileName']);
  517. $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaDocumentoGeneral, $doc['idDoc']);
  518. $this->filaDocumentoGeneral++;
  519. }
  520. return $spreadsheet;
  521. }
  522. private function datosCompletosDocumentosAdicionales($spreadsheet, $datosLicitacion)
  523. {
  524. $spreadsheet->setActiveSheetIndex(12);
  525. $spreadsheet->getActiveSheet()->setTitle("Documentos Adicionales");
  526. $contador = 0;
  527. foreach ($datosLicitacion['datos'] as $doc) {
  528. guardar_log("Excel", "Escribir documentos adicionales--" . $contador);
  529. $contador++;
  530. $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoAdd, $doc['id_ajena_licitacion']);
  531. $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoAdd, $doc['attachment']);
  532. $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoAdd, $doc['idDoc']);
  533. $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaDocumentoAdd, $doc['documentHash']);
  534. $this->filaDocumentoAdd++;
  535. }
  536. return $spreadsheet;
  537. }
  538. private function datosCompletosDocumentosTecnicos($spreadsheet, $datosLicitacion)
  539. {
  540. $spreadsheet->setActiveSheetIndex(13);
  541. $spreadsheet->getActiveSheet()->setTitle("Documentos Técnicos");
  542. $contador = 0;
  543. foreach ($datosLicitacion['datos'] as $doc) {
  544. guardar_log("Excel", "Escribir documentos tecnicos--" . $contador);
  545. $contador++;
  546. $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoTech, $doc['id_ajena_licitacion']);
  547. $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoTech, $doc['attachment']);
  548. $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoTech, $doc['idDoc']);
  549. $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaDocumentoTech, $doc['documentHash']);
  550. $this->filaDocumentoTech++;
  551. }
  552. return $spreadsheet;
  553. }
  554. private function datosCompletosDocumentosLegales($spreadsheet, $datosLicitacion)
  555. {
  556. $spreadsheet->setActiveSheetIndex(14);
  557. $spreadsheet->getActiveSheet()->setTitle("Documentos Legales");
  558. $contador = 0;
  559. foreach ($datosLicitacion['datos'] as $doc) {
  560. guardar_log("Excel", "Escribir documentos legales--" . $contador);
  561. $contador++;
  562. $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoLegal, $doc['id_ajena_licitacion']);
  563. $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoLegal, $doc['attachment']);
  564. $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoLegal, $doc['idDoc']);
  565. $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaDocumentoLegal, $doc['documentHash']);
  566. $this->filaDocumentoLegal++;
  567. }
  568. return $spreadsheet;
  569. }
  570. private function cabecerasOpenPlacspFirstSheet($spreadsheet)
  571. {
  572. $spreadsheet->setActiveSheetIndex(0);
  573. $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
  574. $spreadsheet->getActiveSheet()->SetCellValue('B1', "Link licitación");
  575. $spreadsheet->getActiveSheet()->SetCellValue('C1', "Fecha actualización");
  576. $spreadsheet->getActiveSheet()->SetCellValue('D1', "Vigente/Anulada/Archivada");
  577. $spreadsheet->getActiveSheet()->SetCellValue('E1', "Primera publicación");
  578. $spreadsheet->getActiveSheet()->SetCellValue('F1', "Estado");
  579. $spreadsheet->getActiveSheet()->SetCellValue('G1', "Número de expediente");
  580. $spreadsheet->getActiveSheet()->SetCellValue('H1', "Objeto del Contrato");
  581. $spreadsheet->getActiveSheet()->SetCellValue('I1', "Valor estimado del contrato");
  582. $spreadsheet->getActiveSheet()->SetCellValue('J1', "Presupuesto base sin impuestos");
  583. $spreadsheet->getActiveSheet()->SetCellValue('K1', "CPV");
  584. $spreadsheet->getActiveSheet()->SetCellValue('L1', "Tipo de contrato");
  585. $spreadsheet->getActiveSheet()->SetCellValue('M1', "Lugar de ejecución");
  586. $spreadsheet->getActiveSheet()->SetCellValue('N1', "Órgano de Contratación");
  587. $spreadsheet->getActiveSheet()->SetCellValue('O1', "ID OC en PLACSP");
  588. $spreadsheet->getActiveSheet()->SetCellValue('P1', "NIF OC");
  589. $spreadsheet->getActiveSheet()->SetCellValue('Q1', "DIR3");
  590. $spreadsheet->getActiveSheet()->SetCellValue('R1', "Enlace al Perfil de Contratante del OC");
  591. $spreadsheet->getActiveSheet()->SetCellValue('S1', "Tipo de Administración");
  592. $spreadsheet->getActiveSheet()->SetCellValue('T1', "Código Postal");
  593. $spreadsheet->getActiveSheet()->SetCellValue('U1', "Tipo de procedimiento");
  594. $spreadsheet->getActiveSheet()->SetCellValue('V1', "Sistema de contratación");
  595. $spreadsheet->getActiveSheet()->SetCellValue('W1', "Tramitación");
  596. $spreadsheet->getActiveSheet()->SetCellValue('X1', "Forma de presentación de la oferta");
  597. $spreadsheet->getActiveSheet()->SetCellValue('Y1', "Directiva de aplicación");
  598. $spreadsheet->getActiveSheet()->SetCellValue('Z1', "Subcontratación permitida");
  599. $spreadsheet->getActiveSheet()->SetCellValue('AA1', "Duración Contrato");
  600. $spreadsheet->getActiveSheet()->SetCellValue('AB1', "Tipo de duración");
  601. $spreadsheet->getActiveSheet()->SetCellValue('AC1', "Inicio contrato");
  602. $spreadsheet->getActiveSheet()->SetCellValue('AD1', "Fin contrato");
  603. $spreadsheet->getActiveSheet()->SetCellValue('AE1', "Extension Contrato");
  604. $spreadsheet->getActiveSheet()->SetCellValue('AF1', "URL Organo Contratación");
  605. $spreadsheet->getActiveSheet()->SetCellValue('AG1', "Ciudad Organo Contratación");
  606. $spreadsheet->getActiveSheet()->SetCellValue('AH1', "Dirección Organo Contratación");
  607. $spreadsheet->getActiveSheet()->SetCellValue('AI1', "Nombre Contacto Organo Contratación");
  608. $spreadsheet->getActiveSheet()->SetCellValue('AJ1', "Email contacto Organo Contratación");
  609. return $spreadsheet;
  610. }
  611. //Cabeceras
  612. private function cabecerasOpenPlacspDocumentos($spreadsheet, $hojaActiva)
  613. {
  614. $sheet = $spreadsheet->getSheet($hojaActiva);
  615. $styleArr = array(
  616. "font" => array(
  617. "bold" => true,
  618. "color" => array("rgb" => "22B9FF"),
  619. "size" => 13,
  620. ),
  621. );
  622. $sheet->getStyle("A1:D1")->applyFromArray($styleArr);
  623. $spreadsheet->setActiveSheetIndex($hojaActiva);
  624. $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
  625. $spreadsheet->getActiveSheet()->SetCellValue('B1', "Link Documento");
  626. $spreadsheet->getActiveSheet()->SetCellValue('C1', "Nombre Documento");
  627. $spreadsheet->getActiveSheet()->SetCellValue('D1', "Hash Documento");
  628. return $spreadsheet;
  629. }
  630. private function cabecerasOpenPlacsBitacora($spreadsheet, $hojaActiva)
  631. {
  632. $sheet = $spreadsheet->getSheet($hojaActiva);
  633. $styleArr = array(
  634. "font" => array(
  635. "bold" => true,
  636. "color" => array("rgb" => "22B9FF"),
  637. "size" => 13,
  638. ),
  639. );
  640. $sheet->getStyle("A1:F1")->applyFromArray($styleArr);
  641. $spreadsheet->setActiveSheetIndex($hojaActiva);
  642. $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
  643. $spreadsheet->getActiveSheet()->SetCellValue('B1', "Objeto del lote");
  644. $spreadsheet->getActiveSheet()->SetCellValue('C1', "Número de lote");
  645. $spreadsheet->getActiveSheet()->SetCellValue('D1', "Importe sin Impuestos");
  646. $spreadsheet->getActiveSheet()->SetCellValue('E1', "Importe con Impuestos");
  647. $spreadsheet->getActiveSheet()->SetCellValue('F1', "Lugar de ejecución del lote");
  648. return $spreadsheet;
  649. }
  650. private function cabeceraMediosComunicacion($spreadsheet)
  651. {
  652. $sheet = $spreadsheet->getSheet(2);
  653. $styleArr = array(
  654. "font" => array(
  655. "bold" => true,
  656. "color" => array("rgb" => "22B9FF"),
  657. "size" => 13,
  658. ),
  659. );
  660. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  661. $spreadsheet->setActiveSheetIndex(2);
  662. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  663. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo de anuncio');
  664. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Medio de publicación');
  665. return $spreadsheet;
  666. }
  667. private function cabeceraMediosComunicacionDocumentos($spreadsheet)
  668. {
  669. $sheet = $spreadsheet->getSheet(3);
  670. $styleArr = array(
  671. "font" => array(
  672. "bold" => true,
  673. "color" => array("rgb" => "22B9FF"),
  674. "size" => 13,
  675. ),
  676. );
  677. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  678. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  679. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Documento');
  680. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Nombre Documento');
  681. return $spreadsheet;
  682. }
  683. private function cabeceraTenderResult($spreadsheet)
  684. {
  685. $sheet = $spreadsheet->getSheet(4);
  686. $styleArr = array(
  687. "font" => array(
  688. "bold" => true,
  689. "color" => array("rgb" => "22B9FF"),
  690. "size" => 13,
  691. ),
  692. );
  693. $sheet->getStyle("A1:O1")->applyFromArray($styleArr);
  694. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  695. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo de resultado');
  696. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Motivación adjudicación');
  697. $spreadsheet->getActiveSheet()->SetCellValue('D1', 'Fecha del acuerdo');
  698. $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Número de licitadores participadores');
  699. $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Importe Oferta mas baja');
  700. $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Importe Oferta mas alta');
  701. $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Fecha de entrada en vigor');
  702. $spreadsheet->getActiveSheet()->SetCellValue('I1', 'Identifica si es una PYME');
  703. $spreadsheet->getActiveSheet()->SetCellValue('J1', 'Identificador del contrato');
  704. $spreadsheet->getActiveSheet()->SetCellValue('K1', 'Fecha de formalización');
  705. $spreadsheet->getActiveSheet()->SetCellValue('L1', 'Adjudicatario CIF');
  706. $spreadsheet->getActiveSheet()->SetCellValue('M1', 'Nombre Adjudicatario');
  707. $spreadsheet->getActiveSheet()->SetCellValue('N1', 'Importe de adjudicación sin impuestos');
  708. $spreadsheet->getActiveSheet()->SetCellValue('O1', 'Importe de adjudicación con impuestos');
  709. return $spreadsheet;
  710. }
  711. private function cabeceraTipoProcedimiento($spreadsheet)
  712. {
  713. $sheet = $spreadsheet->getSheet(5);
  714. $styleArr = array(
  715. "font" => array(
  716. "bold" => true,
  717. "color" => array("rgb" => "22B9FF"),
  718. "size" => 13,
  719. ),
  720. );
  721. $sheet->getStyle("A1:O1")->applyFromArray($styleArr);
  722. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  723. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo de Procedimiento');
  724. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Tipo de Tramitación');
  725. $spreadsheet->getActiveSheet()->SetCellValue('D1', 'Sistema de Contratación');
  726. $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Número de lotes a los que se debe ofertar');
  727. $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Presentación de la oferta');
  728. $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Número de lotes a los que se puede ofertar');
  729. $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Número máximo de lotes que se puede adjudicar un licitador');
  730. $spreadsheet->getActiveSheet()->SetCellValue('I1', 'El poder adjudicador se reserva el derecho de adjudicar contratos que combinen lotes');
  731. $spreadsheet->getActiveSheet()->SetCellValue('J1', 'Fecha limite para la presentación de ofertas');
  732. $spreadsheet->getActiveSheet()->SetCellValue('K1', 'Tiempo limite para la presentación de ofertas');
  733. $spreadsheet->getActiveSheet()->SetCellValue('L1', 'Texto descriptivo de fecha limite de presentación de ofertas');
  734. $spreadsheet->getActiveSheet()->SetCellValue('M1', 'Usa subasta electronica');
  735. $spreadsheet->getActiveSheet()->SetCellValue('N1', 'Fecha límite para obtener los pliegos');
  736. $spreadsheet->getActiveSheet()->SetCellValue('O1', 'Hora límite para obtener los pliegos');
  737. return $spreadsheet;
  738. }
  739. private function cabeceraTenderingTerms($spreadsheet)
  740. {
  741. $sheet = $spreadsheet->getSheet(6);
  742. $styleArr = array(
  743. "font" => array(
  744. "bold" => true,
  745. "color" => array("rgb" => "22B9FF"),
  746. "size" => 13,
  747. ),
  748. );
  749. $sheet->getStyle("A1:K1")->applyFromArray($styleArr);
  750. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  751. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Se requiere la presentación de Curriculum Vitae de las personas que realizarán el proyecto');
  752. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Indica que se pueden ofertar variantes');
  753. $spreadsheet->getActiveSheet()->SetCellValue('D1', 'Código descriptivo del tipo de programas que financian este contrato');
  754. $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Tipo de garantia');
  755. $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Porcentaje de la garantíaa');
  756. $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Idioma');
  757. $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Porcentaje de subcontratación máximo especificado para este contrato.');
  758. $spreadsheet->getActiveSheet()->SetCellValue('I1', 'Descripción del objeto de la subcontratación');
  759. $spreadsheet->getActiveSheet()->SetCellValue('J1', 'Descripción textual de los requisitos específicos del operador económico para poder participar en la licitación');
  760. $spreadsheet->getActiveSheet()->SetCellValue('K1', 'Contrato sujeto a regulación armonizadaF');
  761. return $spreadsheet;
  762. }
  763. private function cabeceraCriterioADjudicacion($spreadsheet)
  764. {
  765. $sheet = $spreadsheet->getSheet(7);
  766. $styleArr = array(
  767. "font" => array(
  768. "bold" => true,
  769. "color" => array("rgb" => "22B9FF"),
  770. "size" => 13,
  771. ),
  772. );
  773. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  774. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  775. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo criterio de adjudicación');
  776. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Descripción textual del criterio de adjudicación');
  777. return $spreadsheet;
  778. }
  779. private function cabeceraCriteriosFinancieros($spreadsheet)
  780. {
  781. $sheet = $spreadsheet->getSheet(8);
  782. $styleArr = array(
  783. "font" => array(
  784. "bold" => true,
  785. "color" => array("rgb" => "22B9FF"),
  786. "size" => 13,
  787. ),
  788. );
  789. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  790. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  791. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo criterio de evaluación financiera');
  792. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Descripción textual del criterio de evaluación financiera');
  793. return $spreadsheet;
  794. }
  795. private function cabeceraCriteriosTecnicos($spreadsheet)
  796. {
  797. $sheet = $spreadsheet->getSheet(9);
  798. $styleArr = array(
  799. "font" => array(
  800. "bold" => true,
  801. "color" => array("rgb" => "22B9FF"),
  802. "size" => 13,
  803. ),
  804. );
  805. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  806. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  807. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo criterio de evaluación técnica');
  808. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Descripción textual del criterio de evaluación técnica');
  809. return $spreadsheet;
  810. }
  811. private function cabeceraRequisitosParticipacion($spreadsheet)
  812. {
  813. $sheet = $spreadsheet->getSheet(10);
  814. $styleArr = array(
  815. "font" => array(
  816. "bold" => true,
  817. "color" => array("rgb" => "22B9FF"),
  818. "size" => 13,
  819. ),
  820. );
  821. $sheet->getStyle("A1:B1")->applyFromArray($styleArr);
  822. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  823. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo Requisitos Participacion');
  824. return $spreadsheet;
  825. }
  826. }
  827. /* End of file ExportXls.php */
  828. /* Location: ./application/controllers/ExportXls.php */