ExportXls.php 45KB

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