123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?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();
- $totalInserted = array();
- 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("inToGlobal_" . $fechaInicioParser, "ARCHIVO--" . $row->tabla_maestra . "_" . $fechaInicioParser . " - " . $filename);
- $totalInserted[$row->tabla_maestra] = insertBucle($datosTablaToInsert['datos'], $row->tabla_maestra, "inToGlobal_" . $fechaInicioParser);
-
- }
- }
-
- //}
- return $totalInserted;
-
- }
- }
-
- }
-
- /* End of file Parserdatabaselimpio.php */
- /* Location: ./application/libraries/Parserdatabaselimpio.php */
|