1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- defined('BASEPATH') or exit('No direct script access allowed');
-
- class Parserdatabaselimpio
- {
-
- protected $CI;
-
- public function __construct()
- {
- $this->CI = &get_instance();
- $this->CI->load->model("Parser_model");
- $this->CI->load->model("Xlsexport_model");
- }
-
- public function index($fechaInicioParser, $filename)
- {
- $tablasInsert = $this->CI->Parser_model->getMapaTablas();
-
- if ($tablasInsert['num_rows'] > 0) {
-
- //$licitacionDeleteCascada = $this->CI->Parser_model->getLicitacionesNuevasBruto();
-
- //if ($licitacionDeleteCascada['num_rows'] > 0) {
- $this->CI->Parser_model->deleteCascadaNuevasLicitaciones();
-
- foreach ($tablasInsert['datos'] as $row) {
-
- $datosTablaToInsert = $this->CI->Parser_model->getDatosBrutos($row->tabla_sucia);
-
- if ($datosTablaToInsert['num_rows'] > 0) {
- guardar_log("brutoToMaestro_" . $fechaInicioParser, "ARCHIVO--" . $row->tabla_maestra . "_" . $fechaInicioParser . " - " . $filename);
- insertBucle($datosTablaToInsert['datos'], $row->tabla_maestra, "brutoToMaestro_" . $fechaInicioParser);
-
- }
- }
-
- //}
-
- }
- }
-
- }
-
- /* End of file Parserdatabaselimpio.php */
- /* Location: ./application/libraries/Parserdatabaselimpio.php */
|