123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- <?php
- defined('BASEPATH') or exit('No direct script access allowed');
-
- /**
- *
- * Model Xlsexport_model_model
- *
- * This Model for ...
- *
- * @package CodeIgniter
- * @category Model
- * @author Setiawan Jodi <jodisetiawan@fisip-untirta.ac.id>
- * @link https://github.com/setdjod/myci-extension/
- * @param ...
- * @return ...
- *
- */
-
- class Xlsexport_model extends CI_Model
- {
-
- // ------------------------------------------------------------------------
-
- public function __construct()
- {
- parent::__construct();
- }
-
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- public function getLicitaciones()
- {
- $sql = "SELECT *
- FROM
- maestro_datos_iniciales_licitacion li
- /*WHERE updated >= '2022-01-24 00:00:00' AND updated <= '2022-01-30 23:59:00'*/
- WHERE id < 100";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getDatosByTablaAndLicitacion($tabla, $licitacionID)
- {
- $sql = "SELECT *
- FROM
- $tabla
- WHERE id_ajena_licitacion = $licitacionID";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result_array();
- $datos['num_rows'] = $result->num_rows();
- return $datos['datos'];
- }
-
- public function getDatosRelacionadosByTablaAndLicitacion($tabla, $txtIdAjena, $idAjena)
- {
- $sql = "SELECT
- *
- FROM
- $tabla
- WHERE $txtIdAjena = $idAjena";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result_array();
- $datos['num_rows'] = $result->num_rows();
- return $datos['datos'];
- }
-
- public function getContractInfoByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_contract_folder
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getProjectByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_procurement_project
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getProjectByActivityByProject($projectId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_procurement_project_itemClass
- WHERE id_ajena_pp = $projectId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getProjectLotByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_procurement_project_lot
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getProjectLotActivityByProjectLot($projectLotId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_procurement_project_lot_item
- WHERE id_ajena_ppl = $projectLotId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getPartyByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_party
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getPartyIdentificationByLicitacion($partyId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_party_party_idenfitication
- WHERE id_ajena_party = $partyId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getLocatedPartyByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_located_contracting_party
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getLocatedPartyActivityByLicitacion($locatedPartyId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_located_contracting_party_activity
- WHERE id_ajena_lcp = $locatedPartyId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getTenderProcessByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_tendering_process
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getTenderResultByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_tender_result
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getTenderingTermsByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_tendering_terms
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getTenderingTermsAwardingByTenderTerms($tenderTermsId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_tendering_terms_awarding_terms
- WHERE id_ajena_tt = $tenderTermsId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getTenderingTermsFinancialgByTenderTerms($tenderTermsId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_tendering_terms_financial_evaluation
- WHERE id_ajena_tt = $tenderTermsId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getTenderingTermsQualificationByTenderTerms($tenderTermsId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_tendering_terms_qualification_request
- WHERE id_ajena_tt = $tenderTermsId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getTenderingTermsSpecificByTenderTerms($tenderTermsId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_tendering_terms_specific_terms
- WHERE id_ajena_tt = $tenderTermsId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getValidNoticeInfoByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_valid_notice_info
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getValidNoticeInfoDocumentByValidId($validNoticeId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_valid_notice_info_documento
- WHERE id_ajena_vni = $validNoticeId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getValidNoticeInfoFechaByValidId($validNoticeId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_valid_notice_info_fecha
- WHERE id_ajena_vni = $validNoticeId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getAdditionalDocumuentsByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_additional_documents
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getGeneralDocumuentsByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_general_documents
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getLegalDocumuentsByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_legal_documents
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
-
- public function getTechnicalDocumuentsByLicitacion($licitacionId)
- {
- $sql = "SELECT *
- *
- FROM
- maestro_technical_documents
- WHERE id_ajena_licitacion = $licitacionId";
- $result = $this->db->query($sql);
- $datos['datos'] = $result->result();
- $datos['num_rows'] = $result->num_rows();
- return $datos;
- }
- }
-
- /* End of file Xlsexport_model_model.php */
- /* Location: ./application/models/Xlsexport_model_model.php */
|