Skip to content

Commit

Permalink
feat: Ajout d'un uai à la liste des uais de recensement
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinPetel committed Jun 26, 2024
1 parent a260e3c commit b4553d9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
13 changes: 0 additions & 13 deletions server/src/jobs/buildRelationCsv.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,13 @@ async function buildRelationCsv({ outputRelations, outputInvalids }, options = {
mergeStreams(...streams),

transformData(({ siret_responsable, email_responsable, uai_formateurs }) => {
// if (siret_responsable === "19850144700033" || uai_formateurs.includes("0851372E")) {
// console.log({
// siret_responsable,
// email_responsable: email_responsable,
// overwrite_email: overwriteEmails.get(siret_responsable),
// uai_formateurs,
// });
// }

return {
siret_responsable,
email_responsable: email_responsable ?? overwriteEmails.get(siret_responsable),
uai_formateurs,
};
}),
transformData(({ siret_responsable, email_responsable, uai_formateurs }) => {
if (siret_responsable === "19850144700033" || uai_formateurs.includes("0851372E")) {
console.log({ siret_responsable, email_responsable, uai_formateurs });
}

const sanitized_siret_responsable = siret_responsable?.replace(/\s+/g, "")?.toLowerCase();
const sanitized_email_responsable = email_responsable?.replace(/\s+/g, "");
const sanitized_uai_formateurs = uai_formateurs
Expand Down
1 change: 1 addition & 0 deletions server/src/jobs/computeStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const UAIS_RECENSEMENT = [
"0440087F",
"0479999N",
"0489999H",
"0529999L",
"0649999W",
"0669999K",
"0679999E",
Expand Down
7 changes: 0 additions & 7 deletions server/src/jobs/utils/offreDeFormation.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,10 @@ async function streamOffreDeFormation(options = {}) {
let uai_formateur = data["UAI_FORMATEUR"]?.toUpperCase();
// let uai_responsable = data["UAI_RESPONSABLE"]?.toUpperCase();

if (siret_responsable === "19850144700033" || uai_formateur.includes("0851372E")) {
console.log({ siret_responsable, uai_formateur });
}
const academie = data["ACADEMIE"];
const code_offre = data["CODE_OFFRE"];
const affelnet_id = `${academie}/${code_offre}`;

if (affelnet_id === "NANTES/APP11565") {
console.log({ siret_responsable, uai_formateur, uai_accueil, data });
}

if (siret_responsable === SIRET_RECENSEMENT) {
logger.debug(`${affelnet_id} / Siret recensement détecté pour l'uai_accueil d'accueil ${uai_accueil}`);
return accumulator;
Expand Down

0 comments on commit b4553d9

Please sign in to comment.