瀏覽代碼

Parseador para zip, desde 2012 hasta 2020

Christian 3 年之前
父節點
當前提交
083e69baa2
共有 1 個文件被更改,包括 24 次插入24 次删除
  1. 24 24
      application/controllers/Parser.php

+ 24 - 24
application/controllers/Parser.php 查看文件

@@ -25,46 +25,46 @@ class Parser extends CI_Controller
25 25
 
26 26
     public function index()
27 27
     {
28
-        /*$existCronRun = $this->Parser_model->existCronRun();
28
+        $existCronRun = $this->Parser_model->existCronRun();
29 29
 
30 30
         if ($existCronRun['num_rows'] > 0) {
31
-        if ($existCronRun['datos']->cron_ejecucion == 0) {
31
+            if ($existCronRun['datos']->cron_ejecucion == 0) {
32 32
 
33
-        $this->Parser_model->inicioParser();
33
+                $this->Parser_model->inicioParser();
34 34
 
35
-        $resultSetPerfiles = $this->Parser_model->getUrlArchivos();
35
+                $resultSetPerfiles = $this->Parser_model->getUrlArchivos();
36 36
 
37
-        foreach ($resultSetPerfiles['datos'] as $row) {
38
-        $fechaCarpeta = date("Y-m-d_H-i-s");
39
-        $this->fechaCreacionLog = $fechaCarpeta;
40
-        $rutaPerfil = $this->rutaDiaria . "/" . $row->prefijos_tablas;
37
+                foreach ($resultSetPerfiles['datos'] as $row) {
38
+                    $fechaCarpeta = date("Y-m-d_H-i-s");
39
+                    $this->fechaCreacionLog = $fechaCarpeta;
40
+                    $rutaPerfil = $this->rutaDiaria . "/" . $row->prefijos_tablas;
41 41
 
42
-        $this->newFolder($rutaPerfil);
42
+                    $this->newFolder($rutaPerfil);
43 43
 
44
-        if ($this->newFolder($rutaPerfil . "/" . $fechaCarpeta)) {
45
-        $this->rutaDiariaFecha = $rutaPerfil . "/" . $fechaCarpeta . "/";
44
+                    if ($this->newFolder($rutaPerfil . "/" . $fechaCarpeta)) {
45
+                        $this->rutaDiariaFecha = $rutaPerfil . "/" . $fechaCarpeta . "/";
46 46
 
47
-        $this->downloadProcess($row->url_descarga);
48
-        }
49
-        }
47
+                        $this->downloadProcess($row->url_descarga);
48
+                    }
49
+                }
50 50
 
51
-        $this->parserfile->index($this->rutaDiariaFecha, $fechaCarpeta, $row);
51
+                $this->parserfile->index($this->rutaDiariaFecha, $fechaCarpeta, $row);
52 52
 
53
+            } else {
54
+                echo "EXISTE UN CRON EN MARCHA.";
55
+            }
53 56
         } else {
54
-        echo "EXISTE UN CRON EN MARCHA.";
55
-        }
56
-        } else {
57
-        echo "No existe parametro que iniciar.";
57
+            echo "No existe parametro que iniciar.";
58 58
         }
59 59
 
60 60
         $this->Parser_model->stopParser();
61 61
 
62
-        $this->tablasCalculadas($this->fechaCreacionLog);*/
62
+        $this->tablasCalculadas($this->fechaCreacionLog);
63 63
 
64
-        $resultSetPerfiles = $this->Parser_model->getUrlArchivos();
65
-        foreach ($resultSetPerfiles['datos'] as $row) {
66
-            $this->parserfile->index($this->rutaDiaria . "PER_PCSP_EX/2022-02-17_20-38-16", date("Y-m-d"), $row);
67
-        }
64
+        /* $resultSetPerfiles = $this->Parser_model->getUrlArchivos();
65
+    foreach ($resultSetPerfiles['datos'] as $row) {
66
+    $this->parserfile->index($this->rutaDiaria . "PER_PCSP_EX/2022-02-17_20-38-16", date("Y-m-d"), $row);
67
+    } */
68 68
     }
69 69
 
70 70
     private function downloadProcess($urlXML)