ExportXls.php 44KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932
  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. $writer->save($ruta);
  76. emailEnvioExcel();
  77. // Write the Excel file to filename some_excel_file.xlsx in the current directory
  78. // Redirect output to a client’s web browser (Excel5)
  79. header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  80. header('Content-Disposition: attachment;filename=' . $nombreAchivo . '');
  81. header('Pragma: cache');
  82. header('Cache-Control: private');
  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. $aux++;
  435. }
  436. }
  437. return $spreadsheet;
  438. }
  439. private function datosCriterioAdjudicacion($spreadsheet, $datos)
  440. {
  441. $sheet = $spreadsheet->getSheet(7);
  442. $sheet->setTitle("Criterio Adjudicación");
  443. if ($datos['num_rows'] > 0) {
  444. $aux = 2;
  445. $contador = 0;
  446. foreach ($datos['datos'] as $datos) {
  447. $contador++;
  448. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  449. $sheet->SetCellValue('B' . $aux, $datos['description']);
  450. $sheet->SetCellValue('C' . $aux, $datos['evaluationCriteriaTypeCode']);
  451. $aux++;
  452. }
  453. }
  454. return $spreadsheet;
  455. }
  456. private function datosCriterioEvaluacionFinanciera($spreadsheet, $datos)
  457. {
  458. $sheet = $spreadsheet->getSheet(8);
  459. $sheet->setTitle("CriteriosEvaluacionFinanciera");
  460. if ($datos['num_rows'] > 0) {
  461. $aux = 2;
  462. $contador = 0;
  463. foreach ($datos['datos'] as $datos) {
  464. $contador++;
  465. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  466. $sheet->SetCellValue('B' . $aux, $datos['code_desc']);
  467. $sheet->SetCellValue('C' . $aux, $datos['description']);
  468. $aux++;
  469. }
  470. }
  471. return $spreadsheet;
  472. }
  473. private function datosCriterioEvaluacionTecnica($spreadsheet, $datos)
  474. {
  475. $sheet = $spreadsheet->getSheet(9);
  476. $sheet->setTitle("Criterios Evaluación Técnica");
  477. if ($datos['num_rows'] > 0) {
  478. $aux = 2;
  479. $contador = 0;
  480. foreach ($datos['datos'] as $datos) {
  481. $contador++;
  482. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  483. $sheet->SetCellValue('B' . $aux, $datos['code_desc']);
  484. $sheet->SetCellValue('C' . $aux, $datos['description']);
  485. $aux++;
  486. }
  487. }
  488. return $spreadsheet;
  489. }
  490. private function datosRequisitosParticipacion($spreadsheet, $datos)
  491. {
  492. $sheet = $spreadsheet->getSheet(10);
  493. $sheet->setTitle("Requisitos Participación");
  494. if ($datos['num_rows'] > 0) {
  495. $aux = 2;
  496. $contador = 0;
  497. foreach ($datos['datos'] as $datos) {
  498. $contador++;
  499. $sheet->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
  500. $sheet->SetCellValue('B' . $aux, $datos['code_desc']);
  501. $aux++;
  502. }
  503. }
  504. return $spreadsheet;
  505. }
  506. private function datosCompletosDocumentosGenerales($spreadsheet, $datosLicitacion)
  507. {
  508. $sheet = $spreadsheet->getSheet(11);
  509. $sheet->setTitle("Documentos Generales");
  510. $contador = 0;
  511. foreach ($datosLicitacion['datos'] as $doc) {
  512. $contador++;
  513. $sheet->SetCellValue('A' . $this->filaDocumentoGeneral, $doc['id_ajena_licitacion']);
  514. $sheet->SetCellValue('B' . $this->filaDocumentoGeneral, $doc['attachment']);
  515. $sheet->SetCellValue('C' . $this->filaDocumentoGeneral, $doc['fileName']);
  516. $this->filaDocumentoGeneral++;
  517. }
  518. return $spreadsheet;
  519. }
  520. private function datosCompletosDocumentosAdicionales($spreadsheet, $datosLicitacion)
  521. {
  522. $sheet = $spreadsheet->getSheet(12);
  523. $sheet->setTitle("Documentos Adicionales");
  524. $contador = 0;
  525. foreach ($datosLicitacion['datos'] as $doc) {
  526. $contador++;
  527. $sheet->SetCellValue('A' . $this->filaDocumentoAdd, $doc['id_ajena_licitacion']);
  528. $sheet->SetCellValue('B' . $this->filaDocumentoAdd, $doc['attachment']);
  529. $sheet->SetCellValue('C' . $this->filaDocumentoAdd, $doc['idDoc']);
  530. $this->filaDocumentoAdd++;
  531. }
  532. return $spreadsheet;
  533. }
  534. private function datosCompletosDocumentosTecnicos($spreadsheet, $datosLicitacion)
  535. {
  536. $sheet = $spreadsheet->getSheet(13);
  537. $sheet->setTitle("Documentos Técnicos");
  538. $contador = 0;
  539. foreach ($datosLicitacion['datos'] as $doc) {
  540. $contador++;
  541. $sheet->SetCellValue('A' . $this->filaDocumentoTech, $doc['id_ajena_licitacion']);
  542. $sheet->SetCellValue('B' . $this->filaDocumentoTech, $doc['attachment']);
  543. $sheet->SetCellValue('C' . $this->filaDocumentoTech, $doc['idDoc']);
  544. $this->filaDocumentoTech++;
  545. }
  546. return $spreadsheet;
  547. }
  548. private function datosCompletosDocumentosLegales($spreadsheet, $datosLicitacion)
  549. {
  550. $sheet = $spreadsheet->getSheet(14);
  551. $sheet->setTitle("Documentos Legales");
  552. $contador = 0;
  553. foreach ($datosLicitacion['datos'] as $doc) {
  554. $contador++;
  555. $sheet->SetCellValue('A' . $this->filaDocumentoLegal, $doc['id_ajena_licitacion']);
  556. $sheet->SetCellValue('B' . $this->filaDocumentoLegal, $doc['attachment']);
  557. $sheet->SetCellValue('C' . $this->filaDocumentoLegal, $doc['idDoc']);
  558. $this->filaDocumentoLegal++;
  559. }
  560. return $spreadsheet;
  561. }
  562. private function cabecerasOpenPlacspFirstSheet($spreadsheet)
  563. {
  564. $spreadsheet->setActiveSheetIndex(0);
  565. $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
  566. $spreadsheet->getActiveSheet()->SetCellValue('B1', "Link licitación");
  567. $spreadsheet->getActiveSheet()->SetCellValue('C1', "Fecha actualización");
  568. $spreadsheet->getActiveSheet()->SetCellValue('D1', "Vigente/Anulada/Archivada");
  569. $spreadsheet->getActiveSheet()->SetCellValue('E1', "Primera publicación");
  570. $spreadsheet->getActiveSheet()->SetCellValue('F1', "Estado");
  571. $spreadsheet->getActiveSheet()->SetCellValue('G1', "Número de expediente");
  572. $spreadsheet->getActiveSheet()->SetCellValue('H1', "Objeto del Contrato");
  573. $spreadsheet->getActiveSheet()->SetCellValue('I1', "Valor estimado del contrato");
  574. $spreadsheet->getActiveSheet()->SetCellValue('J1', "Presupuesto base sin impuestos");
  575. $spreadsheet->getActiveSheet()->SetCellValue('K1', "CPV");
  576. $spreadsheet->getActiveSheet()->SetCellValue('L1', "Tipo de contrato");
  577. $spreadsheet->getActiveSheet()->SetCellValue('M1', "Lugar de ejecución");
  578. $spreadsheet->getActiveSheet()->SetCellValue('N1', "Órgano de Contratación");
  579. $spreadsheet->getActiveSheet()->SetCellValue('O1', "DIR3");
  580. $spreadsheet->getActiveSheet()->SetCellValue('P1', "Enlace al Perfil de Contratante del OC");
  581. $spreadsheet->getActiveSheet()->SetCellValue('Q1', "Tipo de Administración");
  582. $spreadsheet->getActiveSheet()->SetCellValue('R1', "Código Postal");
  583. $spreadsheet->getActiveSheet()->SetCellValue('S1', "Tipo de procedimiento");
  584. $spreadsheet->getActiveSheet()->SetCellValue('T1', "Sistema de contratación");
  585. $spreadsheet->getActiveSheet()->SetCellValue('U1', "Tramitación");
  586. $spreadsheet->getActiveSheet()->SetCellValue('V1', "Forma de presentación de la oferta");
  587. $spreadsheet->getActiveSheet()->SetCellValue('W1', "Directiva de aplicación");
  588. $spreadsheet->getActiveSheet()->SetCellValue('X1', "Subcontratación permitida");
  589. $spreadsheet->getActiveSheet()->SetCellValue('Y1', "Duración Contrato");
  590. $spreadsheet->getActiveSheet()->SetCellValue('Z1', "Tipo de duración");
  591. $spreadsheet->getActiveSheet()->SetCellValue('AA1', "Inicio contrato");
  592. $spreadsheet->getActiveSheet()->SetCellValue('AB1', "Fin contrato");
  593. $spreadsheet->getActiveSheet()->SetCellValue('AC1', "Extension Contrato");
  594. $spreadsheet->getActiveSheet()->SetCellValue('AD1', "URL Organo Contratación");
  595. $spreadsheet->getActiveSheet()->SetCellValue('AE1', "Ciudad Organo Contratación");
  596. $spreadsheet->getActiveSheet()->SetCellValue('AF1', "Dirección Organo Contratación");
  597. $spreadsheet->getActiveSheet()->SetCellValue('AG1', "Nombre Contacto Organo Contratación");
  598. $spreadsheet->getActiveSheet()->SetCellValue('AH1', "Email contacto Organo Contratación");
  599. return $spreadsheet;
  600. }
  601. //Cabeceras
  602. private function cabecerasOpenPlacspDocumentos($spreadsheet, $hojaActiva)
  603. {
  604. $sheet = $spreadsheet->getSheet($hojaActiva);
  605. $styleArr = array(
  606. "font" => array(
  607. "bold" => true,
  608. "color" => array("rgb" => "22B9FF"),
  609. "size" => 13,
  610. ),
  611. );
  612. $sheet->getStyle("A1:D1")->applyFromArray($styleArr);
  613. $spreadsheet->setActiveSheetIndex($hojaActiva);
  614. $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
  615. $spreadsheet->getActiveSheet()->SetCellValue('B1', "Link Documento");
  616. $spreadsheet->getActiveSheet()->SetCellValue('C1', "Nombre Documento");
  617. return $spreadsheet;
  618. }
  619. private function cabecerasOpenPlacsBitacora($spreadsheet, $hojaActiva)
  620. {
  621. $sheet = $spreadsheet->getSheet($hojaActiva);
  622. $styleArr = array(
  623. "font" => array(
  624. "bold" => true,
  625. "color" => array("rgb" => "22B9FF"),
  626. "size" => 13,
  627. ),
  628. );
  629. $sheet->getStyle("A1:F1")->applyFromArray($styleArr);
  630. $spreadsheet->setActiveSheetIndex($hojaActiva);
  631. $spreadsheet->getActiveSheet()->SetCellValue('A1', "Identificador");
  632. $spreadsheet->getActiveSheet()->SetCellValue('B1', "Objeto del lote");
  633. $spreadsheet->getActiveSheet()->SetCellValue('C1', "Número de lote");
  634. $spreadsheet->getActiveSheet()->SetCellValue('D1', "Importe sin Impuestos");
  635. $spreadsheet->getActiveSheet()->SetCellValue('E1', "Lugar de ejecución del lote");
  636. $spreadsheet->getActiveSheet()->SetCellValue('F1', "CPV");
  637. return $spreadsheet;
  638. }
  639. private function cabeceraMediosComunicacion($spreadsheet)
  640. {
  641. $sheet = $spreadsheet->getSheet(2);
  642. $styleArr = array(
  643. "font" => array(
  644. "bold" => true,
  645. "color" => array("rgb" => "22B9FF"),
  646. "size" => 13,
  647. ),
  648. );
  649. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  650. $spreadsheet->setActiveSheetIndex(2);
  651. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  652. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo de anuncio');
  653. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Medio de publicación');
  654. return $spreadsheet;
  655. }
  656. private function cabeceraMediosComunicacionDocumentos($spreadsheet)
  657. {
  658. $sheet = $spreadsheet->getSheet(3);
  659. $styleArr = array(
  660. "font" => array(
  661. "bold" => true,
  662. "color" => array("rgb" => "22B9FF"),
  663. "size" => 13,
  664. ),
  665. );
  666. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  667. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  668. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Documento');
  669. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Nombre Documento');
  670. return $spreadsheet;
  671. }
  672. private function cabeceraTenderResult($spreadsheet)
  673. {
  674. $sheet = $spreadsheet->getSheet(4);
  675. $styleArr = array(
  676. "font" => array(
  677. "bold" => true,
  678. "color" => array("rgb" => "22B9FF"),
  679. "size" => 13,
  680. ),
  681. );
  682. $sheet->getStyle("A1:O1")->applyFromArray($styleArr);
  683. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  684. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo de resultado');
  685. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Motivación adjudicación');
  686. $spreadsheet->getActiveSheet()->SetCellValue('D1', 'Fecha del acuerdo');
  687. $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Número de licitadores participadores');
  688. $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Importe Oferta mas baja');
  689. $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Importe Oferta mas alta');
  690. $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Ofertas Temerarias Descartadas');
  691. $spreadsheet->getActiveSheet()->SetCellValue('I1', 'Fecha de entrada en vigor');
  692. $spreadsheet->getActiveSheet()->SetCellValue('J1', 'Identifica si es una PYME');
  693. $spreadsheet->getActiveSheet()->SetCellValue('K1', 'Identificador del contrato');
  694. $spreadsheet->getActiveSheet()->SetCellValue('L1', 'Fecha de formalización');
  695. $spreadsheet->getActiveSheet()->SetCellValue('M1', 'Adjudicatario CIF');
  696. $spreadsheet->getActiveSheet()->SetCellValue('N1', 'Nombre Adjudicatario');
  697. $spreadsheet->getActiveSheet()->SetCellValue('O1', 'Importe de adjudicación sin impuestos');
  698. return $spreadsheet;
  699. }
  700. private function cabeceraTipoProcedimiento($spreadsheet)
  701. {
  702. $sheet = $spreadsheet->getSheet(5);
  703. $styleArr = array(
  704. "font" => array(
  705. "bold" => true,
  706. "color" => array("rgb" => "22B9FF"),
  707. "size" => 13,
  708. ),
  709. );
  710. $sheet->getStyle("A1:O1")->applyFromArray($styleArr);
  711. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  712. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo de Procedimiento');
  713. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Tipo de Tramitación');
  714. $spreadsheet->getActiveSheet()->SetCellValue('D1', 'Sistema de Contratación');
  715. $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Número de lotes a los que se debe ofertar');
  716. $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Presentación de la oferta');
  717. $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Número de lotes a los que se puede ofertar');
  718. $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Número máximo de lotes que se puede adjudicar un licitador');
  719. $spreadsheet->getActiveSheet()->SetCellValue('I1', 'El poder adjudicador se reserva el derecho de adjudicar contratos que combinen lotes');
  720. $spreadsheet->getActiveSheet()->SetCellValue('J1', 'Fecha limite para la presentación de ofertas');
  721. $spreadsheet->getActiveSheet()->SetCellValue('K1', 'Tiempo limite para la presentación de ofertas');
  722. $spreadsheet->getActiveSheet()->SetCellValue('L1', 'Texto descriptivo de fecha limite de presentación de ofertas');
  723. $spreadsheet->getActiveSheet()->SetCellValue('M1', 'Usa subasta electronica');
  724. $spreadsheet->getActiveSheet()->SetCellValue('N1', 'Fecha límite para obtener los pliegos');
  725. $spreadsheet->getActiveSheet()->SetCellValue('O1', 'Hora límite para obtener los pliegos');
  726. return $spreadsheet;
  727. }
  728. private function cabeceraTenderingTerms($spreadsheet)
  729. {
  730. $sheet = $spreadsheet->getSheet(6);
  731. $styleArr = array(
  732. "font" => array(
  733. "bold" => true,
  734. "color" => array("rgb" => "22B9FF"),
  735. "size" => 13,
  736. ),
  737. );
  738. $sheet->getStyle("A1:K1")->applyFromArray($styleArr);
  739. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  740. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Indica que se pueden ofertar variantes');
  741. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Tipo de garantia');
  742. $spreadsheet->getActiveSheet()->SetCellValue('D1', 'Porcentaje de la garantíaa');
  743. $spreadsheet->getActiveSheet()->SetCellValue('E1', 'Porcentaje de subcontratación máximo especificado para este contrato.');
  744. $spreadsheet->getActiveSheet()->SetCellValue('F1', 'Descripción del objeto de la subcontratación');
  745. $spreadsheet->getActiveSheet()->SetCellValue('G1', 'Descripción textual de los requisitos específicos del operador económico para poder participar en la licitación');
  746. $spreadsheet->getActiveSheet()->SetCellValue('H1', 'Contrato sujeto a regulación armonizadaF');
  747. return $spreadsheet;
  748. }
  749. private function cabeceraCriterioADjudicacion($spreadsheet)
  750. {
  751. $sheet = $spreadsheet->getSheet(7);
  752. $styleArr = array(
  753. "font" => array(
  754. "bold" => true,
  755. "color" => array("rgb" => "22B9FF"),
  756. "size" => 13,
  757. ),
  758. );
  759. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  760. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  761. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Descripción textual del criterio de adjudicación');
  762. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Ponderación');
  763. return $spreadsheet;
  764. }
  765. private function cabeceraCriteriosFinancieros($spreadsheet)
  766. {
  767. $sheet = $spreadsheet->getSheet(8);
  768. $styleArr = array(
  769. "font" => array(
  770. "bold" => true,
  771. "color" => array("rgb" => "22B9FF"),
  772. "size" => 13,
  773. ),
  774. );
  775. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  776. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  777. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo criterio de evaluación financiera');
  778. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Descripción textual del criterio de evaluación financiera');
  779. return $spreadsheet;
  780. }
  781. private function cabeceraCriteriosTecnicos($spreadsheet)
  782. {
  783. $sheet = $spreadsheet->getSheet(9);
  784. $styleArr = array(
  785. "font" => array(
  786. "bold" => true,
  787. "color" => array("rgb" => "22B9FF"),
  788. "size" => 13,
  789. ),
  790. );
  791. $sheet->getStyle("A1:C1")->applyFromArray($styleArr);
  792. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  793. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo criterio de evaluación técnica');
  794. $spreadsheet->getActiveSheet()->SetCellValue('C1', 'Descripción textual del criterio de evaluación técnica');
  795. return $spreadsheet;
  796. }
  797. private function cabeceraRequisitosParticipacion($spreadsheet)
  798. {
  799. $sheet = $spreadsheet->getSheet(10);
  800. $styleArr = array(
  801. "font" => array(
  802. "bold" => true,
  803. "color" => array("rgb" => "22B9FF"),
  804. "size" => 13,
  805. ),
  806. );
  807. $sheet->getStyle("A1:B1")->applyFromArray($styleArr);
  808. $spreadsheet->getActiveSheet()->SetCellValue('A1', 'Identificador');
  809. $spreadsheet->getActiveSheet()->SetCellValue('B1', 'Tipo Requisitos Participacion');
  810. return $spreadsheet;
  811. }
  812. }
  813. /* End of file ExportXls.php */
  814. /* Location: ./application/controllers/ExportXls.php */