|
@@ -19,7 +19,7 @@ defined('BASEPATH') or exit('No direct script access allowed');
|
19
|
19
|
class Xlsexport_model extends CI_Model
|
20
|
20
|
{
|
21
|
21
|
|
22
|
|
- protected $fechaLog = "2022-02-25 08:08:51";
|
|
22
|
+ protected $fechaLog = "2022-02-28 08:42:06";
|
23
|
23
|
|
24
|
24
|
public function __construct()
|
25
|
25
|
{
|
|
@@ -29,9 +29,9 @@ class Xlsexport_model extends CI_Model
|
29
|
29
|
// ------------------------------------------------------------------------
|
30
|
30
|
|
31
|
31
|
// ------------------------------------------------------------------------
|
32
|
|
- public function getLicitaciones($having = "")
|
|
32
|
+ public function getLicitaciones($idUltimaImportacion)
|
33
|
33
|
{
|
34
|
|
- $sql = "SELECT
|
|
34
|
+ $sql = " SELECT
|
35
|
35
|
CF.id,
|
36
|
36
|
LI.id_licitacion,
|
37
|
37
|
GROUP_CONCAT( PROJI.itemClassification_value ) AS itemClassification_attr,
|
|
@@ -72,29 +72,25 @@ class Xlsexport_model extends CI_Model
|
72
|
72
|
RTPU.nombre AS urgency,
|
73
|
73
|
LI.fecha_creacion_log
|
74
|
74
|
FROM
|
75
|
|
- maestro_datos_iniciales_licitacion LI
|
76
|
|
- JOIN maestro_contract_folder CF ON CF.id_ajena_licitacion = LI.id_licitacion
|
77
|
|
- JOIN maestro_located_contracting_party LP ON LP.id_ajena_licitacion = LI.id_licitacion
|
78
|
|
- JOIN maestro_party MP ON MP.id_ajena_licitacion = LI.id_licitacion
|
79
|
|
- JOIN maestro_party_party_idenfitication MPI on MPI.id_ajena_licitacion = LI.id_licitacion AND MPI.attr = 'DIR3'
|
80
|
|
- JOIN maestro_procurement_project PROJ ON PROJ.id_ajena_licitacion = LI.id_licitacion
|
81
|
|
- JOIN maestro_procurement_project_itemclass PROJI ON PROJI.id_ajena_licitacion = LI.id_licitacion
|
82
|
|
- JOIN maestro_tendering_process TP ON TP.id_ajena_licitacion = LI.id_licitacion
|
83
|
|
- JOIN maestro_tendering_terms TT ON TT.id_ajena_licitacion = LI.id_licitacion
|
84
|
|
- JOIN relacionada_contract_status RCF ON RCF.CODE = CF.contractFolderStatusCode
|
85
|
|
- JOIN relacionada_located_contracting_party RLP ON RLP.CODE = LP.contractingPartyTypeCode
|
86
|
|
- JOIN relacionada_tipo_contrato TPC ON TPC.CODE = PROJ.typeCode
|
87
|
|
- JOIN relacionada_tender_process RTP ON RTP.CODE = TP.procedureCode
|
88
|
|
- JOIN relacionada_tender_process_contracting_code RTPC ON RTPC.CODE = TP.contractingSystemCode
|
89
|
|
- JOIN relacionada_tender_process_submission RTPS ON RTPS.CODE = TP.submissionMethodCode
|
90
|
|
- JOIN relacionada_tender_process_urgency_code RTPU ON RTPU.CODE = TP.urgencyCode /*WHERE
|
91
|
|
- LI.id < 17174 */
|
92
|
|
-
|
|
75
|
+ maestro_datos_iniciales_licitacion LI
|
|
76
|
+ JOIN maestro_contract_folder CF ON CF.id_ajena_licitacion = LI.id_licitacion
|
|
77
|
+ JOIN maestro_located_contracting_party LP ON LP.id_ajena_licitacion = LI.id_licitacion
|
|
78
|
+ JOIN maestro_party MP ON MP.id_ajena_licitacion = LI.id_licitacion
|
|
79
|
+ JOIN maestro_party_party_idenfitication MPI on MPI.id_ajena_licitacion = LI.id_licitacion AND MPI.attr = 'DIR3'
|
|
80
|
+ JOIN maestro_procurement_project PROJ ON PROJ.id_ajena_licitacion = LI.id_licitacion
|
|
81
|
+ JOIN maestro_procurement_project_itemclass PROJI ON PROJI.id_ajena_licitacion = LI.id_licitacion
|
|
82
|
+ JOIN maestro_tendering_process TP ON TP.id_ajena_licitacion = LI.id_licitacion
|
|
83
|
+ JOIN maestro_tendering_terms TT ON TT.id_ajena_licitacion = LI.id_licitacion
|
|
84
|
+ JOIN relacionada_contract_status RCF ON RCF.CODE = CF.contractFolderStatusCode
|
|
85
|
+ JOIN relacionada_located_contracting_party RLP ON RLP.CODE = LP.contractingPartyTypeCode
|
|
86
|
+ JOIN relacionada_tipo_contrato TPC ON TPC.CODE = PROJ.typeCode
|
|
87
|
+ JOIN relacionada_tender_process RTP ON RTP.CODE = TP.procedureCode
|
|
88
|
+ JOIN relacionada_tender_process_contracting_code RTPC ON RTPC.CODE = TP.contractingSystemCode
|
|
89
|
+ JOIN relacionada_tender_process_submission RTPS ON RTPS.CODE = TP.submissionMethodCode
|
|
90
|
+ JOIN relacionada_tender_process_urgency_code RTPU ON RTPU.CODE = TP.urgencyCode
|
|
91
|
+ WHERE LI.id_importacion = $idUltimaImportacion
|
93
|
92
|
GROUP BY
|
94
|
|
- id_licitacion
|
95
|
|
- $having
|
96
|
|
- ORDER BY
|
97
|
|
- CF.id";
|
|
93
|
+ id_licitacion";
|
98
|
94
|
$result = $this->db->query($sql);
|
99
|
95
|
$datos['datos'] = $result->result();
|
100
|
96
|
$datos['num_rows'] = $result->num_rows();
|