Commit 5083873e authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Import/synchro des composantes d'enseignement depuis Octopus mise en commentaire pour l'instant

parent 298214b5
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -56,17 +56,17 @@ if [ -z "$SERVICE" ]; then
  SERVICES[1]='etablissement'
  SERVICES[2]='ecole-doctorale'
  SERVICES[3]='unite-recherche'
  SERVICES[4]='composante-enseignement'
  SERVICES[5]='individu'
  SERVICES[6]='doctorant'
  SERVICES[7]='these'
  SERVICES[8]='these-annee-univ'
  SERVICES[9]='role'
  SERVICES[10]='acteur'
  SERVICES[11]='origine-financement'
  SERVICES[12]='financement'
  SERVICES[13]='titre-acces'
  SERVICES[14]='variable'
  #SERVICES[4]='composante-enseignement'
  SERVICES[4]='individu'
  SERVICES[5]='doctorant'
  SERVICES[6]='these'
  SERVICES[7]='these-annee-univ'
  SERVICES[8]='role'
  SERVICES[9]='acteur'
  SERVICES[10]='origine-financement'
  SERVICES[11]='financement'
  SERVICES[12]='titre-acces'
  SERVICES[13]='variable'
  for SERVICE in ${SERVICES[@]}; do
    run ${SERVICE}
  done
+28 −98
Original line number Diff line number Diff line
@@ -243,42 +243,6 @@ $config = [
 * Ce qui suit n'est que la config "commune".
 */
const CONFIG_IMPORTS = [
    [
        'name' => 'composante-enseignement-%s',
        'order' => 10,
        'source' => [
            'name' => '%s',
            'connection' => 'sygal-import-octopus-composante-ens',
            'select' => '/structure-light?type=2',
            'code' => 'UCN::octopus',
            'page_size' => 0,
            'columns' => [
                'sigle',
                'libelleLong',
                'code',
            ],
            'column_name_filter' => [
                'sigle' => 'sigle',
                'libelleLong' => 'libelle_long',
                'code' => 'source_code',
            ],
            'source_code_column' => 'source_code',
            'column_value_filter' => [
                ['name' => PrefixEtabColumnValueFilter::class, 'params' => ['columns' => ['code']]],
            ],
            'extra' => [
                /** cf. injection dans {@see \Application\generateConfigImportsForEtabs()} */
            ],
        ],
        'destination' => [
            'name' => 'application',
            'table' => 'tmp_composante_ens',
            'connection' => 'default',
            'source_code_column' => 'source_code',
            'id_strategy' => null,
            'id_sequence' => null,
        ],
    ],
    [
        'name' => 'structure-%s',
        'order' => 10,
@@ -414,9 +378,7 @@ const CONFIG_IMPORTS = [
//            'name' => '%s',
//            'connection' => 'sygal-import-octopus-composante-ens',
//            'select' => '/structure-light?type=2',
//            'source_code_column' => 'SOURCE_CODE',
//            'code' => 'UCN::octopus',
//            'column_value_filter' => \Admission\Filter\PrefixEtabColumnValueFilter::class,
//            'page_size' => 0,
//            'columns' => [
//                'sigle',
@@ -424,59 +386,27 @@ const CONFIG_IMPORTS = [
//                'code',
//            ],
//            'column_name_filter' => [
//                'sigle' => 'SIGLE',
//                'libelleLong' => 'LIBELLE_LONG',
//                'code' => 'SOURCE_CODE',
//                'sigle' => 'sigle',
//                'libelleLong' => 'libelle_long',
//                'code' => 'source_code',
//            ],
//            'source_code_column' => 'source_code',
//            'column_value_filter' => [
//                ['name' => PrefixEtabColumnValueFilter::class, 'params' => ['columns' => ['code']]],
//            ],
//            'extra' => [
//                /** cf. injection dans {@see \Application\generateConfigImportsForEtabs()} */
//            ],
//        ],
//        'destination' => [
//            'name' => 'Application',
//            'name' => 'application',
//            'table' => 'tmp_composante_ens',
//            'connection' => 'default',
//            'source_code_column' => 'SOURCE_CODE',
//            'source_code_column' => 'source_code',
//            'id_strategy' => null,
//            'id_sequence' => null,
//        ],
//    ],
    [
        'name' => 'composante-enseignement-%s',
        'order' => 50,
        'source' => [
            'name' => '%s',
            'connection' => 'sygal-import-octopus-composante-ens',
            'select' => '/structure-light?type=2',
            'code' => 'UCN::octopus',
            'page_size' => 0,
            'columns' => [
                'sigle',
                'libelleLong',
                'code',
            ],
            'column_name_filter' => [
                'sigle' => 'sigle',
                'libelleLong' => 'libelle_long',
                'code' => 'source_code',
            ],
            'source_code_column' => 'source_code',
            'column_value_filter' => [
                ['name' => PrefixEtabColumnValueFilter::class, 'params' => ['columns' => ['code']]],
            ],
            'extra' => [
                /** cf. injection dans {@see \Application\generateConfigImportsForEtabs()} */
            ],
        ],
        'destination' => [
            'name' => 'application',
            'table' => 'tmp_composante_ens',
            'connection' => 'default',
            'source_code_column' => 'source_code',
            'id_strategy' => null,
            'id_sequence' => null,
        ],
    ],
    [
        'name' => 'individu-%s',
        'order' => 60,
@@ -951,25 +881,25 @@ const CONFIG_SYNCHROS = [
            'update_on_deleted_enabled_column' => 'synchro_update_on_deleted_enabled', // pour activer la màj des substitués (historisés)
        ],
    ],
    [
        'name' => 'composante-enseignement-%s',
        'order' => 50,
        'source' => [
            'name' => 'sygal',
            'code' => 'app',
            'table' => 'src_composante_ens',
            'connection' => 'default',
            'source_code_column' => 'source_code',
        ],
        'destination' => [
            'name' => 'application',
            'table' => 'composante_ens',
            'connection' => 'default',
            'source_code_column' => 'source_code',
            'id_strategy' => 'SEQUENCE',
            'id_sequence' => null,
        ],
    ],
//    [
//        'name' => 'composante-enseignement-%s',
//        'order' => 50,
//        'source' => [
//            'name' => 'sygal',
//            'code' => 'app',
//            'table' => 'src_composante_ens',
//            'connection' => 'default',
//            'source_code_column' => 'source_code',
//        ],
//        'destination' => [
//            'name' => 'application',
//            'table' => 'composante_ens',
//            'connection' => 'default',
//            'source_code_column' => 'source_code',
//            'id_strategy' => 'SEQUENCE',
//            'id_sequence' => null,
//        ],
//    ],
    ////////////////////////////////////////////// INDIVIDU //////////////////////////////////////////////
    [
        ////// INDIVIDU : sans doublons non historisés.