Просмотр исходного кода

Exportar hoja resultados en excel

Nermosis 3 лет назад
Родитель
Сommit
63b1026ccb
3 измененных файлов: 552 добавлений и 39 удалений
  1. 168 39
      application/controllers/ExportXls.php
  2. 13 0
      application/libraries/Excel.php
  3. 371 0
      application/models/Xlsexport_model.php

+ 168 - 39
application/controllers/ExportXls.php Просмотреть файл

@@ -27,50 +27,82 @@ class ExportXls extends CI_Controller
27 27
         $this->load->model("Xlsexport_model");
28 28
     }
29 29
 
30
-    public function exportOpenPlacsp()
30
+    public function exportDatosCompletos()
31 31
     {
32
+        $licitacionesResult = $this->Xlsexport_model->getLicitaciones();
33
+        $result = array();
34
+
35
+        //$start = $this->starttime();
36
+        if ($licitacionesResult['num_rows'] > 0) {
37
+            foreach ($licitacionesResult['datos'] as $licitacion) {
38
+                $result[$licitacion->id]['licitacion'] = $licitacion;
39
+                $result[$licitacion->id]['contract'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_contract_folder", $licitacion->id);
40
+                $result[$licitacion->id]['locatedParty'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_located_contracting_party", $licitacion->id);
41
+                $result[$licitacion->id]['party'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_party", $licitacion->id);
42
+                foreach ($result[$licitacion->id]['party'] as $row) {
43
+                    $result[$licitacion->id]['partyActivity'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_party_party_idenfitication", "id_ajena_party", $row['id']);
44
+                }
45
+
46
+                $result[$licitacion->id]['project'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_procurement_project", $licitacion->id);
47
+                foreach ($result[$licitacion->id]['project'] as $row) {
48
+                    $result[$licitacion->id]['projectActivity'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_procurement_project_itemClass", "id_ajena_pp", $row['id']);
49
+                }
50
+
51
+                $result[$licitacion->id]['projectLot'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_procurement_project_lot", $licitacion->id);
52
+                foreach ($result[$licitacion->id]['projectLot'] as $row) {
53
+                    $result[$licitacion->id]['projectLotActivity'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_procurement_project_lot_item", "id_ajena_ppl", $row['id']);
54
+                }
55
+
56
+                $result[$licitacion->id]['tenderResult'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_tender_result", $licitacion->id);
57
+                $result[$licitacion->id]['tenderProcess'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_tendering_process", $licitacion->id);
58
+                $result[$licitacion->id]['tenderTerms'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_tendering_terms", $licitacion->id);
59
+                foreach ($result[$licitacion->id]['tenderTerms'] as $row) {
60
+                    $result[$licitacion->id]['tenderTermsAwarding'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_tendering_terms_awarding_terms", "id_ajena_tt", $row['id']);
61
+                    $result[$licitacion->id]['tenderTermsFinancial'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_tendering_terms_financial_evaluation", "id_ajena_ttfe", $row['id']);
62
+                    $result[$licitacion->id]['tenderTermsQualification'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_tendering_terms_qualification_request", "id_ajena_tt", $row['id']);
63
+                    $result[$licitacion->id]['tenderTermsSpecific'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_tendering_terms_specific_terms", "id_ajena_tt", $row['id']);
64
+                }
65
+
66
+                $result[$licitacion->id]['validNoticeInfo'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_valid_notice_info", $licitacion->id);
67
+                foreach ($result[$licitacion->id]['validNoticeInfo'] as $row) {
68
+                    $result[$licitacion->id]['validNoticeInfoDocument'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_valid_notice_info_documento", "id_ajena_vni", $row['id']);
69
+                    $result[$licitacion->id]['validNoticeInfoFecha'] = $this->Xlsexport_model->getDatosRelacionadosByTablaAndLicitacion("maestro_valid_notice_info_fecha", "id_ajena_vni", $row['id']);
70
+                }
71
+
72
+                $result[$licitacion->id]['techDocs'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_technical_documents", $licitacion->id);
73
+                $result[$licitacion->id]['legalDocs'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_legal_documents", $licitacion->id);
74
+                $result[$licitacion->id]['generalDocs'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_general_documents", $licitacion->id);
75
+                $result[$licitacion->id]['additDocs'] = $this->Xlsexport_model->getDatosByTablaAndLicitacion("maestro_additional_documents", $licitacion->id);
76
+            }
77
+        }
78
+        //echo ($this->endtime($start));
79
+        //pretty_dump($result);
80
+
32 81
         $objPHPExcel = new PHPExcel();
33 82
         // El libro activo el cual exportar sera el 0
34
-        $objPHPExcel->setActiveSheetIndex(0);
35
-        //Fila donde dibujar en el excel
36
-        $rowCount = 1;
37
-
38
-        $inventarioExport = $this->Xlsexport_model->getInventarioSinControladosUl($idInventario);
39
-        foreach ($inventarioExport as $row) {
40
-
41
-            //Escribimos las cabeceras de cada columna de la bbdd
42
-            if ($rowCount == 1) {
43
-                $this->cabecerasOpenPlacspFirstSheet($objPHPExcel);
44
-                $concesionNombre = $row->concesionNombre;
45
-                $codConc = $row->codConc;
46
-                $rowCount++;
83
+
84
+        $filaExcel = 1;
85
+        foreach ($result as $dato) {
86
+            if ($filaExcel == 1) {
87
+                $objPHPExcel = $this->cabecerasOpenPlacspFirstSheet($objPHPExcel);
88
+            } else {
89
+                $objPHPExcel = $this->datosCompletosHojaLicitacion($objPHPExcel, $dato, $filaExcel);
47 90
             }
48
-            // Set cell An to the "name" column from the database (assuming you have a column called name)
49
-            //    where n is the Excel row number (ie cell A1 in the first row)
50
-            $objPHPExcel->getActiveSheet()->SetCellValueExplicit('A' . $rowCount, $row->matricula);
51
-            $objPHPExcel->getActiveSheet()->SetCellValueExplicit('B' . $rowCount, $row->codCliente10);
52
-            $objPHPExcel->getActiveSheet()->SetCellValue('C' . $rowCount, $row->nombre_cliente);
53
-            $objPHPExcel->getActiveSheet()->SetCellValue('D' . $rowCount, $row->direccion_del_cliente);
54
-            $objPHPExcel->getActiveSheet()->SetCellValue('E' . $rowCount, $row->codigo_postal_del_cliente);
55
-            $objPHPExcel->getActiveSheet()->SetCellValue('F' . $rowCount, $row->poblacion_del_cliente);
56
-            $objPHPExcel->getActiveSheet()->SetCellValue('G' . $rowCount, $row->tipo_medio);
57
-            $objPHPExcel->getActiveSheet()->SetCellValue('H' . $rowCount, $row->valor_alto);
58
-            $objPHPExcel->getActiveSheet()->SetCellValue('I' . $rowCount, $row->valor_bajo);
59
-            $objPHPExcel->getActiveSheet()->SetCellValue('J' . $rowCount, $row->ultimo_mov);
60
-            $objPHPExcel->getActiveSheet()->SetCellValue('K' . $rowCount, $row->lectura_conc);
61
-            $objPHPExcel->getActiveSheet()->SetCellValue('L' . $rowCount, $row->control_alm_com);
62
-            $objPHPExcel->getActiveSheet()->SetCellValue('M' . $rowCount, $row->fecha_control);
63
-            $objPHPExcel->getActiveSheet()->SetCellValue('N' . $rowCount, $row->estado_con);
64
-            $objPHPExcel->getActiveSheet()->SetCellValue('O' . $rowCount, $row->estado_ul);
65
-            $objPHPExcel->getActiveSheet()->SetCellValue('P' . $rowCount, $row->fecha_historico);
66
-            $objPHPExcel->getActiveSheet()->SetCellValue('Q' . $rowCount, $row->usuario_cambio);
67
-
68
-            // Increment the Excel row counter
69
-            $rowCount++;
91
+
92
+            $filaExcel++;
70 93
         }
71
-        $nombreAchivo = $codConc . ' - ' . $concesionNombre . ' - ' . date("Y-m-d") . '.xlsx';
72 94
 
73
-        $ruta = base_url() . 'uploads/inventarios/' . $nombreAchivo;
95
+/*        //Escribimos las cabeceras de cada columna de la bbdd
96
+if ($rowCount == 1) {
97
+$this->cabecerasOpenPlacspFirstSheet($objPHPExcel);
98
+$concesionNombre = $row->concesionNombre;
99
+$codConc = $row->codConc;
100
+$rowCount++;
101
+}
102
+ */
103
+        $nombreAchivo = 'test.xls';
104
+
105
+        $ruta = base_url() . 'uploads/' . $nombreAchivo;
74 106
 
75 107
         // Write the Excel file to filename some_excel_file.xlsx in the current directory
76 108
         // Redirect output to a client’s web browser (Excel5)
@@ -79,13 +111,110 @@ class ExportXls extends CI_Controller
79 111
         header('Pragma: cache');
80 112
         header('Cache-Control: private');
81 113
         $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
82
-        $objWriter->save(FCPATH . 'uploads/inventarios/' . $nombreAchivo);
114
+        $objWriter->save(FCPATH . 'uploads/' . $nombreAchivo);
83 115
 
84 116
         $this->output
85 117
             ->set_content_type('application/json')
86 118
             ->set_output(json_encode(array("url" => $ruta)));
87 119
     }
88 120
 
121
+    public function starttime()
122
+    {
123
+        $r = explode(' ', microtime());
124
+        $r = $r[1] + $r[0];
125
+        return $r;
126
+    }
127
+
128
+    public function endtime($starttime)
129
+    {
130
+        $r = explode(' ', microtime());
131
+        $r = $r[1] + $r[0];
132
+        $r = round($r - $starttime, 4);
133
+        return '<strong>Execution Time</strong>: ' . $r . ' seconds<br />';
134
+    }
135
+
136
+    private function datosCompletosHojaLicitacion($objPHPExcel, $datosLicitacion, $filaExcel)
137
+    {
138
+        $objPHPExcel->setActiveSheetIndex(0);
139
+        $styleArr = array(
140
+            "font" => array(
141
+                "bold" => true,
142
+                "color" => array("rgb" => "22B9FF"),
143
+                "size" => 13,
144
+            ),
145
+        );
146
+        $objPHPExcel->getActiveSheet()->getStyle("A1:AB1")->applyFromArray($styleArr);
147
+        //$sharedStyle1->applyFromArray(array('fill' => array('type' => \PHPExcel\Style\Fill::FILL_SOLID, 'color' => array('argb' => 'FFCCFFCC')), 'borders' => array('bottom' => array('style' => \PHPExcel\Style\Border::BORDER_THIN), 'right' => array('style' => \PHPExcel\Style\Border::BORDER_MEDIUM))));
148
+        $objPHPExcel->getActiveSheet()->SetCellValue('A' . $filaExcel, $datosLicitacion['licitacion']->id_licitacion);
149
+        $objPHPExcel->getActiveSheet()->SetCellValue('B' . $filaExcel, $datosLicitacion['licitacion']->url_id_licitacion);
150
+        $objPHPExcel->getActiveSheet()->SetCellValue('C' . $filaExcel, $datosLicitacion['licitacion']->updated);
151
+        $objPHPExcel->getActiveSheet()->SetCellValue('D' . $filaExcel, "");
152
+        $objPHPExcel->getActiveSheet()->SetCellValue('E' . $filaExcel, "Primera publicación");
153
+        $objPHPExcel->getActiveSheet()->SetCellValue('F' . $filaExcel, $datosLicitacion['contract'][0]['contractFolderStatusCode']);
154
+        $objPHPExcel->getActiveSheet()->SetCellValue('G' . $filaExcel, $datosLicitacion['contract'][0]['contractFolderID']);
155
+        $objPHPExcel->getActiveSheet()->SetCellValue('H' . $filaExcel, $datosLicitacion['project'][0]['name']);
156
+        $objPHPExcel->getActiveSheet()->SetCellValue('I' . $filaExcel, $datosLicitacion['project'][0]['estimatedOverallContractAmount']);
157
+        $objPHPExcel->getActiveSheet()->SetCellValue('J' . $filaExcel, $datosLicitacion['project'][0]['taxExclusiveAmount']);
158
+        $objPHPExcel->getActiveSheet()->SetCellValue('K' . $filaExcel, $datosLicitacion['project'][0]['totalAmount']);
159
+
160
+        $cpvProject = "";
161
+        for ($i = 0; $i < count($datosLicitacion['projectActivity']); $i++) {
162
+            $cpvProject .= $datosLicitacion['projectActivity'][$i]['itemClassification_value'] . ";";
163
+        }
164
+
165
+        $cpvParty = "";
166
+        //TODO OBtener solo el DIR3
167
+        for ($i = 0; $i < count($datosLicitacion['partyActivity']); $i++) {
168
+            $cpvParty .= $datosLicitacion['partyActivity'][$i]['idPartyIdent'] . ";";
169
+        }
170
+
171
+        $objPHPExcel->getActiveSheet()->SetCellValue('L' . $filaExcel, $cpvProject);
172
+        $objPHPExcel->getActiveSheet()->SetCellValue('M' . $filaExcel, $datosLicitacion['project'][0]['typeCode']);
173
+        $objPHPExcel->getActiveSheet()->SetCellValue('N' . $filaExcel, $datosLicitacion['project'][0]['countrySubentityCode'] . " - " . $datosLicitacion['project'][0]['countrySubentity']);
174
+        $objPHPExcel->getActiveSheet()->SetCellValue('O' . $filaExcel, $datosLicitacion['party'][0]['partyName']);
175
+        $objPHPExcel->getActiveSheet()->SetCellValue('P' . $filaExcel, $datosLicitacion['party'][0]['partyName']);
176
+        $objPHPExcel->getActiveSheet()->SetCellValue('Q' . $filaExcel, $datosLicitacion['locatedParty'][0]['contractingPartyTypeCode']);
177
+        $objPHPExcel->getActiveSheet()->SetCellValue('R' . $filaExcel, $cpvParty);
178
+        $objPHPExcel->getActiveSheet()->SetCellValue('S' . $filaExcel, $datosLicitacion['locatedParty'][0]['buyerProfileURIID']);
179
+        $objPHPExcel->getActiveSheet()->SetCellValue('T' . $filaExcel, $datosLicitacion['locatedParty'][0]['contractingPartyTypeCode']);
180
+        $objPHPExcel->getActiveSheet()->SetCellValue('U' . $filaExcel, $datosLicitacion['party'][0]['codpostal']);
181
+        $objPHPExcel->getActiveSheet()->SetCellValue('V' . $filaExcel, $datosLicitacion['tenderProcess'][0]['procedureCode']);
182
+        $objPHPExcel->getActiveSheet()->SetCellValue('W' . $filaExcel, $datosLicitacion['tenderProcess'][0]['contractingSystemCode']);
183
+        $objPHPExcel->getActiveSheet()->SetCellValue('X' . $filaExcel, $datosLicitacion['tenderProcess'][0]['urgencyCode']);
184
+        $objPHPExcel->getActiveSheet()->SetCellValue('Y' . $filaExcel, $datosLicitacion['tenderProcess'][0]['submissionMethodCode']);
185
+        $objPHPExcel->getActiveSheet()->SetCellValue('Z' . $filaExcel, $datosLicitacion['tenderTerms'][0]['procurementLegislationDocumentReference']);
186
+        $objPHPExcel->getActiveSheet()->SetCellValue('AA' . $filaExcel, $datosLicitacion['tenderTerms'][0]['allowedSubcontractTerms']);
187
+        $objPHPExcel->getActiveSheet()->SetCellValue('AB' . $filaExcel, "");
188
+
189
+        return $objPHPExcel;
190
+
191
+    }
192
+
193
+    private function datosCompletosHojaBitacora($objPHPExcel, $datosLicitacion)
194
+    {
195
+
196
+    }
197
+
198
+    private function datosCompletosDocumentosGenerales($objPHPExcel)
199
+    {
200
+
201
+    }
202
+
203
+    private function datosCompletosDocumentosAdicionales($objPHPExcel)
204
+    {
205
+
206
+    }
207
+
208
+    private function datosCompletosDocumentosTecnicos($objPHPExcel)
209
+    {
210
+
211
+    }
212
+
213
+    private function datosCompletosDocumentosLegales($objPHPExcel)
214
+    {
215
+
216
+    }
217
+
89 218
     private function cabecerasOpenPlacspFirstSheet($objPHPExcel)
90 219
     {
91 220
         $objPHPExcel->getActiveSheet()->SetCellValue('A1', "Identificador");

+ 13 - 0
application/libraries/Excel.php Просмотреть файл

@@ -0,0 +1,13 @@
1
+<?php
2
+if (!defined('BASEPATH')) exit('No direct script access allowed');
3
+require_once('PHPExcel.php');
4
+
5
+class Excel extends PHPExcel{
6
+
7
+	public function __construct()
8
+	{
9
+		parent::__construct();
10
+	}
11
+}
12
+
13
+?>

+ 371 - 0
application/models/Xlsexport_model.php Просмотреть файл

@@ -0,0 +1,371 @@
1
+<?php
2
+defined('BASEPATH') or exit('No direct script access allowed');
3
+
4
+/**
5
+ *
6
+ * Model Xlsexport_model_model
7
+ *
8
+ * This Model for ...
9
+ *
10
+ * @package        CodeIgniter
11
+ * @category    Model
12
+ * @author    Setiawan Jodi <jodisetiawan@fisip-untirta.ac.id>
13
+ * @link      https://github.com/setdjod/myci-extension/
14
+ * @param     ...
15
+ * @return    ...
16
+ *
17
+ */
18
+
19
+class Xlsexport_model extends CI_Model
20
+{
21
+
22
+    // ------------------------------------------------------------------------
23
+
24
+    public function __construct()
25
+    {
26
+        parent::__construct();
27
+    }
28
+
29
+    // ------------------------------------------------------------------------
30
+
31
+    // ------------------------------------------------------------------------
32
+    public function getLicitaciones()
33
+    {
34
+        $sql = "SELECT *
35
+                FROM
36
+                    maestro_datos_iniciales_licitacion li
37
+                    /*WHERE updated >= '2022-01-24 00:00:00' AND updated <= '2022-01-30 23:59:00'*/
38
+                    WHERE id < 100";
39
+        $result = $this->db->query($sql);
40
+        $datos['datos'] = $result->result();
41
+        $datos['num_rows'] = $result->num_rows();
42
+        return $datos;
43
+    }
44
+
45
+    public function getDatosByTablaAndLicitacion($tabla, $licitacionID)
46
+    {
47
+        $sql = "SELECT *
48
+                FROM
49
+                    $tabla
50
+                WHERE id_ajena_licitacion = $licitacionID";
51
+        $result = $this->db->query($sql);
52
+        $datos['datos'] = $result->result_array();
53
+        $datos['num_rows'] = $result->num_rows();
54
+        return $datos['datos'];
55
+    }
56
+
57
+    public function getDatosRelacionadosByTablaAndLicitacion($tabla, $txtIdAjena, $idAjena)
58
+    {
59
+        $sql = "SELECT
60
+                    *
61
+                FROM
62
+                    $tabla
63
+                WHERE $txtIdAjena = $idAjena";
64
+        $result = $this->db->query($sql);
65
+        $datos['datos'] = $result->result_array();
66
+        $datos['num_rows'] = $result->num_rows();
67
+        return $datos['datos'];
68
+    }
69
+
70
+    public function getContractInfoByLicitacion($licitacionId)
71
+    {
72
+        $sql = "SELECT *
73
+                    *
74
+                FROM
75
+                    maestro_contract_folder
76
+                WHERE id_ajena_licitacion = $licitacionId";
77
+        $result = $this->db->query($sql);
78
+        $datos['datos'] = $result->result();
79
+        $datos['num_rows'] = $result->num_rows();
80
+        return $datos;
81
+    }
82
+
83
+    public function getProjectByLicitacion($licitacionId)
84
+    {
85
+        $sql = "SELECT *
86
+                    *
87
+                FROM
88
+                    maestro_procurement_project
89
+                WHERE id_ajena_licitacion = $licitacionId";
90
+        $result = $this->db->query($sql);
91
+        $datos['datos'] = $result->result();
92
+        $datos['num_rows'] = $result->num_rows();
93
+        return $datos;
94
+    }
95
+
96
+    public function getProjectByActivityByProject($projectId)
97
+    {
98
+        $sql = "SELECT *
99
+                    *
100
+                FROM
101
+                maestro_procurement_project_itemClass
102
+                WHERE id_ajena_pp = $projectId";
103
+        $result = $this->db->query($sql);
104
+        $datos['datos'] = $result->result();
105
+        $datos['num_rows'] = $result->num_rows();
106
+        return $datos;
107
+    }
108
+
109
+    public function getProjectLotByLicitacion($licitacionId)
110
+    {
111
+        $sql = "SELECT *
112
+                    *
113
+                FROM
114
+                    maestro_procurement_project_lot
115
+                WHERE id_ajena_licitacion = $licitacionId";
116
+        $result = $this->db->query($sql);
117
+        $datos['datos'] = $result->result();
118
+        $datos['num_rows'] = $result->num_rows();
119
+        return $datos;
120
+    }
121
+
122
+    public function getProjectLotActivityByProjectLot($projectLotId)
123
+    {
124
+        $sql = "SELECT *
125
+                    *
126
+                FROM
127
+                    maestro_procurement_project_lot_item
128
+                WHERE id_ajena_ppl = $projectLotId";
129
+        $result = $this->db->query($sql);
130
+        $datos['datos'] = $result->result();
131
+        $datos['num_rows'] = $result->num_rows();
132
+        return $datos;
133
+    }
134
+
135
+    public function getPartyByLicitacion($licitacionId)
136
+    {
137
+        $sql = "SELECT *
138
+                    *
139
+                FROM
140
+                    maestro_party
141
+                WHERE id_ajena_licitacion = $licitacionId";
142
+        $result = $this->db->query($sql);
143
+        $datos['datos'] = $result->result();
144
+        $datos['num_rows'] = $result->num_rows();
145
+        return $datos;
146
+    }
147
+
148
+    public function getPartyIdentificationByLicitacion($partyId)
149
+    {
150
+        $sql = "SELECT *
151
+                    *
152
+                FROM
153
+                    maestro_party_party_idenfitication
154
+                WHERE id_ajena_party = $partyId";
155
+        $result = $this->db->query($sql);
156
+        $datos['datos'] = $result->result();
157
+        $datos['num_rows'] = $result->num_rows();
158
+        return $datos;
159
+    }
160
+
161
+    public function getLocatedPartyByLicitacion($licitacionId)
162
+    {
163
+        $sql = "SELECT *
164
+                    *
165
+                FROM
166
+                maestro_located_contracting_party
167
+                WHERE id_ajena_licitacion = $licitacionId";
168
+        $result = $this->db->query($sql);
169
+        $datos['datos'] = $result->result();
170
+        $datos['num_rows'] = $result->num_rows();
171
+        return $datos;
172
+    }
173
+
174
+    public function getLocatedPartyActivityByLicitacion($locatedPartyId)
175
+    {
176
+        $sql = "SELECT *
177
+                    *
178
+                FROM
179
+                maestro_located_contracting_party_activity
180
+                WHERE id_ajena_lcp = $locatedPartyId";
181
+        $result = $this->db->query($sql);
182
+        $datos['datos'] = $result->result();
183
+        $datos['num_rows'] = $result->num_rows();
184
+        return $datos;
185
+    }
186
+
187
+    public function getTenderProcessByLicitacion($licitacionId)
188
+    {
189
+        $sql = "SELECT *
190
+                    *
191
+                FROM
192
+                maestro_tendering_process
193
+                WHERE id_ajena_licitacion = $licitacionId";
194
+        $result = $this->db->query($sql);
195
+        $datos['datos'] = $result->result();
196
+        $datos['num_rows'] = $result->num_rows();
197
+        return $datos;
198
+    }
199
+
200
+    public function getTenderResultByLicitacion($licitacionId)
201
+    {
202
+        $sql = "SELECT *
203
+                    *
204
+                FROM
205
+                    maestro_tender_result
206
+                WHERE id_ajena_licitacion = $licitacionId";
207
+        $result = $this->db->query($sql);
208
+        $datos['datos'] = $result->result();
209
+        $datos['num_rows'] = $result->num_rows();
210
+        return $datos;
211
+    }
212
+
213
+    public function getTenderingTermsByLicitacion($licitacionId)
214
+    {
215
+        $sql = "SELECT *
216
+                    *
217
+                FROM
218
+                    maestro_tendering_terms
219
+                WHERE id_ajena_licitacion = $licitacionId";
220
+        $result = $this->db->query($sql);
221
+        $datos['datos'] = $result->result();
222
+        $datos['num_rows'] = $result->num_rows();
223
+        return $datos;
224
+    }
225
+
226
+    public function getTenderingTermsAwardingByTenderTerms($tenderTermsId)
227
+    {
228
+        $sql = "SELECT *
229
+                    *
230
+                FROM
231
+                    maestro_tendering_terms_awarding_terms
232
+                WHERE id_ajena_tt = $tenderTermsId";
233
+        $result = $this->db->query($sql);
234
+        $datos['datos'] = $result->result();
235
+        $datos['num_rows'] = $result->num_rows();
236
+        return $datos;
237
+    }
238
+
239
+    public function getTenderingTermsFinancialgByTenderTerms($tenderTermsId)
240
+    {
241
+        $sql = "SELECT *
242
+                    *
243
+                FROM
244
+                maestro_tendering_terms_financial_evaluation
245
+                WHERE id_ajena_tt = $tenderTermsId";
246
+        $result = $this->db->query($sql);
247
+        $datos['datos'] = $result->result();
248
+        $datos['num_rows'] = $result->num_rows();
249
+        return $datos;
250
+    }
251
+
252
+    public function getTenderingTermsQualificationByTenderTerms($tenderTermsId)
253
+    {
254
+        $sql = "SELECT *
255
+                    *
256
+                FROM
257
+                    maestro_tendering_terms_qualification_request
258
+                WHERE id_ajena_tt = $tenderTermsId";
259
+        $result = $this->db->query($sql);
260
+        $datos['datos'] = $result->result();
261
+        $datos['num_rows'] = $result->num_rows();
262
+        return $datos;
263
+    }
264
+
265
+    public function getTenderingTermsSpecificByTenderTerms($tenderTermsId)
266
+    {
267
+        $sql = "SELECT *
268
+                    *
269
+                FROM
270
+                    maestro_tendering_terms_specific_terms
271
+                WHERE id_ajena_tt = $tenderTermsId";
272
+        $result = $this->db->query($sql);
273
+        $datos['datos'] = $result->result();
274
+        $datos['num_rows'] = $result->num_rows();
275
+        return $datos;
276
+    }
277
+
278
+    public function getValidNoticeInfoByLicitacion($licitacionId)
279
+    {
280
+        $sql = "SELECT *
281
+                    *
282
+                FROM
283
+                    maestro_valid_notice_info
284
+                WHERE id_ajena_licitacion = $licitacionId";
285
+        $result = $this->db->query($sql);
286
+        $datos['datos'] = $result->result();
287
+        $datos['num_rows'] = $result->num_rows();
288
+        return $datos;
289
+    }
290
+
291
+    public function getValidNoticeInfoDocumentByValidId($validNoticeId)
292
+    {
293
+        $sql = "SELECT *
294
+                    *
295
+                FROM
296
+                    maestro_valid_notice_info_documento
297
+                WHERE id_ajena_vni = $validNoticeId";
298
+        $result = $this->db->query($sql);
299
+        $datos['datos'] = $result->result();
300
+        $datos['num_rows'] = $result->num_rows();
301
+        return $datos;
302
+    }
303
+
304
+    public function getValidNoticeInfoFechaByValidId($validNoticeId)
305
+    {
306
+        $sql = "SELECT *
307
+                    *
308
+                FROM
309
+                    maestro_valid_notice_info_fecha
310
+                WHERE id_ajena_vni = $validNoticeId";
311
+        $result = $this->db->query($sql);
312
+        $datos['datos'] = $result->result();
313
+        $datos['num_rows'] = $result->num_rows();
314
+        return $datos;
315
+    }
316
+
317
+    public function getAdditionalDocumuentsByLicitacion($licitacionId)
318
+    {
319
+        $sql = "SELECT *
320
+                    *
321
+                FROM
322
+                maestro_additional_documents
323
+                WHERE id_ajena_licitacion = $licitacionId";
324
+        $result = $this->db->query($sql);
325
+        $datos['datos'] = $result->result();
326
+        $datos['num_rows'] = $result->num_rows();
327
+        return $datos;
328
+    }
329
+
330
+    public function getGeneralDocumuentsByLicitacion($licitacionId)
331
+    {
332
+        $sql = "SELECT *
333
+                    *
334
+                FROM
335
+                maestro_general_documents
336
+                WHERE id_ajena_licitacion = $licitacionId";
337
+        $result = $this->db->query($sql);
338
+        $datos['datos'] = $result->result();
339
+        $datos['num_rows'] = $result->num_rows();
340
+        return $datos;
341
+    }
342
+
343
+    public function getLegalDocumuentsByLicitacion($licitacionId)
344
+    {
345
+        $sql = "SELECT *
346
+                    *
347
+                FROM
348
+                maestro_legal_documents
349
+                WHERE id_ajena_licitacion = $licitacionId";
350
+        $result = $this->db->query($sql);
351
+        $datos['datos'] = $result->result();
352
+        $datos['num_rows'] = $result->num_rows();
353
+        return $datos;
354
+    }
355
+
356
+    public function getTechnicalDocumuentsByLicitacion($licitacionId)
357
+    {
358
+        $sql = "SELECT *
359
+                    *
360
+                FROM
361
+                maestro_technical_documents
362
+                WHERE id_ajena_licitacion = $licitacionId";
363
+        $result = $this->db->query($sql);
364
+        $datos['datos'] = $result->result();
365
+        $datos['num_rows'] = $result->num_rows();
366
+        return $datos;
367
+    }
368
+}
369
+
370
+/* End of file Xlsexport_model_model.php */
371
+/* Location: ./application/models/Xlsexport_model_model.php */