瀏覽代碼

anyadir hora de creacion de log a todas las tablas

Nermosis 3 年之前
父節點
當前提交
7e15873906

+ 4 - 1
application/libraries/ParserDatabaseBruto.php 查看文件

66
     private function setInicioLicitacion($datosInicioLicitacion): array
66
     private function setInicioLicitacion($datosInicioLicitacion): array
67
     {
67
     {
68
         $result = array("result" => false, "id" => 0);
68
         $result = array("result" => false, "id" => 0);
69
-
69
+        $datosInicioLicitacion['fecha_creacion_log'] = $this->fechaInicioParser;
70
         $insertLicitacion = $this->CI->Parser_model->setInicioLicitacion($datosInicioLicitacion);
70
         $insertLicitacion = $this->CI->Parser_model->setInicioLicitacion($datosInicioLicitacion);
71
 
71
 
72
         if ($insertLicitacion) {
72
         if ($insertLicitacion) {
113
                 $setInsert = array();
113
                 $setInsert = array();
114
                 $setInsert[$aux] = $row;
114
                 $setInsert[$aux] = $row;
115
                 $setInsert[$aux]['id_ajena_licitacion'] = $this->idLicitacion;
115
                 $setInsert[$aux]['id_ajena_licitacion'] = $this->idLicitacion;
116
+                $setInsert[$aux]["fecha_creacion_log"] = $this->fechaInicioParser;
116
                 unset($setInsert[$aux]['itemClassification']);
117
                 unset($setInsert[$aux]['itemClassification']);
117
 
118
 
118
                 if (!empty($setInsert)) {
119
                 if (!empty($setInsert)) {
222
 
223
 
223
             if ($idAjena > 0) {
224
             if ($idAjena > 0) {
224
                 $arrayInsertar[0][$txtIdAjena] = $idAjena;
225
                 $arrayInsertar[0][$txtIdAjena] = $idAjena;
226
+                $arrayInsertar[0]["fecha_creacion_log"] = $this->fechaInicioParser;
225
             }
227
             }
226
 
228
 
227
             $insertedId = insertBucle($arrayInsertar, $tabla, $this->nombreLog);
229
             $insertedId = insertBucle($arrayInsertar, $tabla, $this->nombreLog);
251
 
253
 
252
                     if ($idAjena > 0) {
254
                     if ($idAjena > 0) {
253
                         $setInsert[$aux][$txtIdAjena] = $idAjena;
255
                         $setInsert[$aux][$txtIdAjena] = $idAjena;
256
+                        $setInsert[$aux]["fecha_creacion_log"] = $this->fechaInicioParser;
254
                     }
257
                     }
255
 
258
 
256
                     $aux++;
259
                     $aux++;

+ 2 - 2
application/libraries/ParserFile.php 查看文件

64
                 $aux++;
64
                 $aux++;
65
             }
65
             }
66
 
66
 
67
-            $str = print_r($resultEntries, true);
67
+            //$str = print_r($resultEntries, true);
68
 
68
 
69
-            file_put_contents($this->rutaDiaria . "/text_" . $filename . ".txt", $str);
69
+            //file_put_contents($this->rutaDiaria . "/text_" . $filename . ".txt", $str);
70
         }
70
         }
71
 
71
 
72
         $this->CI->parserdatabasebruto->setDatosParser($resultEntries, $fechaInicioParser, $datosPerfil);
72
         $this->CI->parserdatabasebruto->setDatosParser($resultEntries, $fechaInicioParser, $datosPerfil);

+ 1 - 0
application/models/Parser_model.php 查看文件

42
         $data = array(
42
         $data = array(
43
             'cron_ejecucion' => 0,
43
             'cron_ejecucion' => 0,
44
             "fecha_ejecucion" => date("Y-m-d h:i:s"),
44
             "fecha_ejecucion" => date("Y-m-d h:i:s"),
45
+            
45
         );
46
         );
46
 
47
 
47
         $this->db->where('id', 0);
48
         $this->db->where('id', 0);