ExportXls.php 46KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. <?php
  2. ini_set('max_execution_time', '300');
  3. defined('BASEPATH') or exit('No direct script access allowed');
  4. use PhpOffice\PhpSpreadsheet\Spreadsheet;
  5. use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
  6. class ExportXls extends CI_Controller
  7. {
  8. private $filaDocumentoGeneral = 2;
  9. private $filaDocumentoTech = 2;
  10. private $filaDocumentoAdd = 2;
  11. private $filaDocumentoLegal = 2;
  12. private $filaProjectLot = 2;
  13. private $filaDatoLicitacion = 2;
  14. public function __construct()
  15. {
  16. parent::__construct();
  17. $this->load->model("Xlsexport_model");
  18. }
  19. public function index()
  20. {
  21. $licitaciones = $this->Xlsexport_model->getLicitaciones("HAVING LI.fecha_creacion_log = '2022-02-23 11:06:44'");
  22. insertBucleDuplicateOnKey($licitaciones['datos'], "vista_datos_licitacion", "");
  23. }
  24. public function exportDatosCompletos()
  25. {
  26. $licitacionesResult = $this->Xlsexport_model->getFullDatosUltimasInsertadas();
  27. $result = array();
  28. //$start = $this->starttime();
  29. if ($licitacionesResult['num_rows'] > 0) {
  30. $result = $this->mapearDatos($licitacionesResult);
  31. }
  32. $spreadsheet = new Spreadsheet();
  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->createSheet();
  47. $spreadsheet = $this->cabecerasOpenPlacspFirstSheet($spreadsheet);
  48. $spreadsheet = $this->cabecerasOpenPlacsBitacora($spreadsheet, 1);
  49. $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 11);
  50. $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 12);
  51. $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 13);
  52. $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 14);
  53. $spreadsheet = $this->cabeceraMediosComunicacion($spreadsheet);
  54. $spreadsheet = $this->cabeceraMediosComunicacionDocumentos($spreadsheet);
  55. $spreadsheet = $this->cabeceraTenderResult($spreadsheet);
  56. $spreadsheet = $this->cabeceraTipoProcedimiento($spreadsheet);
  57. $spreadsheet = $this->cabeceraTenderingTerms($spreadsheet);
  58. $spreadsheet = $this->cabeceraCriterioADjudicacion($spreadsheet);
  59. $spreadsheet = $this->cabeceraCriteriosFinancieros($spreadsheet);
  60. $spreadsheet = $this->cabeceraCriteriosTecnicos($spreadsheet);
  61. $spreadsheet = $this->cabeceraRequisitosParticipacion($spreadsheet);
  62. $spreadsheet = $this->datosCompletosHojaLicitacion($spreadsheet, $result['hoja1']);
  63. $spreadsheet = $this->datosCompletosHojaBitacora($spreadsheet, $result);
  64. $spreadsheet = $this->datosCompletosMediosPublicacion($spreadsheet, $result['validNoticeInfo']);
  65. $spreadsheet = $this->datosMedioPublicacion($spreadsheet, $result['validNoticeInfoDocumentos']);
  66. $spreadsheet = $this->datosCriterioAdjudicacion($spreadsheet, $result['tenderAwarding']);
  67. $spreadsheet = $this->datosCriterioEvaluacionFinanciera($spreadsheet, $result['tenderFinancial']);
  68. $spreadsheet = $this->datosCriterioEvaluacionTecnica($spreadsheet, $result['tenderTecnicos']);
  69. $spreadsheet = $this->datosRequisitosParticipacion($spreadsheet, $result['tenderQualification']);
  70. $spreadsheet = $this->datosCompletosDocumentosGenerales($spreadsheet, $result['generalDocs']);
  71. $spreadsheet = $this->datosCompletosDocumentosAdicionales($spreadsheet, $result['additDocs']);
  72. $spreadsheet = $this->datosCompletosDocumentosTecnicos($spreadsheet, $result['techDocs']);
  73. $spreadsheet = $this->datosCompletosDocumentosLegales($spreadsheet, $result['legalDocs']);
  74. $spreadsheet = $this->datosCompletosTipoProcedimiento($spreadsheet, $result['tenderProcess']);
  75. $spreadsheet = $this->datosCompletosOfertas($spreadsheet, $result['tenderingTerms']);
  76. $spreadsheet = $this->datosCompletosResultadoDelProcedimiento($spreadsheet, $result['tenderResult']);
  77. $nombreAchivo = 'test.xlsx';
  78. $ruta = FCPATH . 'uploads/' . $nombreAchivo;
  79. guardar_log("Excel", "Guardando Datos en excel--");
  80. $writer = new Xlsx($spreadsheet);
  81. $writer->save($ruta);
  82. // Write the Excel file to filename some_excel_file.xlsx in the current directory
  83. // Redirect output to a client’s web browser (Excel5)
  84. guardar_log("Excel", "Enviando Excel");
  85. header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  86. header('Content-Disposition: attachment;filename=' . $nombreAchivo . '');
  87. header('Pragma: cache');
  88. header('Cache-Control: private');
  89. //$objWriter = PHPExcel_IOFactory::createWriter($spreadsheet, 'Excel2007');
  90. //$objWriter->save(FCPATH . 'uploads/' . $nombreAchivo);*/
  91. }
  92. public function starttime()
  93. {
  94. $r = explode(' ', microtime());
  95. $r = $r[1] + $r;
  96. return $r;
  97. }
  98. public function endtime($starttime)
  99. {
  100. $r = explode(' ', microtime());
  101. $r = $r[1] + $r;
  102. $r = round($r - $starttime, 4);
  103. return '<strong>Execution Time</strong>: ' . $r . ' seconds<br />';
  104. }
  105. public function mapearDatos($licitacionesResult): array
  106. {
  107. $result = array();
  108. guardar_log("Excel", "Montando array datos licitacion");
  109. foreach ($licitacionesResult['datos'] as $licitacion) {
  110. $result['hoja1'][$licitacion->id_licitacion]['licitacion'] = array(
  111. 'id_licitacion' => $licitacion->id_licitacion,
  112. "link_uri" => $licitacion->link_uri,
  113. "updated" => $licitacion->updated,
  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('E' . $this->filaDatoLicitacion, $primeraPublicacion);
  218. $sheet->getStyle('E' . $this->filaDatoLicitacion)
  219. ->getNumberFormat()
  220. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  221. $sheet->setCellValue('F' . $this->filaDatoLicitacion, $row['contract']['descripcion']);
  222. $sheet->setCellValue('G' . $this->filaDatoLicitacion, $row['contract']['contractFolderID']);
  223. $sheet->setCellValue('H' . $this->filaDatoLicitacion, $row['project']['name']);
  224. $sheet->setCellValue('I' . $this->filaDatoLicitacion, $row['project']['estimatedOverallContractAmount']);
  225. $sheet->getStyle('I' . $this->filaDatoLicitacion)
  226. ->getNumberFormat()
  227. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_ACCOUNTING_EUR);
  228. $sheet->setCellValue('J' . $this->filaDatoLicitacion, $row['project']['taxExclusiveAmount']);
  229. $sheet->getStyle('J' . $this->filaDatoLicitacion)
  230. ->getNumberFormat()
  231. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_ACCOUNTING_EUR);
  232. $sheet->setCellValue('K' . $this->filaDatoLicitacion, $row['locatedParty']['itemClassification_attr']);
  233. $sheet->setCellValue('L' . $this->filaDatoLicitacion, $row['project']['tipo_contrato']);
  234. $sheet->setCellValue('M' . $this->filaDatoLicitacion, $row['project']['countrySubentity']);
  235. $sheet->setCellValue('N' . $this->filaDatoLicitacion, $row['party']['partyName']);
  236. $sheet->setCellValue('O' . $this->filaDatoLicitacion, ($row['party']['tipoIdParty'] == "DIR3") ? $row['party']['partyItem'] : "");
  237. $sheet->setCellValue('P' . $this->filaDatoLicitacion, $row['locatedParty']['buyerProfileURIID']);
  238. $sheet->setCellValue('Q' . $this->filaDatoLicitacion, $row['locatedParty']['tipo_administracion']);
  239. $sheet->setCellValue('R' . $this->filaDatoLicitacion, $row['party']['codpostal']);
  240. $sheet->setCellValue('S' . $this->filaDatoLicitacion, $row['tenderProcess']['tipoTender']);
  241. $sheet->setCellValue('T' . $this->filaDatoLicitacion, $row['tenderProcess']['contrato_sistema']);
  242. $sheet->setCellValue('U' . $this->filaDatoLicitacion, $row['tenderProcess']['urgency']);
  243. $sheet->setCellValue('V' . $this->filaDatoLicitacion, $row['tenderProcess']['submision']);
  244. $sheet->setCellValue('W' . $this->filaDatoLicitacion, $row['tenderTerms']['procurementLegislationDocumentReference']);
  245. $sheet->setCellValue('X' . $this->filaDatoLicitacion, $row['tenderTerms']['allowedSubcontractTerms']);
  246. $sheet->setCellValue('Y' . $this->filaDatoLicitacion, $row['project']['durationMesure']);
  247. $sheet->setCellValue('Z' . $this->filaDatoLicitacion, $row['project']['medida']);
  248. $sheet->setCellValue('AA' . $this->filaDatoLicitacion, $this->formatFechas($row['project']['duracion_inicio']));
  249. $sheet->getStyle('AC' . $this->filaDatoLicitacion)
  250. ->getNumberFormat()
  251. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  252. $sheet->setCellValue('AB' . $this->filaDatoLicitacion, $this->formatFechas($row['project']['duracion_fin']));
  253. $sheet->getStyle('AD' . $this->filaDatoLicitacion)
  254. ->getNumberFormat()
  255. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  256. $sheet->setCellValue('AC' . $this->filaDatoLicitacion, $row['project']['contractExtension']);
  257. $sheet->setCellValue('AD' . $this->filaDatoLicitacion, $row['party']['websiteURI']);
  258. $sheet->setCellValue('AE' . $this->filaDatoLicitacion, $row['party']['city']);
  259. $sheet->setCellValue('AF' . $this->filaDatoLicitacion, $row['party']['direccion']);
  260. $sheet->setCellValue('AG' . $this->filaDatoLicitacion, $row['party']['contact_name']);
  261. $sheet->setCellValue('AH' . $this->filaDatoLicitacion, $row['party']['contact_email']);
  262. $this->filaDatoLicitacion++;
  263. }
  264. return $spreadsheet;
  265. }
  266. private function formatFechas($fecha)
  267. {
  268. $fechaFinal = "";
  269. if ($fecha != "0000-00-00" && $fecha != "0000-00-00 00:00:00") {
  270. $fechaFormat = new DateTime($fecha);
  271. $fechaFinal = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($fechaFormat);
  272. } else if ($fecha === "0000-00-00") {
  273. //$fechaFinal = "00/00/0000";
  274. $fechaFinal = "";
  275. } else if ($fecha === "0000-00-00 00:00:00") {
  276. //$fechaFinal = "00/00/0000 00:00";
  277. $fechaFinal = "";
  278. }
  279. return $fechaFinal;
  280. }
  281. private function primeraPublicacion($idLicitacion)
  282. {
  283. $result = "";
  284. $fechasPublicaciones = $this->Xlsexport_model->getFechasPublicadas($idLicitacion);
  285. if ($fechasPublicaciones['num_rows'] > 0) {
  286. $primeraFechaFormat = new Datetime($fechasPublicaciones['datos']->fecha);
  287. $result = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($primeraFechaFormat);
  288. }
  289. return $result;
  290. }
  291. private function datosCompletosHojaBitacora($spreadsheet, $datosLicitacion)
  292. {
  293. $sheet = $spreadsheet->getSheet(1);
  294. $sheet->setTitle("Bitacora");
  295. $styleArr = array(
  296. "font" => array(
  297. "bold" => true,
  298. "color" => array("rgb" => "22B9FF"),
  299. "size" => 13,
  300. ),
  301. );
  302. $sheet->getStyle("A1:F1")->applyFromArray($styleArr);
  303. $contador = 0;
  304. foreach ($datosLicitacion['projectLot']['datos'] as $bitacora) {
  305. guardar_log("Excel", "Escribir bitacora--" . $contador);
  306. $contador++;
  307. $sheet->SetCellValue('A' . $this->filaProjectLot, $bitacora['id_ajena_licitacion']);
  308. $sheet->SetCellValue('B' . $this->filaProjectLot, $bitacora['name']);
  309. $sheet->setCellValue('C' . $this->filaProjectLot, $bitacora['idProcurementLot']);
  310. $sheet->SetCellValue('D' . $this->filaProjectLot, $bitacora['taxExclusiveAmount']);
  311. $sheet->SetCellValue('E' . $this->filaProjectLot, $bitacora['countrySubentity']);
  312. $sheet->SetCellValue('F' . $this->filaProjectLot, $bitacora['itemClassification_attr']);
  313. $this->filaProjectLot++;
  314. }
  315. return $spreadsheet;
  316. }
  317. private function datosCompletosMediosPublicacion($spreadsheet, $datos)
  318. {
  319. $sheet = $spreadsheet->getSheet(2);
  320. $sheet->setTitle("Medios de publicación");
  321. if ($datos['num_rows'] > 0) {
  322. $contador = 0;
  323. $aux = 2;
  324. foreach ($datos['datos'] as $datos) {
  325. guardar_log("Excel", "Escribir datos medio publicacion--" . $contador);
  326. $contador++;
  327. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  328. $sheet->SetCellValue('B' . $aux, $datos['code_desc']);
  329. $sheet->SetCellValue('C' . $aux, $datos['publicationMediaName']);
  330. $aux++;
  331. }
  332. }
  333. return $spreadsheet;
  334. }
  335. private function datosMedioPublicacion($spreadsheet, $datos)
  336. {
  337. $sheet = $spreadsheet->getSheet(3);
  338. $sheet->setTitle("Documentos Medios Comm");
  339. if ($datos['num_rows'] > 0) {
  340. $aux = 2;
  341. $contador = 0;
  342. foreach ($datos['datos'] as $row) {
  343. guardar_log("Excel", "Escribir documentios medios comunicacion--" . $contador);
  344. $contador++;
  345. $sheet->SetCellValue('A' . $aux, $row['id_ajena_licitacion']);
  346. $sheet->SetCellValue('B' . $aux, $row['documento']);
  347. $sheet->SetCellValue('C' . $aux, $row['filename']);
  348. $aux++;
  349. }
  350. }
  351. return $spreadsheet;
  352. }
  353. private function datosCompletosResultadoDelProcedimiento($spreadsheet, $datos)
  354. {
  355. $sheet = $spreadsheet->getSheet(4);
  356. $sheet->setTitle("Resultado del Procedimiento");
  357. if ($datos['num_rows'] > 0) {
  358. $aux = 2;
  359. $contador = 0;
  360. foreach ($datos['datos'] as $datos) {
  361. guardar_log("Excel", "Escribir tender result--" . $contador);
  362. $contador++;
  363. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  364. $sheet->SetCellValue('B' . $aux, $datos['code_desc']);
  365. $sheet->SetCellValue('C' . $aux, $datos['description']);
  366. $sheet->SetCellValue('D' . $aux, $this->formatFechas($datos['awardDate']));
  367. $sheet->getStyle('D' . $aux)
  368. ->getNumberFormat()
  369. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  370. $sheet->SetCellValue('E' . $aux, $datos['receivedTenderQuantity']);
  371. $sheet->SetCellValue('F' . $aux, $datos['lowerTenderAmount']);
  372. $sheet->getStyle('F' . $aux)
  373. ->getNumberFormat()
  374. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_ACCOUNTING_EUR);
  375. $sheet->SetCellValue('G' . $aux, $datos['higherTenderAmount']);
  376. $sheet->getStyle('G' . $aux)
  377. ->getNumberFormat()
  378. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_ACCOUNTING_EUR);
  379. $sheet->SetCellValue('H' . $aux, $datos['abnormallyLowTendersIndicator']);
  380. //$sheet->SetCellValue('I' . $aux, $datos['startDate']);
  381. $sheet->SetCellValue('I' . $aux, $this->formatFechas($datos['startDate']));
  382. $sheet->getStyle('I' . $aux)
  383. ->getNumberFormat()
  384. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
  385. $sheet->SetCellValue('J' . $aux, $datos['smeawardedIndicator']);
  386. $sheet->SetCellValue('K' . $aux, $datos['contract_id']);
  387. $sheet->SetCellValue('L' . $aux, $this->formatFechas($datos['contract_issueDate']));
  388. $sheet->getStyle('L' . $aux)
  389. ->getNumberFormat()
  390. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
  391. $sheet->SetCellValue('M' . $aux, $datos['partyIdentification']);
  392. $sheet->SetCellValue('N' . $aux, $datos['partyName']);
  393. $sheet->SetCellValue('O' . $aux, $datos['TaxExclusiveAmount']);
  394. $aux++;
  395. }
  396. }
  397. return $spreadsheet;
  398. }
  399. private function datosCompletosTipoProcedimiento($spreadsheet, $datos)
  400. {
  401. $sheet = $spreadsheet->getSheet(5);
  402. $sheet->setTitle("Tipo Procedimiento");
  403. //$datos = $this->Xlsexport_model->getTenderProcessRelacion();
  404. if ($datos['num_rows'] > 0) {
  405. $aux = 2;
  406. $contador = 0;
  407. foreach ($datos['datos'] as $datos) {
  408. guardar_log("Excel", "Escribir tender process--" . $contador);
  409. $contador++;
  410. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  411. $sheet->SetCellValue('B' . $aux, $datos['tipoTender']);
  412. $sheet->SetCellValue('C' . $aux, $datos['urgency']);
  413. $sheet->SetCellValue('D' . $aux, $datos['contrato_sistema']);
  414. $sheet->SetCellValue('E' . $aux, $datos['partPresentationCode']);
  415. $sheet->SetCellValue('F' . $aux, $datos['submision']);
  416. $sheet->SetCellValue('G' . $aux, $datos['maximumLotPresentationQuantity']);
  417. $sheet->SetCellValue('H' . $aux, $datos['maximumTendererAwardedLotsQuantity']);
  418. $sheet->SetCellValue('I' . $aux, $datos['lotsCombinationContractingAuthorityRights']);
  419. $sheet->SetCellValue('J' . $aux, $this->formatFechas($datos['deadLineEndDate']));
  420. $sheet->getStyle('J' . $aux)
  421. ->getNumberFormat()
  422. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  423. $sheet->SetCellValue('K' . $aux, $datos['deadLineEndTime']);
  424. $sheet->SetCellValue('L' . $aux, $datos['deadLineDescription']);
  425. $sheet->SetCellValue('M' . $aux, $datos['auctionTerms']);
  426. $sheet->SetCellValue('N' . $aux, $this->formatFechas($datos['documentAvailablePeriod_EndDate']));
  427. $sheet->getStyle('N' . $aux)
  428. ->getNumberFormat()
  429. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  430. $sheet->SetCellValue('O' . $aux, $datos['documentAvailablePeriod_EndTime']);
  431. $sheet->getStyle('O' . $aux)
  432. ->getNumberFormat()
  433. ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
  434. $aux++;
  435. }
  436. }
  437. return $spreadsheet;
  438. }
  439. private function datosCompletosOfertas($spreadsheet, $datos)
  440. {
  441. $sheet = $spreadsheet->getSheet(6);
  442. $sheet->setTitle("Ofertas");
  443. if ($datos['num_rows'] > 0) {
  444. $aux = 2;
  445. $contador = 0;
  446. foreach ($datos['datos'] as $datos) {
  447. guardar_log("Excel", "Escribir tender process--" . $contador);
  448. $contador++;
  449. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  450. $sheet->SetCellValue('B' . $aux, $datos['variantConstraintIndicator']);
  451. $sheet->SetCellValue('C' . $aux, $datos['code_desc']);
  452. $sheet->SetCellValue('D' . $aux, $datos['requiredFinancialGuarantee_Amount']);
  453. $sheet->SetCellValue('E' . $aux, $datos['allowedSubcontractTerms']);
  454. $sheet->SetCellValue('F' . $aux, $datos['description']);
  455. $sheet->SetCellValue('G' . $aux, $datos['personalSituation']);
  456. $sheet->SetCellValue('H' . $aux, $datos['procurementLegislationDocumentReference']);
  457. $aux++;
  458. }
  459. }
  460. return $spreadsheet;
  461. }
  462. private function datosCriterioAdjudicacion($spreadsheet, $datos)
  463. {
  464. $sheet = $spreadsheet->getSheet(7);
  465. $sheet->setTitle("Criterio Adjudicación");
  466. if ($datos['num_rows'] > 0) {
  467. $aux = 2;
  468. $contador = 0;
  469. foreach ($datos['datos'] as $datos) {
  470. guardar_log("Excel", "Escribir criterio adjucicacion--" . $contador);
  471. $contador++;
  472. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  473. $sheet->SetCellValue('B' . $aux, $datos['description']);
  474. $sheet->SetCellValue('C' . $aux, $datos['evaluationCriteriaTypeCode']);
  475. $aux++;
  476. }
  477. }
  478. return $spreadsheet;
  479. }
  480. private function datosCriterioEvaluacionFinanciera($spreadsheet, $datos)
  481. {
  482. $sheet = $spreadsheet->getSheet(8);
  483. $sheet->setTitle("CriteriosEvaluacionFinanciera");
  484. if ($datos['num_rows'] > 0) {
  485. $aux = 2;
  486. $contador = 0;
  487. foreach ($datos['datos'] as $datos) {
  488. guardar_log("Excel", "Escribir criterios evaluacion financiera--" . $contador);
  489. $contador++;
  490. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  491. $sheet->SetCellValue('B' . $aux, $datos['code_desc']);
  492. $sheet->SetCellValue('C' . $aux, $datos['description']);
  493. $aux++;
  494. }
  495. }
  496. return $spreadsheet;
  497. }
  498. private function datosCriterioEvaluacionTecnica($spreadsheet, $datos)
  499. {
  500. $sheet = $spreadsheet->getSheet(9);
  501. $sheet->setTitle("Criterios Evaluación Técnica");
  502. if ($datos['num_rows'] > 0) {
  503. $aux = 2;
  504. $contador = 0;
  505. foreach ($datos['datos'] as $datos) {
  506. guardar_log("Excel", "Escribir criterio evaluacion tecnica--" . $contador);
  507. $contador++;
  508. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  509. $sheet->SetCellValue('B' . $aux, $datos['code_desc']);
  510. $sheet->SetCellValue('C' . $aux, $datos['description']);
  511. $aux++;
  512. }
  513. }
  514. return $spreadsheet;
  515. }
  516. private function datosRequisitosParticipacion($spreadsheet, $datos)
  517. {
  518. $sheet = $spreadsheet->getSheet(10);
  519. $sheet->setTitle("Requisitos Participación");
  520. if ($datos['num_rows'] > 0) {
  521. $aux = 2;
  522. $contador = 0;
  523. foreach ($datos['datos'] as $datos) {
  524. guardar_log("Excel", "Escribir requisitos participacion--" . $contador);
  525. $contador++;
  526. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  527. $sheet->SetCellValue('B' . $aux, $datos['code_desc']);
  528. $aux++;
  529. }
  530. }
  531. return $spreadsheet;
  532. }
  533. private function datosCompletosDocumentosGenerales($spreadsheet, $datosLicitacion)
  534. {
  535. $sheet = $spreadsheet->getSheet(11);
  536. $sheet->setTitle("Documentos Generales");
  537. $contador = 0;
  538. foreach ($datosLicitacion['datos'] as $doc) {
  539. guardar_log("Excel", "Escribir documentos generales--" . $contador);
  540. $contador++;
  541. $sheet->SetCellValue('A' . $this->filaDocumentoGeneral, $doc['id_ajena_licitacion']);
  542. $sheet->SetCellValue('B' . $this->filaDocumentoGeneral, $doc['attachment']);
  543. $sheet->SetCellValue('C' . $this->filaDocumentoGeneral, $doc['fileName']);
  544. $this->filaDocumentoGeneral++;
  545. }
  546. return $spreadsheet;
  547. }
  548. private function datosCompletosDocumentosAdicionales($spreadsheet, $datosLicitacion)
  549. {
  550. $sheet = $spreadsheet->getSheet(12);
  551. $sheet->setTitle("Documentos Adicionales");
  552. $contador = 0;
  553. foreach ($datosLicitacion['datos'] as $doc) {
  554. guardar_log("Excel", "Escribir documentos adicionales--" . $contador);
  555. $contador++;
  556. $sheet->SetCellValue('A' . $this->filaDocumentoAdd, $doc['id_ajena_licitacion']);
  557. $sheet->SetCellValue('B' . $this->filaDocumentoAdd, $doc['attachment']);
  558. $sheet->SetCellValue('C' . $this->filaDocumentoAdd, $doc['idDoc']);
  559. $this->filaDocumentoAdd++;
  560. }
  561. return $spreadsheet;
  562. }
  563. private function datosCompletosDocumentosTecnicos($spreadsheet, $datosLicitacion)
  564. {
  565. $sheet = $spreadsheet->getSheet(13);
  566. $sheet->setTitle("Documentos Técnicos");
  567. $contador = 0;
  568. foreach ($datosLicitacion['datos'] as $doc) {
  569. guardar_log("Excel", "Escribir documentos tecnicos--" . $contador);
  570. $contador++;
  571. $sheet->SetCellValue('A' . $this->filaDocumentoTech, $doc['id_ajena_licitacion']);
  572. $sheet->SetCellValue('B' . $this->filaDocumentoTech, $doc['attachment']);
  573. $sheet->SetCellValue('C' . $this->filaDocumentoTech, $doc['idDoc']);
  574. $this->filaDocumentoTech++;
  575. }
  576. return $spreadsheet;
  577. }
  578. private function datosCompletosDocumentosLegales($spreadsheet, $datosLicitacion)
  579. {
  580. $sheet = $spreadsheet->getSheet(14);
  581. $sheet->setTitle("Documentos Legales");
  582. $contador = 0;
  583. foreach ($datosLicitacion['datos'] as $doc) {
  584. guardar_log("Excel", "Escribir documentos legales--" . $contador);
  585. $contador++;
  586. $sheet->SetCellValue('A' . $this->filaDocumentoLegal, $doc['id_ajena_licitacion']);
  587. $sheet->SetCellValue('B' . $this->filaDocumentoLegal, $doc['attachment']);
  588. $sheet->SetCellValue('C' . $this->filaDocumentoLegal, $doc['idDoc']);
  589. $this->filaDocumentoLegal++;
  590. }
  591. return $spreadsheet;
  592. }
  593. private function cabecerasOpenPlacspFirstSheet($spreadsheet)
  594. {
  595. $spreadsheet->setActiveSheetIndex(0);
  596. $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
  597. $spreadsheet->getActiveSheet()->SetCellValue('B1', "Link licitación");
  598. $spreadsheet->getActiveSheet()->SetCellValue('C1', "Fecha actualización");
  599. $spreadsheet->getActiveSheet()->SetCellValue('D1', "Vigente/Anulada/Archivada");
  600. $spreadsheet->getActiveSheet()->SetCellValue('E1', "Primera publicación");
  601. $spreadsheet->getActiveSheet()->SetCellValue('F1', "Estado");
  602. $spreadsheet->getActiveSheet()->SetCellValue('G1', "Número de expediente");
  603. $spreadsheet->getActiveSheet()->SetCellValue('H1', "Objeto del Contrato");
  604. $spreadsheet->getActiveSheet()->SetCellValue('I1', "Valor estimado del contrato");
  605. $spreadsheet->getActiveSheet()->SetCellValue('J1', "Presupuesto base sin impuestos");
  606. $spreadsheet->getActiveSheet()->SetCellValue('K1', "CPV");
  607. $spreadsheet->getActiveSheet()->SetCellValue('L1', "Tipo de contrato");
  608. $spreadsheet->getActiveSheet()->SetCellValue('M1', "Lugar de ejecución");
  609. $spreadsheet->getActiveSheet()->SetCellValue('N1', "Órgano de Contratación");
  610. $spreadsheet->getActiveSheet()->SetCellValue('O1', "DIR3");
  611. $spreadsheet->getActiveSheet()->SetCellValue('P1', "Enlace al Perfil de Contratante del OC");
  612. $spreadsheet->getActiveSheet()->SetCellValue('Q1', "Tipo de Administración");
  613. $spreadsheet->getActiveSheet()->SetCellValue('R1', "Código Postal");
  614. $spreadsheet->getActiveSheet()->SetCellValue('S1', "Tipo de procedimiento");
  615. $spreadsheet->getActiveSheet()->SetCellValue('T1', "Sistema de contratación");
  616. $spreadsheet->getActiveSheet()->SetCellValue('U1', "Tramitación");
  617. $spreadsheet->getActiveSheet()->SetCellValue('V1', "Forma de presentación de la oferta");
  618. $spreadsheet->getActiveSheet()->SetCellValue('W1', "Directiva de aplicación");
  619. $spreadsheet->getActiveSheet()->SetCellValue('X1', "Subcontratación permitida");
  620. $spreadsheet->getActiveSheet()->SetCellValue('Y1', "Duración Contrato");
  621. $spreadsheet->getActiveSheet()->SetCellValue('Z1', "Tipo de duración");
  622. $spreadsheet->getActiveSheet()->SetCellValue('AA1', "Inicio contrato");
  623. $spreadsheet->getActiveSheet()->SetCellValue('AB1', "Fin contrato");
  624. $spreadsheet->getActiveSheet()->SetCellValue('AC1', "Extension Contrato");
  625. $spreadsheet->getActiveSheet()->SetCellValue('AD1', "URL Organo Contratación");
  626. $spreadsheet->getActiveSheet()->SetCellValue('AE1', "Ciudad Organo Contratación");
  627. $spreadsheet->getActiveSheet()->SetCellValue('AF1', "Dirección Organo Contratación");
  628. $spreadsheet->getActiveSheet()->SetCellValue('AG1', "Nombre Contacto Organo Contratación");
  629. $spreadsheet->getActiveSheet()->SetCellValue('AH1', "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('F1', "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', 'Descripción textual del criterio de adjudicación');
  793. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Ponderació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 */