Przeglądaj źródła

exportar fecha como campo fecha de excel

Nermosis 3 lat temu
rodzic
commit
183b133473

+ 10 - 6
application/controllers/ExportXls.php Wyświetl plik

@@ -123,7 +123,7 @@ class ExportXls extends CI_Controller
123 123
         foreach ($licitacionesResult['datos'] as $licitacion) {
124 124
             $result[$licitacion->id_licitacion]['licitacion'] = array(
125 125
                 'id_licitacion' => $licitacion->id_licitacion,
126
-                "url_id_licitacion" => $licitacion->url_id_licitacion,
126
+                "link_uri" => $licitacion->link_uri,
127 127
                 "updated" => $licitacion->updated,
128 128
             );
129 129
             $result[$licitacion->id_licitacion]['contract'] = array(
@@ -211,11 +211,15 @@ class ExportXls extends CI_Controller
211 211
                 "size" => 13,
212 212
             ),
213 213
         );
214
+        $updatedFormat = new DateTime($datosLicitacion['licitacion']['updated']);
215
+        $updated = \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($updatedFormat);
214 216
         $sheet->getStyle("A1:AB1")->applyFromArray($styleArr);
215 217
         $sheet->setCellValue('A' . $filaExcel, $datosLicitacion['licitacion']['id_licitacion']);
216
-        $sheet->setCellValue('B' . $filaExcel, $datosLicitacion['licitacion']['url_id_licitacion']);
217
-        $sheet->setCellValue('C' . $filaExcel, $datosLicitacion['licitacion']['updated']);
218
-        $sheet->setCellValue('D' . $filaExcel, );
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);
219 223
         $sheet->setCellValue('E' . $filaExcel, "");
220 224
         $sheet->setCellValue('F' . $filaExcel, $datosLicitacion['contract']['descripcion']);
221 225
         $sheet->setCellValue('G' . $filaExcel, $datosLicitacion['contract']['contractFolderID']);
@@ -239,7 +243,7 @@ class ExportXls extends CI_Controller
239 243
         $sheet->setCellValue('M' . $filaExcel, $datosLicitacion['project']['tipo_contrato']);
240 244
         $sheet->setCellValue('N' . $filaExcel, $datosLicitacion['project']['countrySubentityCode'] . " - " . $datosLicitacion['project']['countrySubentity']);
241 245
         $sheet->setCellValue('O' . $filaExcel, $datosLicitacion['party']['partyName']);
242
-        $sheet->setCellValue('P' . $filaExcel, $datosLicitacion['locatedParty']['partyName']);
246
+        $sheet->setCellValue('P' . $filaExcel, "");
243 247
         $sheet->setCellValue('Q' . $filaExcel, $datosLicitacion['locatedParty']['contractingPartyTypeCode']);
244 248
         $sheet->setCellValue('R' . $filaExcel, ""); //$cpvParty);
245 249
         $sheet->setCellValue('S' . $filaExcel, $datosLicitacion['locatedParty']['buyerProfileURIID']); //Buscar DIR3
@@ -248,7 +252,7 @@ class ExportXls extends CI_Controller
248 252
         $sheet->setCellValue('V' . $filaExcel, $datosLicitacion['tenderProcess']['tipoTender']);
249 253
         $sheet->setCellValue('W' . $filaExcel, $datosLicitacion['tenderProcess']['contrato_sistema']);
250 254
         $sheet->setCellValue('X' . $filaExcel, $datosLicitacion['tenderProcess']['urgency']);
251
-        $sheet->setCellValue('Y' . $filaExcel, $datosLicitacion['tenderProcess']['submission']);
255
+        $sheet->setCellValue('Y' . $filaExcel, $datosLicitacion['tenderProcess']['submision']);
252 256
         $sheet->setCellValue('Z' . $filaExcel, $datosLicitacion['tenderTerms']['procurementLegislationDocumentReference']);
253 257
         $sheet->setCellValue('AA' . $filaExcel, $datosLicitacion['tenderTerms']['allowedSubcontractTerms']);
254 258
         $sheet->setCellValue('AB' . $filaExcel, $datosLicitacion['project']['durationMesure']);

+ 6 - 3
application/models/Xlsexport_model.php Wyświetl plik

@@ -35,10 +35,12 @@ class Xlsexport_model extends CI_Model
35 35
                     CF.id,
36 36
                     LI.id_licitacion,
37 37
                     GROUP_CONCAT( PROJI.itemClassification_value ) AS itemClassification_attr,
38
-                    LI.url_id_licitacion,
38
+                    LI.link_uri,
39 39
                     LI.updated,
40 40
                     CF.contractFolderID,
41
+                    CF.contractFolderStatusCode,
41 42
                     LP.buyerProfileURIID,
43
+                    LP.contractingPartyTypeCode,
42 44
                     MP.partyName,
43 45
                     MP.codpostal,
44 46
                     MP.websiteURI,
@@ -46,7 +48,7 @@ class Xlsexport_model extends CI_Model
46 48
                     MP.direccion,
47 49
                     MP.contact_name,
48 50
                     MP.contact_email,
49
-                    PROJ.NAME,
51
+                    PROJ.NAME as name,
50 52
                     PROJ.estimatedOverallContractAmount,
51 53
                     PROJ.taxExclusiveAmount,
52 54
                     PROJ.totalAmount,
@@ -68,7 +70,8 @@ class Xlsexport_model extends CI_Model
68 70
                     RTPU.nombre AS urgency,
69 71
                     LI.fecha_creacion_log
70 72
                 FROM
71
-                    maestro_datos_iniciales_licitacion LI /*JOIN import_licitaciones_temp temp ON LI.id_licitacion = temp.id_licitacion*/
73
+                    maestro_datos_iniciales_licitacion LI
74
+                    JOIN import_licitaciones_temp temp ON LI.id_licitacion = temp.id_licitacion
72 75
                     LEFT JOIN maestro_contract_folder CF ON CF.id_ajena_licitacion = LI.id_licitacion
73 76
                     LEFT JOIN maestro_located_contracting_party LP ON LP.id_ajena_licitacion = LI.id_licitacion
74 77
                     LEFT JOIN maestro_party MP ON MP.id_ajena_licitacion = LI.id_licitacion