Proyectos de Subversion LeadersLinked - Services

Rev

Rev 497 | Rev 500 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 497 Rev 499
Línea 479... Línea 479...
479
    {
479
    {
480
        $sql = new Sql($this->adapter);
480
        $sql = new Sql($this->adapter);
481
        $errors = [];
481
        $errors = [];
Línea 482... Línea 482...
482
 
482
 
-
 
483
        foreach ($extractedData as $data) {
-
 
484
            // Convertir los arrays a JSON antes de almacenarlos
-
 
485
            $data['previous_positions'] = json_encode($data['previous_positions'], JSON_UNESCAPED_UNICODE);
-
 
486
            $data['skills'] = json_encode($data['skills'], JSON_UNESCAPED_UNICODE);
483
        foreach ($extractedData as $data) {
487
 
484
            $select = $sql->select()
488
            $select = $sql->select()
485
                ->from('tbl_recruitment_selection_pre_aplications')
489
                ->from('tbl_recruitment_selection_pre_aplications')
Línea 486... Línea 490...
486
                ->where(['uuid' => $data['uuid'], 'full_name' => $data['full_name']]);
490
                ->where(['uuid' => $data['uuid'], 'full_name' => $data['full_name']]);
Línea 493... Línea 497...
493
                $update = $sql->update('tbl_recruitment_selection_pre_aplications')
497
                $update = $sql->update('tbl_recruitment_selection_pre_aplications')
494
                    ->set([
498
                    ->set([
495
                        'vacancy_id' => $data['vacancy_id'],
499
                        'vacancy_id' => $data['vacancy_id'],
496
                        'location' => $data['location'],
500
                        'location' => $data['location'],
497
                        'years_experience' => $data['years_of_experience'],
501
                        'years_experience' => $data['years_of_experience'],
498
                        'previous_positions' => $data['previous_positions'],
502
                        'previous_positions' => $data['previous_positions'], // Ahora es JSON
499
                        'specialization' => $data['specialization'],
503
                        'specialization' => $data['specialization'],
500
                        'skills' => $data['skills'],
504
                        'skills' => $data['skills'], // Ahora es JSON
501
                        'vacancy_compatibility_score' => $data['compatibility_score']
505
                        'vacancy_compatibility_score' => $data['compatibility_score']
502
                    ])
506
                    ])
503
                    ->where(['uuid' => $data['uuid'], 'full_name' => $data['full_name']]);
507
                    ->where(['uuid' => $data['uuid'], 'full_name' => $data['full_name']]);
Línea 504... Línea 508...
504
 
508
 
Línea 515... Línea 519...
515
                        'uuid' => $data['uuid'],
519
                        'uuid' => $data['uuid'],
516
                        'vacancy_id' => $data['vacancy_id'],
520
                        'vacancy_id' => $data['vacancy_id'],
517
                        'full_name' => $data['full_name'],
521
                        'full_name' => $data['full_name'],
518
                        'location' => $data['location'],
522
                        'location' => $data['location'],
519
                        'years_experience' => $data['years_of_experience'],
523
                        'years_experience' => $data['years_of_experience'],
520
                        'previous_positions' => $data['previous_positions'],
524
                        'previous_positions' => $data['previous_positions'], // Ahora es JSON
521
                        'specialization' => $data['specialization'],
525
                        'specialization' => $data['specialization'],
522
                        'skills' => $data['skills'],
526
                        'skills' => $data['skills'], // Ahora es JSON
523
                        'vacancy_compatibility_score' => $data['compatibility_score']
527
                        'vacancy_compatibility_score' => $data['compatibility_score']
524
                    ]);
528
                    ]);
Línea 525... Línea 529...
525
 
529
 
526
                $insertStatement = $sql->prepareStatementForSqlObject($insert);
530
                $insertStatement = $sql->prepareStatementForSqlObject($insert);
Línea 536... Línea 540...
536
        }
540
        }
Línea 537... Línea 541...
537
 
541
 
538
        return empty($errors) ? true : $errors;
542
        return empty($errors) ? true : $errors;
Línea -... Línea 543...
-
 
543
    }
539
    }
544
 
540
 
545
 
541
    function callExternalApi($url, $payload, $headers)
546
    function callExternalApi($url, $payload, $headers)
542
    {
547
    {
543
        $ch = curl_init($url);
548
        $ch = curl_init($url);