ExportXls.php 46KB

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