|
@@ -11,6 +11,7 @@ class ExportXls extends CI_Controller
|
11
|
11
|
private $filaDocumentoAdd = 2;
|
12
|
12
|
private $filaDocumentoLegal = 2;
|
13
|
13
|
private $filaProjectLot = 2;
|
|
14
|
+ private $filaDatoLicitacion = 2;
|
14
|
15
|
|
15
|
16
|
public function __construct()
|
16
|
17
|
{
|
|
@@ -18,9 +19,17 @@ class ExportXls extends CI_Controller
|
18
|
19
|
$this->load->model("Xlsexport_model");
|
19
|
20
|
}
|
20
|
21
|
|
|
22
|
+ public function index()
|
|
23
|
+ {
|
|
24
|
+ $licitaciones = $this->Xlsexport_model->getLicitaciones("HAVING LI.fecha_creacion_log = '2022-02-23 11:06:44'");
|
|
25
|
+
|
|
26
|
+ insertBucleDuplicateOnKey($licitaciones['datos'], "vista_datos_licitacion", "");
|
|
27
|
+
|
|
28
|
+ }
|
|
29
|
+
|
21
|
30
|
public function exportDatosCompletos()
|
22
|
31
|
{
|
23
|
|
- $licitacionesResult = $this->Xlsexport_model->getLicitaciones();
|
|
32
|
+ $licitacionesResult = $this->Xlsexport_model->getFullDatosUltimasInsertadas();
|
24
|
33
|
$result = array();
|
25
|
34
|
|
26
|
35
|
//$start = $this->starttime();
|
|
@@ -28,9 +37,6 @@ class ExportXls extends CI_Controller
|
28
|
37
|
$result = $this->mapearDatos($licitacionesResult);
|
29
|
38
|
}
|
30
|
39
|
$spreadsheet = new Spreadsheet();
|
31
|
|
- //$sheet = $spreadsheet->getActiveSheet();
|
32
|
|
- //$sheet->setCellValue('A1', 'Hello World !');
|
33
|
|
-
|
34
|
40
|
$spreadsheet->createSheet();
|
35
|
41
|
$spreadsheet->createSheet();
|
36
|
42
|
$spreadsheet->createSheet();
|
|
@@ -46,54 +52,41 @@ class ExportXls extends CI_Controller
|
46
|
52
|
$spreadsheet->createSheet();
|
47
|
53
|
$spreadsheet->createSheet();
|
48
|
54
|
|
49
|
|
- $filaExcel = 1;
|
50
|
|
- foreach ($result as $dato) {
|
51
|
|
- if ($filaExcel == 1) {
|
52
|
|
- $spreadsheet = $this->cabecerasOpenPlacspFirstSheet($spreadsheet);
|
53
|
|
- /*$spreadsheet = $this->cabecerasOpenPlacsBitacora($spreadsheet, 1);
|
54
|
|
- $spreadsheet = $this->cabeceraMediosComunicacion($spreadsheet);
|
55
|
|
- $spreadsheet = $this->cabeceraMediosComunicacionDocumentos($spreadsheet);
|
56
|
|
- $spreadsheet = $this->cabeceraTenderResult($spreadsheet);
|
57
|
|
- $spreadsheet = $this->cabeceraTenderingTerms($spreadsheet);
|
58
|
|
- $spreadsheet = $this->cabeceraTipoProcedimiento($spreadsheet);
|
59
|
|
- $spreadsheet = $this->cabeceraCriterioADjudicacion($spreadsheet);
|
60
|
|
- $spreadsheet = $this->cabeceraCriteriosFinancieros($spreadsheet);
|
61
|
|
- $spreadsheet = $this->cabeceraCriteriosTecnicos($spreadsheet);
|
62
|
|
- $spreadsheet = $this->cabeceraRequisitosParticipacion($spreadsheet);
|
63
|
|
- $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 11);
|
64
|
|
- $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 12);
|
65
|
|
- $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 13);
|
66
|
|
- $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 14);*/
|
67
|
|
- } else {
|
68
|
|
- $spreadsheet = $this->datosCompletosHojaLicitacion($spreadsheet, $filaExcel, $dato);
|
69
|
|
- /*$spreadsheet = $this->datosCompletosHojaBitacora($spreadsheet, $dato);
|
70
|
|
- $spreadsheet = $this->datosCompletosDocumentosGenerales($spreadsheet, $dato);
|
71
|
|
- $spreadsheet = $this->datosCompletosDocumentosTecnicos($spreadsheet, $dato);
|
72
|
|
- $spreadsheet = $this->datosCompletosDocumentosAdicionales($spreadsheet, $dato);
|
73
|
|
- $spreadsheet = $this->datosCompletosDocumentosLegales($spreadsheet, $dato);*/
|
74
|
|
- }
|
75
|
|
- //$spreadsheet = $this->datosCompletosMediosPublicacion($spreadsheet);
|
76
|
|
- //$spreadsheet = $this->datosMedioPublicacion($spreadsheet);
|
77
|
|
- /*$spreadsheet = $this->datosCompletosResultadoDelProcedimiento($spreadsheet);
|
78
|
|
- $spreadsheet = $this->datosCompletosOfertas($spreadsheet);
|
79
|
|
- $spreadsheet = $this->datosCriterioAdjudicacion($spreadsheet);
|
80
|
|
- $spreadsheet = $this->datosCriterioEvaluacionFinanciera($spreadsheet);
|
81
|
|
- $spreadsheet = $this->datosCriterioEvaluacionTecnica($spreadsheet);
|
82
|
|
- $spreadsheet = $this->datosRequisitosParticipacion($spreadsheet);
|
83
|
|
- $spreadsheet = $this->datosCompletosTipoProcedimiento($spreadsheet);*/
|
84
|
|
-
|
85
|
|
- $filaExcel++;
|
86
|
|
- }
|
|
55
|
+ $spreadsheet = $this->cabecerasOpenPlacspFirstSheet($spreadsheet);
|
|
56
|
+ $spreadsheet = $this->cabecerasOpenPlacsBitacora($spreadsheet, 1);
|
|
57
|
+ $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 11);
|
|
58
|
+ $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 12);
|
|
59
|
+ $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 13);
|
|
60
|
+ $spreadsheet = $this->cabecerasOpenPlacspDocumentos($spreadsheet, 14);
|
|
61
|
+
|
|
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['tenderFinancial']);
|
|
67
|
+ $spreadsheet = $this->datosCriterioEvaluacionFinanciera($spreadsheet, $result['tenderAwarding']);
|
|
68
|
+ $spreadsheet = $this->datosCriterioEvaluacionTecnica($spreadsheet, $result['tenderTecnicos']);
|
|
69
|
+ $spreadsheet = $this->datosRequisitosParticipacion($spreadsheet, $result['tenderQualification']);
|
|
70
|
+
|
|
71
|
+ $spreadsheet = $this->datosCompletosDocumentosGenerales($spreadsheet, $result['generalDocs']);
|
|
72
|
+ $spreadsheet = $this->datosCompletosDocumentosAdicionales($spreadsheet, $result['additDocs']);
|
|
73
|
+ $spreadsheet = $this->datosCompletosDocumentosTecnicos($spreadsheet, $result['techDocs']);
|
|
74
|
+ $spreadsheet = $this->datosCompletosDocumentosLegales($spreadsheet, $result['legalDocs']);
|
|
75
|
+ $spreadsheet = $this->datosCompletosTipoProcedimiento($spreadsheet, $result['tenderProcess']);
|
|
76
|
+ $spreadsheet = $this->datosCompletosOfertas($spreadsheet, $result['tenderingTerms']);
|
|
77
|
+ $spreadsheet = $this->datosCompletosResultadoDelProcedimiento($spreadsheet, $result['tenderResult']);
|
87
|
78
|
|
88
|
79
|
$nombreAchivo = 'test.xlsx';
|
89
|
80
|
$ruta = FCPATH . 'uploads/' . $nombreAchivo;
|
90
|
81
|
|
|
82
|
+ guardar_log("Excel", "Guardando Datos en excel--");
|
91
|
83
|
$writer = new Xlsx($spreadsheet);
|
92
|
84
|
|
93
|
85
|
$writer->save($ruta);
|
94
|
86
|
|
95
|
87
|
// Write the Excel file to filename some_excel_file.xlsx in the current directory
|
96
|
88
|
// Redirect output to a client’s web browser (Excel5)
|
|
89
|
+ guardar_log("Excel", "Enviando Excel");
|
97
|
90
|
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
98
|
91
|
header('Content-Disposition: attachment;filename=' . $nombreAchivo . '');
|
99
|
92
|
header('Pragma: cache');
|
|
@@ -120,23 +113,26 @@ class ExportXls extends CI_Controller
|
120
|
113
|
public function mapearDatos($licitacionesResult): array
|
121
|
114
|
{
|
122
|
115
|
$result = array();
|
|
116
|
+ guardar_log("Excel", "Montando array datos licitacion");
|
123
|
117
|
foreach ($licitacionesResult['datos'] as $licitacion) {
|
124
|
|
- $result[$licitacion->id_licitacion]['licitacion'] = array(
|
|
118
|
+
|
|
119
|
+ $result['hoja1'][$licitacion->id_licitacion]['licitacion'] = array(
|
125
|
120
|
'id_licitacion' => $licitacion->id_licitacion,
|
126
|
121
|
"link_uri" => $licitacion->link_uri,
|
127
|
122
|
"updated" => $licitacion->updated,
|
128
|
123
|
);
|
129
|
|
- $result[$licitacion->id_licitacion]['contract'] = array(
|
|
124
|
+ $result['hoja1'][$licitacion->id_licitacion]['contract'] = array(
|
130
|
125
|
"descripcion" => $licitacion->contrato_status,
|
131
|
126
|
"contractFolderStatusCode" => $licitacion->contractFolderStatusCode,
|
132
|
127
|
"contractFolderID" => $licitacion->contractFolderID,
|
133
|
128
|
);
|
134
|
|
- $result[$licitacion->id_licitacion]['locatedParty'] = array(
|
|
129
|
+ $result['hoja1'][$licitacion->id_licitacion]['locatedParty'] = array(
|
135
|
130
|
"contractingPartyTypeCode" => $licitacion->contractingPartyTypeCode,
|
136
|
131
|
"buyerProfileURIID" => $licitacion->buyerProfileURIID,
|
137
|
132
|
"tipo_administracion" => $licitacion->tipo_administracion,
|
|
133
|
+ "itemClassification_attr" => $licitacion->itemClassification_attr,
|
138
|
134
|
);
|
139
|
|
- $result[$licitacion->id_licitacion]['party'] = array(
|
|
135
|
+ $result['hoja1'][$licitacion->id_licitacion]['party'] = array(
|
140
|
136
|
"partyName" => $licitacion->partyName,
|
141
|
137
|
"codpostal" => $licitacion->codpostal,
|
142
|
138
|
"websiteURI" => $licitacion->websiteURI,
|
|
@@ -144,14 +140,12 @@ class ExportXls extends CI_Controller
|
144
|
140
|
"direccion" => $licitacion->direccion,
|
145
|
141
|
"contact_name" => $licitacion->contact_name,
|
146
|
142
|
"contact_email" => $licitacion->contact_email,
|
|
143
|
+ "partyItem" => $licitacion->partyItem,
|
|
144
|
+ "tipoIdParty" => $licitacion->tipoIdParty,
|
147
|
145
|
);
|
148
|
146
|
|
149
|
|
- /*foreach ($result[$licitacion->id_licitacion]['party'] as $row) {
|
150
|
|
- $result[$licitacion->id_licitacion]['partyActivity'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_party_party_idenfitication", "id_ajena_licitacion", $row['id']);
|
151
|
|
- }*/
|
152
|
|
-
|
153
|
|
- $result[$licitacion->id_licitacion]['project'] = array(
|
154
|
|
- "name" => $licitacion->name,
|
|
147
|
+ $result['hoja1'][$licitacion->id_licitacion]['project'] = array(
|
|
148
|
+ "name" => $licitacion->nameProject,
|
155
|
149
|
"estimatedOverallContractAmount" => $licitacion->estimatedOverallContractAmount,
|
156
|
150
|
"taxExclusiveAmount" => $licitacion->taxExclusiveAmount,
|
157
|
151
|
"totalAmount" => $licitacion->totalAmount,
|
|
@@ -166,40 +160,68 @@ class ExportXls extends CI_Controller
|
166
|
160
|
|
167
|
161
|
);
|
168
|
162
|
|
169
|
|
- $result[$licitacion->id_licitacion]['tenderProcess'] = array(
|
|
163
|
+ $result['hoja1'][$licitacion->id_licitacion]['tenderProcess'] = array(
|
170
|
164
|
"tipoTender" => $licitacion->tipoTender,
|
171
|
165
|
"contrato_sistema" => $licitacion->contrato_sistema,
|
172
|
166
|
"urgency" => $licitacion->urgency,
|
173
|
167
|
"submision" => $licitacion->submision,
|
174
|
168
|
);
|
175
|
169
|
|
176
|
|
- $result[$licitacion->id_licitacion]['tenderTerms'] = array(
|
|
170
|
+ $result['hoja1'][$licitacion->id_licitacion]['tenderTerms'] = array(
|
177
|
171
|
"procurementLegislationDocumentReference" => $licitacion->procurementLegislationDocumentReference,
|
178
|
172
|
"allowedSubcontractTerms" => $licitacion->allowedSubcontractTerms,
|
179
|
173
|
);
|
180
|
|
- /*foreach ($result[$licitacion->id_licitacion]['project'] as $row) {
|
181
|
|
- //$result[$licitacion->id_licitacion]['projectActivity'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_procurement_project_itemClass", "id_ajena_licitacion", $row['id']);
|
182
|
|
- }*/
|
183
|
|
-
|
184
|
|
- /*$result[$licitacion->id_licitacion]['projectLot'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_procurement_project_lot", $licitacion->id_licitacion);
|
185
|
|
- foreach ($result[$licitacion->id_licitacion]['projectLot'] as $row) {
|
186
|
|
- //$result[$licitacion->id_licitacion]['projectLotActivity'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_procurement_project_lot_item", "id_ajena_licitacion", $row['id']);
|
187
|
|
- }*/
|
188
|
|
-
|
189
|
|
- /*$result[$licitacion->id_licitacion]['tenderResult'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_tender_result", $licitacion->id_licitacion);
|
190
|
|
- $result[$licitacion->id_licitacion]['tenderProcess'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_tendering_process", $licitacion->id_licitacion);
|
191
|
|
- $result[$licitacion->id_licitacion]['tenderTerms'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_tendering_terms", $licitacion->id_licitacion);
|
192
|
|
- $result[$licitacion->id_licitacion]['validNoticeInfo'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_valid_notice_info", $licitacion->id_licitacion);
|
193
|
|
- $result[$licitacion->id_licitacion]['techDocs'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_technical_documents", $licitacion->id_licitacion);
|
194
|
|
- $result[$licitacion->id_licitacion]['legalDocs'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_legal_documents", $licitacion->id_licitacion);
|
195
|
|
- $result[$licitacion->id_licitacion]['generalDocs'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_general_documents", $licitacion->id_licitacion);
|
196
|
|
- $result[$licitacion->id_licitacion]['additDocs'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_additional_documents", $licitacion->id_licitacion);*/
|
197
|
174
|
}
|
198
|
175
|
|
|
176
|
+ guardar_log("Excel", "Consulta Valid notice info");
|
|
177
|
+ $result['validNoticeInfo'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_valid_notice_info");
|
|
178
|
+
|
|
179
|
+ guardar_log("Excel", "Consulta Valid notice info documentos");
|
|
180
|
+ $result['validNoticeInfoDocumentos'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_valid_notice_info_documento");
|
|
181
|
+
|
|
182
|
+ /* guardar_log("Excel", "Consulta Valid notice info");
|
|
183
|
+ $result['validNoticeInfo'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_valid_notice_fechas"); */
|
|
184
|
+
|
|
185
|
+ guardar_log("Excel", "Consulta projectLot");
|
|
186
|
+ $result['projectLot'] = $this->Xlsexport_model->getProjectLotItem();
|
|
187
|
+
|
|
188
|
+ guardar_log("Excel", "Consulta documentos tecnicos");
|
|
189
|
+ $result['techDocs'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_technical_documents");
|
|
190
|
+
|
|
191
|
+ guardar_log("Excel", "Consulta documentos legales");
|
|
192
|
+ $result['legalDocs'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_legal_documents");
|
|
193
|
+
|
|
194
|
+ guardar_log("Excel", "Consulta documentos adicionales");
|
|
195
|
+ $result['additDocs'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_additional_documents");
|
|
196
|
+
|
|
197
|
+ guardar_log("Excel", "Consulta documentos generales");
|
|
198
|
+ $result['generalDocs'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_general_documents");
|
|
199
|
+
|
|
200
|
+ guardar_log("Excel", "Consulta tender process");
|
|
201
|
+ $result['tenderProcess'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_process");
|
|
202
|
+
|
|
203
|
+ guardar_log("Excel", "Consulta tender terms");
|
|
204
|
+ $result['tenderingTerms'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms");
|
|
205
|
+
|
|
206
|
+ guardar_log("Excel", "Consulta tender result");
|
|
207
|
+ $result['tenderResult'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tender_result");
|
|
208
|
+
|
|
209
|
+ guardar_log("Excel", "Consulta tender criterio financieros");
|
|
210
|
+ $result['tenderFinancial'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms_financial_evaluation");
|
|
211
|
+
|
|
212
|
+ guardar_log("Excel", "Consulta tender criterio adjudicacion");
|
|
213
|
+ $result['tenderAwarding'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms_awarding_terms");
|
|
214
|
+
|
|
215
|
+ guardar_log("Excel", "Consulta tender criterios tecnicos");
|
|
216
|
+ $result['tenderTecnicos'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms_qualification_request");
|
|
217
|
+
|
|
218
|
+ guardar_log("Excel", "Consulta tender requisitos participacion");
|
|
219
|
+ $result['tenderQualification'] = $this->Xlsexport_model->getTablaByFechaLog("maestro_tendering_terms_qualification_request");
|
|
220
|
+
|
199
|
221
|
return $result;
|
200
|
222
|
}
|
201
|
223
|
|
202
|
|
- private function datosCompletosHojaLicitacion($spreadsheet, $filaExcel, $datosLicitacion)
|
|
224
|
+ private function datosCompletosHojaLicitacion($spreadsheet, $datosLicitacion)
|
203
|
225
|
{
|
204
|
226
|
|
205
|
227
|
$sheet = $spreadsheet->getSheet(0);
|
|
@@ -211,104 +233,141 @@ class ExportXls extends CI_Controller
|
211
|
233
|
"size" => 13,
|
212
|
234
|
),
|
213
|
235
|
);
|
214
|
|
- $updatedFormat = new DateTime($datosLicitacion['licitacion']['updated']);
|
215
|
|
- $updated = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($updatedFormat);
|
216
|
|
- $sheet->getStyle("A1:AB1")->applyFromArray($styleArr);
|
217
|
|
- $sheet->setCellValue('A' . $filaExcel, $datosLicitacion['licitacion']['id_licitacion']);
|
218
|
|
- $sheet->setCellValue('B' . $filaExcel, $datosLicitacion['licitacion']['link_uri']);
|
219
|
|
- $sheet->setCellValue('C' . $filaExcel, $updated);
|
220
|
|
- $sheet->getStyle('C' . $filaExcel)
|
221
|
|
- ->getNumberFormat()
|
222
|
|
- ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
|
223
|
|
- $sheet->setCellValue('E' . $filaExcel, "");
|
224
|
|
- $sheet->setCellValue('F' . $filaExcel, $datosLicitacion['contract']['descripcion']);
|
225
|
|
- $sheet->setCellValue('G' . $filaExcel, $datosLicitacion['contract']['contractFolderID']);
|
226
|
|
- $sheet->setCellValue('H' . $filaExcel, $datosLicitacion['project']['name']);
|
227
|
|
- $sheet->setCellValue('I' . $filaExcel, $datosLicitacion['project']['estimatedOverallContractAmount']);
|
228
|
|
- $sheet->setCellValue('J' . $filaExcel, $datosLicitacion['project']['taxExclusiveAmount']);
|
229
|
|
- $sheet->setCellValue('K' . $filaExcel, $datosLicitacion['project']['totalAmount']);
|
230
|
|
-
|
231
|
|
- /*$cpvProject = "";
|
232
|
|
- for ($i = 0; $i < count($datosLicitacion['projectActivity']); $i++) {
|
233
|
|
- $cpvProject .= $datosLicitacion['projectActivity'][$i]['itemClassification_value'] . ";";
|
234
|
|
- }*/
|
235
|
|
-
|
236
|
|
- /*$cpvParty = "";
|
237
|
|
- //TODO OBtener solo el DIR3
|
238
|
|
- for ($i = 0; $i < count($datosLicitacion['partyActivity']); $i++) {
|
239
|
|
- $cpvParty .= $datosLicitacion['partyActivity'][$i]['idPartyIdent'] . ";";
|
240
|
|
- }*/
|
241
|
|
-
|
242
|
|
- $sheet->setCellValue('L' . $filaExcel, ""); //$cpvProject);
|
243
|
|
- $sheet->setCellValue('M' . $filaExcel, $datosLicitacion['project']['tipo_contrato']);
|
244
|
|
- $sheet->setCellValue('N' . $filaExcel, $datosLicitacion['project']['countrySubentityCode'] . " - " . $datosLicitacion['project']['countrySubentity']);
|
245
|
|
- $sheet->setCellValue('O' . $filaExcel, $datosLicitacion['party']['partyName']);
|
246
|
|
- $sheet->setCellValue('P' . $filaExcel, "");
|
247
|
|
- $sheet->setCellValue('Q' . $filaExcel, $datosLicitacion['locatedParty']['contractingPartyTypeCode']);
|
248
|
|
- $sheet->setCellValue('R' . $filaExcel, ""); //$cpvParty);
|
249
|
|
- $sheet->setCellValue('S' . $filaExcel, $datosLicitacion['locatedParty']['buyerProfileURIID']); //Buscar DIR3
|
250
|
|
- $sheet->setCellValue('T' . $filaExcel, $datosLicitacion['locatedParty']['tipo_administracion']);
|
251
|
|
- $sheet->setCellValue('U' . $filaExcel, $datosLicitacion['party']['codpostal']);
|
252
|
|
- $sheet->setCellValue('V' . $filaExcel, $datosLicitacion['tenderProcess']['tipoTender']);
|
253
|
|
- $sheet->setCellValue('W' . $filaExcel, $datosLicitacion['tenderProcess']['contrato_sistema']);
|
254
|
|
- $sheet->setCellValue('X' . $filaExcel, $datosLicitacion['tenderProcess']['urgency']);
|
255
|
|
- $sheet->setCellValue('Y' . $filaExcel, $datosLicitacion['tenderProcess']['submision']);
|
256
|
|
- $sheet->setCellValue('Z' . $filaExcel, $datosLicitacion['tenderTerms']['procurementLegislationDocumentReference']);
|
257
|
|
- $sheet->setCellValue('AA' . $filaExcel, $datosLicitacion['tenderTerms']['allowedSubcontractTerms']);
|
258
|
|
- $sheet->setCellValue('AB' . $filaExcel, $datosLicitacion['project']['durationMesure']);
|
259
|
|
- $sheet->setCellValue('AC' . $filaExcel, $datosLicitacion['project']['medida']);
|
260
|
|
- $sheet->setCellValue('AD' . $filaExcel, $datosLicitacion['project']['duracion_inicio']);
|
261
|
|
- $sheet->setCellValue('AE' . $filaExcel, $datosLicitacion['project']['duracion_fin']);
|
262
|
|
- $sheet->setCellValue('AF' . $filaExcel, $datosLicitacion['project']['contractExtension']);
|
263
|
|
- $sheet->setCellValue('AG' . $filaExcel, $datosLicitacion['party']['websiteURI']);
|
264
|
|
- $sheet->setCellValue('AH' . $filaExcel, $datosLicitacion['party']['city']);
|
265
|
|
- $sheet->setCellValue('AI' . $filaExcel, $datosLicitacion['party']['direccion']);
|
266
|
|
- $sheet->setCellValue('AJ' . $filaExcel, $datosLicitacion['party']['contact_name']);
|
267
|
|
- $sheet->setCellValue('AK' . $filaExcel, $datosLicitacion['party']['contact_email']);
|
|
236
|
+
|
|
237
|
+ //Primera Publicacion
|
|
238
|
+ $contador = 0;
|
|
239
|
+ foreach ($datosLicitacion as $row) {
|
|
240
|
+ guardar_log("Excel", "Escribir excel datos licitacion--" . $contador);
|
|
241
|
+ $contador++;
|
|
242
|
+ $primeraPublicacion = $this->primeraPublicacion($row['licitacion']['id_licitacion']);
|
|
243
|
+
|
|
244
|
+ $updated = $this->formatFechas($row['licitacion']['updated']);
|
|
245
|
+
|
|
246
|
+ $sheet->getStyle("A1:AJ1")->applyFromArray($styleArr);
|
|
247
|
+ $sheet->setCellValue('A' . $this->filaDatoLicitacion, $row['licitacion']['id_licitacion']);
|
|
248
|
+ $sheet->setCellValue('B' . $this->filaDatoLicitacion, $row['licitacion']['link_uri']);
|
|
249
|
+ $sheet->setCellValue('C' . $this->filaDatoLicitacion, $updated);
|
|
250
|
+ $sheet->getStyle('C' . $this->filaDatoLicitacion)
|
|
251
|
+ ->getNumberFormat()
|
|
252
|
+ ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
|
|
253
|
+ $sheet->setCellValue('E' . $this->filaDatoLicitacion, $primeraPublicacion);
|
|
254
|
+ $sheet->getStyle('E' . $this->filaDatoLicitacion)
|
|
255
|
+ ->getNumberFormat()
|
|
256
|
+ ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
|
|
257
|
+ $sheet->setCellValue('F' . $this->filaDatoLicitacion, $row['contract']['descripcion']);
|
|
258
|
+ $sheet->setCellValue('G' . $this->filaDatoLicitacion, $row['contract']['contractFolderID']);
|
|
259
|
+ $sheet->setCellValue('H' . $this->filaDatoLicitacion, $row['project']['name']);
|
|
260
|
+ $sheet->setCellValue('I' . $this->filaDatoLicitacion, $row['project']['estimatedOverallContractAmount']);
|
|
261
|
+ $sheet->getStyle('I' . $this->filaDatoLicitacion)
|
|
262
|
+ ->getNumberFormat()
|
|
263
|
+ ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_ACCOUNTING_EUR);
|
|
264
|
+ $sheet->setCellValue('J' . $this->filaDatoLicitacion, $row['project']['taxExclusiveAmount']);
|
|
265
|
+ $sheet->getStyle('J' . $this->filaDatoLicitacion)
|
|
266
|
+ ->getNumberFormat()
|
|
267
|
+ ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_ACCOUNTING_EUR);
|
|
268
|
+
|
|
269
|
+ $sheet->setCellValue('K' . $this->filaDatoLicitacion, $row['locatedParty']['itemClassification_attr']);
|
|
270
|
+ $sheet->setCellValue('L' . $this->filaDatoLicitacion, $row['project']['tipo_contrato']);
|
|
271
|
+ $sheet->setCellValue('M' . $this->filaDatoLicitacion, $row['project']['countrySubentityCode'] . " - " . $row['project']['countrySubentity']);
|
|
272
|
+ $sheet->setCellValue('N' . $this->filaDatoLicitacion, $row['party']['partyName']);
|
|
273
|
+ $sheet->setCellValue('O' . $this->filaDatoLicitacion, ($row['party']['tipoIdParty'] == "ID_PLATAFORMA") ? $row['party']['partyItem'] : "");
|
|
274
|
+ $sheet->setCellValue('P' . $this->filaDatoLicitacion, ($row['party']['tipoIdParty'] == "NIF") ? $row['party']['partyItem'] : "");
|
|
275
|
+ $sheet->setCellValue('Q' . $this->filaDatoLicitacion, ($row['party']['tipoIdParty'] == "DIR3") ? $row['party']['partyItem'] : "");
|
|
276
|
+ $sheet->setCellValue('R' . $this->filaDatoLicitacion, $row['locatedParty']['buyerProfileURIID']);
|
|
277
|
+ $sheet->setCellValue('S' . $this->filaDatoLicitacion, $row['locatedParty']['tipo_administracion']);
|
|
278
|
+ $sheet->setCellValue('T' . $this->filaDatoLicitacion, $row['party']['codpostal']);
|
|
279
|
+ $sheet->setCellValue('U' . $this->filaDatoLicitacion, $row['tenderProcess']['tipoTender']);
|
|
280
|
+ $sheet->setCellValue('V' . $this->filaDatoLicitacion, $row['tenderProcess']['contrato_sistema']);
|
|
281
|
+ $sheet->setCellValue('W' . $this->filaDatoLicitacion, $row['tenderProcess']['urgency']);
|
|
282
|
+ $sheet->setCellValue('X' . $this->filaDatoLicitacion, $row['tenderProcess']['submision']);
|
|
283
|
+ $sheet->setCellValue('ZY' . $this->filaDatoLicitacion, $row['tenderTerms']['procurementLegislationDocumentReference']);
|
|
284
|
+ $sheet->setCellValue('Z' . $this->filaDatoLicitacion, $row['tenderTerms']['allowedSubcontractTerms']);
|
|
285
|
+ $sheet->setCellValue('AA' . $this->filaDatoLicitacion, $row['project']['durationMesure']);
|
|
286
|
+ $sheet->setCellValue('AB' . $this->filaDatoLicitacion, $row['project']['medida']);
|
|
287
|
+ $sheet->setCellValue('AC' . $this->filaDatoLicitacion, $this->formatFechas($row['project']['duracion_inicio']));
|
|
288
|
+ $sheet->getStyle('AC' . $this->filaDatoLicitacion)
|
|
289
|
+ ->getNumberFormat()
|
|
290
|
+ ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
|
|
291
|
+ $sheet->setCellValue('AD' . $this->filaDatoLicitacion, $this->formatFechas($row['project']['duracion_fin']));
|
|
292
|
+ $sheet->getStyle('AD' . $this->filaDatoLicitacion)
|
|
293
|
+ ->getNumberFormat()
|
|
294
|
+ ->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DDMMYYYY);
|
|
295
|
+ $sheet->setCellValue('AE' . $this->filaDatoLicitacion, $row['project']['contractExtension']);
|
|
296
|
+ $sheet->setCellValue('AF' . $this->filaDatoLicitacion, $row['party']['websiteURI']);
|
|
297
|
+ $sheet->setCellValue('AG' . $this->filaDatoLicitacion, $row['party']['city']);
|
|
298
|
+ $sheet->setCellValue('AH' . $this->filaDatoLicitacion, $row['party']['direccion']);
|
|
299
|
+ $sheet->setCellValue('AI' . $this->filaDatoLicitacion, $row['party']['contact_name']);
|
|
300
|
+ $sheet->setCellValue('AJ' . $this->filaDatoLicitacion, $row['party']['contact_email']);
|
|
301
|
+ $this->filaDatoLicitacion++;
|
|
302
|
+ }
|
268
|
303
|
|
269
|
304
|
return $spreadsheet;
|
270
|
305
|
|
271
|
306
|
}
|
272
|
307
|
|
273
|
|
- private function datosCompletosHojaBitacora($spreadsheet, $datosLicitacion)
|
|
308
|
+ private function formatFechas($fecha)
|
274
|
309
|
{
|
275
|
|
- $spreadsheet->setActiveSheetIndex(1);
|
276
|
|
- $spreadsheet->getActiveSheet()->setTitle("Bitácora");
|
|
310
|
+ $fechaFinal = "";
|
277
|
311
|
|
278
|
|
- foreach ($datosLicitacion['projectLot'] as $datos) {
|
279
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaProjectLot, $datos['id_ajena_licitacion']);
|
280
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaProjectLot, $datos['name']);
|
281
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaProjectLot, $datos['idProcurementLot']);
|
282
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('D' . $this->filaProjectLot, $datos['totalAmount']);
|
283
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('E' . $this->filaProjectLot, $datos['taxExclusiveAmount']);
|
284
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('F' . $this->filaProjectLot, $datos['countrySubentity']);
|
285
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('G' . $this->filaProjectLot, $datos['countrySubentityCode']);
|
286
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('H' . $this->filaProjectLot, $datos['nameLocation']);
|
|
312
|
+ if ($fecha != "0000-00-00") {
|
|
313
|
+ $fechaFormat = new DateTime($fecha);
|
|
314
|
+ $fechaFinal = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($fechaFormat);
|
|
315
|
+ }
|
287
|
316
|
|
288
|
|
- $cpv = "";
|
289
|
|
- $projectLotActivity = $this->Xlsexport_model->getProjectLotActivityByProjectLot($datos['id']);
|
|
317
|
+ return $fechaFinal;
|
|
318
|
+ }
|
290
|
319
|
|
291
|
|
- if ($projectLotActivity['num_rows'] > 0) {
|
292
|
|
- for ($i = 0; $i < count($projectLotActivity['datos']); $i++) {
|
|
320
|
+ private function primeraPublicacion($idLicitacion)
|
|
321
|
+ {
|
|
322
|
+ $result = "";
|
293
|
323
|
|
294
|
|
- $cpv .= $projectLotActivity['datos'][$i]['idItem'] . ";";
|
295
|
|
- }
|
296
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('I' . $this->filaProjectLot, $cpv);
|
297
|
|
- }
|
|
324
|
+ $fechasPublicaciones = $this->Xlsexport_model->getFechasPublicadas($idLicitacion);
|
|
325
|
+
|
|
326
|
+ if ($fechasPublicaciones['num_rows'] > 0) {
|
|
327
|
+ $primeraFechaFormat = new Datetime($fechasPublicaciones['datos']->fecha);
|
|
328
|
+ $result = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($primeraFechaFormat);
|
|
329
|
+ }
|
|
330
|
+ return $result;
|
|
331
|
+ }
|
|
332
|
+
|
|
333
|
+ private function datosCompletosHojaBitacora($spreadsheet, $datosLicitacion)
|
|
334
|
+ {
|
|
335
|
+ $sheet = $spreadsheet->getSheet(1);
|
|
336
|
+ $sheet->setTitle("Bitacora");
|
|
337
|
+ $styleArr = array(
|
|
338
|
+ "font" => array(
|
|
339
|
+ "bold" => true,
|
|
340
|
+ "color" => array("rgb" => "22B9FF"),
|
|
341
|
+ "size" => 13,
|
|
342
|
+ ),
|
|
343
|
+ );
|
|
344
|
+ $sheet->getStyle("A1:F1")->applyFromArray($styleArr);
|
|
345
|
+ $contador = 0;
|
|
346
|
+ foreach ($datosLicitacion['projectLot']['datos'] as $bitacora) {
|
|
347
|
+ guardar_log("Excel", "Escribir bitacora--" . $contador);
|
|
348
|
+ $contador++;
|
|
349
|
+ $sheet->SetCellValue('A' . $this->filaProjectLot, $bitacora['id_ajena_licitacion']);
|
|
350
|
+ $sheet->SetCellValue('B' . $this->filaProjectLot, $bitacora['name']);
|
|
351
|
+ $sheet->setCellValue('C' . $this->filaProjectLot, $bitacora['idProcurementLot']);
|
|
352
|
+ $sheet->SetCellValue('D' . $this->filaProjectLot, $bitacora['taxExclusiveAmount']);
|
|
353
|
+ $sheet->SetCellValue('F' . $this->filaProjectLot, $bitacora['countrySubentity']);
|
|
354
|
+ $sheet->SetCellValue('I' . $this->filaProjectLot, $bitacora['itemClassification_attr']);
|
298
|
355
|
$this->filaProjectLot++;
|
299
|
356
|
}
|
300
|
357
|
return $spreadsheet;
|
301
|
358
|
}
|
302
|
359
|
|
303
|
|
- private function datosCompletosMediosPublicacion($spreadsheet)
|
|
360
|
+ private function datosCompletosMediosPublicacion($spreadsheet, $datos)
|
304
|
361
|
{
|
305
|
362
|
$spreadsheet->setActiveSheetIndex(2);
|
306
|
363
|
$spreadsheet->getActiveSheet()->setTitle("Medios de publicación");
|
307
|
|
- $datos = $this->Xlsexport_model->getValidNoticeInfoRelacion();
|
308
|
364
|
|
309
|
365
|
if ($datos['num_rows'] > 0) {
|
|
366
|
+ $contador = 0;
|
310
|
367
|
$aux = 2;
|
311
|
368
|
foreach ($datos['datos'] as $datos) {
|
|
369
|
+ guardar_log("Excel", "Escribir datos medio publicacion--" . $contador);
|
|
370
|
+ $contador++;
|
312
|
371
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
|
313
|
372
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['noticeTypeCode']);
|
314
|
373
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['publicationMediaName']);
|
|
@@ -319,14 +378,17 @@ class ExportXls extends CI_Controller
|
319
|
378
|
return $spreadsheet;
|
320
|
379
|
}
|
321
|
380
|
|
322
|
|
- private function datosMedioPublicacion($spreadsheet)
|
|
381
|
+ private function datosMedioPublicacion($spreadsheet, $datos)
|
323
|
382
|
{
|
324
|
383
|
$spreadsheet->setActiveSheetIndex(3);
|
325
|
384
|
$spreadsheet->getActiveSheet()->setTitle("Documentos Medios Comm");
|
326
|
|
- $datos = $this->Xlsexport_model->getDatosRelacionadasTablaWithoutLicitacion("maestro_valid_notice_info_documento", "maestro_valid_notice_info", "id_ajena_vni");
|
|
385
|
+
|
327
|
386
|
if ($datos['num_rows'] > 0) {
|
328
|
387
|
$aux = 2;
|
|
388
|
+ $contador = 0;
|
329
|
389
|
foreach ($datos['datos'] as $row) {
|
|
390
|
+ guardar_log("Excel", "Escribir documentios medios comunicacion--" . $contador);
|
|
391
|
+ $contador++;
|
330
|
392
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $row['id_ajena_licitacion']);
|
331
|
393
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $row['documento']);
|
332
|
394
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $row['filename']);
|
|
@@ -337,15 +399,17 @@ class ExportXls extends CI_Controller
|
337
|
399
|
return $spreadsheet;
|
338
|
400
|
}
|
339
|
401
|
|
340
|
|
- private function datosCompletosResultadoDelProcedimiento($spreadsheet)
|
|
402
|
+ private function datosCompletosResultadoDelProcedimiento($spreadsheet, $datos)
|
341
|
403
|
{
|
342
|
404
|
$spreadsheet->setActiveSheetIndex(4);
|
343
|
405
|
$spreadsheet->getActiveSheet()->setTitle("Resultado del Procedimiento");
|
344
|
406
|
|
345
|
|
- $datos = $this->Xlsexport_model->getTenderResult("maestro_tender_result");
|
346
|
407
|
if ($datos['num_rows'] > 0) {
|
347
|
408
|
$aux = 2;
|
|
409
|
+ $contador = 0;
|
348
|
410
|
foreach ($datos['datos'] as $datos) {
|
|
411
|
+ guardar_log("Excel", "Escribir tender result--" . $contador);
|
|
412
|
+ $contador++;
|
349
|
413
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
|
350
|
414
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['resultCode']);
|
351
|
415
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['description']);
|
|
@@ -368,15 +432,18 @@ class ExportXls extends CI_Controller
|
368
|
432
|
return $spreadsheet;
|
369
|
433
|
}
|
370
|
434
|
|
371
|
|
- private function datosCompletosTipoProcedimiento($spreadsheet)
|
|
435
|
+ private function datosCompletosTipoProcedimiento($spreadsheet, $datos)
|
372
|
436
|
{
|
373
|
437
|
$spreadsheet->setActiveSheetIndex(5);
|
374
|
438
|
$spreadsheet->getActiveSheet()->setTitle("Tipo Procedimiento");
|
375
|
439
|
|
376
|
|
- $datos = $this->Xlsexport_model->getTenderProcessRelacion();
|
|
440
|
+ //$datos = $this->Xlsexport_model->getTenderProcessRelacion();
|
377
|
441
|
if ($datos['num_rows'] > 0) {
|
378
|
442
|
$aux = 2;
|
|
443
|
+ $contador = 0;
|
379
|
444
|
foreach ($datos['datos'] as $datos) {
|
|
445
|
+ guardar_log("Excel", "Escribir tender process--" . $contador);
|
|
446
|
+ $contador++;
|
380
|
447
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
|
381
|
448
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['procedureCode']);
|
382
|
449
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['urgencyCode']);
|
|
@@ -400,15 +467,17 @@ class ExportXls extends CI_Controller
|
400
|
467
|
return $spreadsheet;
|
401
|
468
|
}
|
402
|
469
|
|
403
|
|
- private function datosCompletosOfertas($spreadsheet)
|
|
470
|
+ private function datosCompletosOfertas($spreadsheet, $datos)
|
404
|
471
|
{
|
405
|
472
|
$spreadsheet->setActiveSheetIndex(6);
|
406
|
473
|
$spreadsheet->getActiveSheet()->setTitle("Ofertas");
|
407
|
474
|
|
408
|
|
- $datos = $this->Xlsexport_model->getTenderingTermsGarantia("maestro_tendering_terms");
|
409
|
475
|
if ($datos['num_rows'] > 0) {
|
410
|
476
|
$aux = 2;
|
|
477
|
+ $contador = 0;
|
411
|
478
|
foreach ($datos['datos'] as $datos) {
|
|
479
|
+ guardar_log("Excel", "Escribir tender process--" . $contador);
|
|
480
|
+ $contador++;
|
412
|
481
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
|
413
|
482
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['requiredCurriculaIndicator']);
|
414
|
483
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['variantConstraintIndicator']);
|
|
@@ -427,35 +496,40 @@ class ExportXls extends CI_Controller
|
427
|
496
|
return $spreadsheet;
|
428
|
497
|
}
|
429
|
498
|
|
430
|
|
- private function datosCriterioAdjudicacion($spreadsheet)
|
|
499
|
+ private function datosCriterioAdjudicacion($spreadsheet, $datos)
|
431
|
500
|
{
|
432
|
501
|
$spreadsheet->setActiveSheetIndex(7);
|
433
|
502
|
$spreadsheet->getActiveSheet()->setTitle("Criterio Adjudicación");
|
434
|
503
|
|
435
|
|
- /*$datos = $this->Xlsexport_model->getDatosRelacionadasTablaWithoutLicitacion("maestro_tendering_terms_awarding_terms", "maestro_tendering_terms", "id_ajena_tt");
|
|
504
|
+ //$datos = $this->Xlsexport_model->getDatosRelacionadasTablaWithoutLicitacion("maestro_tendering_terms_awarding_terms", "maestro_tendering_terms", "id_ajena_tt");
|
436
|
505
|
if ($datos['num_rows'] > 0) {
|
437
|
|
- $aux = 2;
|
438
|
|
-
|
439
|
|
- foreach ($datos['datos'] as $datos) {
|
440
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_tt']);
|
441
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
|
442
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['description']);
|
443
|
|
- $aux++;
|
|
506
|
+ $aux = 2;
|
|
507
|
+ $contador = 0;
|
|
508
|
+ foreach ($datos['datos'] as $datos) {
|
|
509
|
+ guardar_log("Excel", "Escribir criterio adjucicacion--" . $contador);
|
|
510
|
+ $contador++;
|
|
511
|
+ $spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
|
|
512
|
+ $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
|
|
513
|
+ $spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['description']);
|
|
514
|
+ $aux++;
|
|
515
|
+ }
|
444
|
516
|
}
|
445
|
|
- }*/
|
446
|
517
|
|
447
|
518
|
return $spreadsheet;
|
448
|
519
|
}
|
449
|
520
|
|
450
|
|
- private function datosCriterioEvaluacionFinanciera($spreadsheet)
|
|
521
|
+ private function datosCriterioEvaluacionFinanciera($spreadsheet, $datos)
|
451
|
522
|
{
|
452
|
523
|
$spreadsheet->setActiveSheetIndex(8);
|
453
|
524
|
$spreadsheet->getActiveSheet()->setTitle("CriteriosEvaluacionFinanciera");
|
454
|
525
|
|
455
|
|
- $datos = $this->Xlsexport_model->getTenderingTermsCriteriosFinanciacion();
|
|
526
|
+ //$datos = $this->Xlsexport_model->getTenderingTermsCriteriosFinanciacion();
|
456
|
527
|
if ($datos['num_rows'] > 0) {
|
457
|
528
|
$aux = 2;
|
|
529
|
+ $contador = 0;
|
458
|
530
|
foreach ($datos['datos'] as $datos) {
|
|
531
|
+ guardar_log("Excel", "Escribir criterios evaluacion financiera--" . $contador);
|
|
532
|
+ $contador++;
|
459
|
533
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
|
460
|
534
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
|
461
|
535
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['description']);
|
|
@@ -465,15 +539,18 @@ class ExportXls extends CI_Controller
|
465
|
539
|
return $spreadsheet;
|
466
|
540
|
}
|
467
|
541
|
|
468
|
|
- private function datosCriterioEvaluacionTecnica($spreadsheet)
|
|
542
|
+ private function datosCriterioEvaluacionTecnica($spreadsheet, $datos)
|
469
|
543
|
{
|
470
|
544
|
$spreadsheet->setActiveSheetIndex(9);
|
471
|
545
|
$spreadsheet->getActiveSheet()->setTitle("Criterios Evaluación Técnica");
|
472
|
546
|
|
473
|
|
- $datos = $this->Xlsexport_model->getTenderingTermsCriteriosTecnicos();
|
|
547
|
+ //$datos = $this->Xlsexport_model->getTenderingTermsCriteriosTecnicos();
|
474
|
548
|
if ($datos['num_rows'] > 0) {
|
475
|
549
|
$aux = 2;
|
|
550
|
+ $contador = 0;
|
476
|
551
|
foreach ($datos['datos'] as $datos) {
|
|
552
|
+ guardar_log("Excel", "Escribir criterio evaluacion tecnica--" . $contador);
|
|
553
|
+ $contador++;
|
477
|
554
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
|
478
|
555
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
|
479
|
556
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $aux, $datos['description']);
|
|
@@ -484,15 +561,18 @@ class ExportXls extends CI_Controller
|
484
|
561
|
return $spreadsheet;
|
485
|
562
|
}
|
486
|
563
|
|
487
|
|
- private function datosRequisitosParticipacion($spreadsheet)
|
|
564
|
+ private function datosRequisitosParticipacion($spreadsheet, $datos)
|
488
|
565
|
{
|
489
|
566
|
$spreadsheet->setActiveSheetIndex(10);
|
490
|
567
|
$spreadsheet->getActiveSheet()->setTitle("Requisitos Participación");
|
491
|
568
|
|
492
|
|
- $datos = $this->Xlsexport_model->getTenderingTermsRequisitos();
|
|
569
|
+ //$datos = $this->Xlsexport_model->getTenderingTermsRequisitos();
|
493
|
570
|
if ($datos['num_rows'] > 0) {
|
494
|
571
|
$aux = 2;
|
|
572
|
+ $contador = 0;
|
495
|
573
|
foreach ($datos['datos'] as $datos) {
|
|
574
|
+ guardar_log("Excel", "Escribir requisitos participacion--" . $contador);
|
|
575
|
+ $contador++;
|
496
|
576
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $aux, $datos['id_ajena_licitacion']);
|
497
|
577
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $aux, $datos['evaluationCriteriaTypeCode']);
|
498
|
578
|
$aux++;
|
|
@@ -507,7 +587,10 @@ class ExportXls extends CI_Controller
|
507
|
587
|
|
508
|
588
|
$spreadsheet->setActiveSheetIndex(11);
|
509
|
589
|
$spreadsheet->getActiveSheet()->setTitle("Documentos Generales");
|
510
|
|
- foreach ($datosLicitacion['generalDocs'] as $doc) {
|
|
590
|
+ $contador = 0;
|
|
591
|
+ foreach ($datosLicitacion['datos'] as $doc) {
|
|
592
|
+ guardar_log("Excel", "Escribir documentos generales--" . $contador);
|
|
593
|
+ $contador++;
|
511
|
594
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoGeneral, $doc['id_ajena_licitacion']);
|
512
|
595
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoGeneral, $doc['attachment']);
|
513
|
596
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoGeneral, $doc['fileName']);
|
|
@@ -523,7 +606,10 @@ class ExportXls extends CI_Controller
|
523
|
606
|
{
|
524
|
607
|
$spreadsheet->setActiveSheetIndex(12);
|
525
|
608
|
$spreadsheet->getActiveSheet()->setTitle("Documentos Adicionales");
|
526
|
|
- foreach ($datosLicitacion['additDocs'] as $doc) {
|
|
609
|
+ $contador = 0;
|
|
610
|
+ foreach ($datosLicitacion['datos'] as $doc) {
|
|
611
|
+ guardar_log("Excel", "Escribir documentos adicionales--" . $contador);
|
|
612
|
+ $contador++;
|
527
|
613
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoAdd, $doc['id_ajena_licitacion']);
|
528
|
614
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoAdd, $doc['attachment']);
|
529
|
615
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoAdd, $doc['idDoc']);
|
|
@@ -538,7 +624,10 @@ class ExportXls extends CI_Controller
|
538
|
624
|
{
|
539
|
625
|
$spreadsheet->setActiveSheetIndex(13);
|
540
|
626
|
$spreadsheet->getActiveSheet()->setTitle("Documentos Técnicos");
|
541
|
|
- foreach ($datosLicitacion['techDocs'] as $doc) {
|
|
627
|
+ $contador = 0;
|
|
628
|
+ foreach ($datosLicitacion['datos'] as $doc) {
|
|
629
|
+ guardar_log("Excel", "Escribir documentos tecnicos--" . $contador);
|
|
630
|
+ $contador++;
|
542
|
631
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoTech, $doc['id_ajena_licitacion']);
|
543
|
632
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoTech, $doc['attachment']);
|
544
|
633
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoTech, $doc['idDoc']);
|
|
@@ -553,7 +642,10 @@ class ExportXls extends CI_Controller
|
553
|
642
|
{
|
554
|
643
|
$spreadsheet->setActiveSheetIndex(14);
|
555
|
644
|
$spreadsheet->getActiveSheet()->setTitle("Documentos Legales");
|
556
|
|
- foreach ($datosLicitacion['legalDocs'] as $doc) {
|
|
645
|
+ $contador = 0;
|
|
646
|
+ foreach ($datosLicitacion['datos'] as $doc) {
|
|
647
|
+ guardar_log("Excel", "Escribir documentos legales--" . $contador);
|
|
648
|
+ $contador++;
|
557
|
649
|
$spreadsheet->getActiveSheet()->SetCellValue('A' . $this->filaDocumentoLegal, $doc['id_ajena_licitacion']);
|
558
|
650
|
$spreadsheet->getActiveSheet()->SetCellValue('B' . $this->filaDocumentoLegal, $doc['attachment']);
|
559
|
651
|
$spreadsheet->getActiveSheet()->SetCellValue('C' . $this->filaDocumentoLegal, $doc['idDoc']);
|
|
@@ -577,33 +669,32 @@ class ExportXls extends CI_Controller
|
577
|
669
|
$spreadsheet->getActiveSheet()->SetCellValue('H1', "Objeto del Contrato");
|
578
|
670
|
$spreadsheet->getActiveSheet()->SetCellValue('I1', "Valor estimado del contrato");
|
579
|
671
|
$spreadsheet->getActiveSheet()->SetCellValue('J1', "Presupuesto base sin impuestos");
|
580
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('K1', "Presupuesto base con impuestos");
|
581
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('L1', "CPV");
|
582
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('M1', "Tipo de contrato");
|
583
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('N1', "Lugar de ejecución");
|
584
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('O1', "Órgano de Contratación");
|
585
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('P1', "ID OC en PLACSP");
|
586
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('Q1', "NIF OC");
|
587
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('R1', "DIR3");
|
588
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('S1', "Enlace al Perfil de Contratante del OC");
|
589
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('T1', "Tipo de Administración");
|
590
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('U1', "Código Postal");
|
591
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('V1', "Tipo de procedimiento");
|
592
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('W1', "Sistema de contratación");
|
593
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('X1', "Tramitación");
|
594
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('Y1', "Forma de presentación de la oferta");
|
595
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('Z1', "Directiva de aplicación");
|
596
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AA1', "Subcontratación permitida");
|
597
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AB1', "Duración Contrato");
|
598
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AC1', "Tipo de duración");
|
599
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AD1', "Inicio contrato");
|
600
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AE1', "Fin contrato");
|
601
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AF1', "Extension Contrato");
|
602
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AG1', "URL Organo Contratación");
|
603
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AH1', "Ciudad Organo Contratación");
|
604
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AI1', "Dirección Organo Contratación");
|
605
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AJ1', "Nombre Contacto Organo Contratación");
|
606
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('AK1', "Email contacto Organo Contratación");
|
|
672
|
+ $spreadsheet->getActiveSheet()->SetCellValue('K1', "CPV");
|
|
673
|
+ $spreadsheet->getActiveSheet()->SetCellValue('L1', "Tipo de contrato");
|
|
674
|
+ $spreadsheet->getActiveSheet()->SetCellValue('M1', "Lugar de ejecución");
|
|
675
|
+ $spreadsheet->getActiveSheet()->SetCellValue('N1', "Órgano de Contratación");
|
|
676
|
+ $spreadsheet->getActiveSheet()->SetCellValue('O1', "ID OC en PLACSP");
|
|
677
|
+ $spreadsheet->getActiveSheet()->SetCellValue('P1', "NIF OC");
|
|
678
|
+ $spreadsheet->getActiveSheet()->SetCellValue('Q1', "DIR3");
|
|
679
|
+ $spreadsheet->getActiveSheet()->SetCellValue('R1', "Enlace al Perfil de Contratante del OC");
|
|
680
|
+ $spreadsheet->getActiveSheet()->SetCellValue('S1', "Tipo de Administración");
|
|
681
|
+ $spreadsheet->getActiveSheet()->SetCellValue('T1', "Código Postal");
|
|
682
|
+ $spreadsheet->getActiveSheet()->SetCellValue('U1', "Tipo de procedimiento");
|
|
683
|
+ $spreadsheet->getActiveSheet()->SetCellValue('V1', "Sistema de contratación");
|
|
684
|
+ $spreadsheet->getActiveSheet()->SetCellValue('W1', "Tramitación");
|
|
685
|
+ $spreadsheet->getActiveSheet()->SetCellValue('X1', "Forma de presentación de la oferta");
|
|
686
|
+ $spreadsheet->getActiveSheet()->SetCellValue('Y1', "Directiva de aplicación");
|
|
687
|
+ $spreadsheet->getActiveSheet()->SetCellValue('Z1', "Subcontratación permitida");
|
|
688
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AA1', "Duración Contrato");
|
|
689
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AB1', "Tipo de duración");
|
|
690
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AC1', "Inicio contrato");
|
|
691
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AD1', "Fin contrato");
|
|
692
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AE1', "Extension Contrato");
|
|
693
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AF1', "URL Organo Contratación");
|
|
694
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AG1', "Ciudad Organo Contratación");
|
|
695
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AH1', "Dirección Organo Contratación");
|
|
696
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AI1', "Nombre Contacto Organo Contratación");
|
|
697
|
+ $spreadsheet->getActiveSheet()->SetCellValue('AJ1', "Email contacto Organo Contratación");
|
607
|
698
|
return $spreadsheet;
|
608
|
699
|
}
|
609
|
700
|
|
|
@@ -628,9 +719,6 @@ class ExportXls extends CI_Controller
|
628
|
719
|
$spreadsheet->getActiveSheet()->SetCellValue('D1', "Importe sin Impuestos");
|
629
|
720
|
$spreadsheet->getActiveSheet()->SetCellValue('E1', "Importe con Impuestos");
|
630
|
721
|
$spreadsheet->getActiveSheet()->SetCellValue('F1', "Lugar de ejecución del lote");
|
631
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('G1', "Codigo de ejecución del lote");
|
632
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('H1', "Ciudad de ejecución del lote");
|
633
|
|
- $spreadsheet->getActiveSheet()->SetCellValue('I1', "CPV Project Lot");
|
634
|
722
|
|
635
|
723
|
return $spreadsheet;
|
636
|
724
|
}
|