ExportXls.php 46KB

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