Xlsexport_model.php 11KB

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