mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-12 17:57:09 +02:00
feat: Introduce bulk AI analyzer component to pre-classify products and prepare data for AI analysis, including context profiling.
This commit is contained in:
1 parent
a4528c6d14
commit
aa69637f98
6 files changed
+100
-18
No files matched your search
@@ -31,12 +31,13 @@ export async function getProductRows(input: GetProductRowsInput): Promise<Produc
|
||||
|
||||
// ─── Phase 2 : Mensuel + Commandes (en parallèle) ────────────────────
|
||||
const { dateDebut, dateFin } = buildLast12MonthsRange();
|
||||
const [mensuelMap, referentielMap, commandesMap, rankingMap] = await Promise.all([
|
||||
const [mensuelMap, referentielMap, commandesMap, rankingResult] = await Promise.all([
|
||||
getMensuelByArticles(articles, dateDebut, dateFin),
|
||||
getReferentielByArticles(articles),
|
||||
getCommandesByFournisseur(codeFournisseur),
|
||||
getRankingByArticles(articles),
|
||||
]);
|
||||
const { rankings: rankingMap, totalRankedProducts } = rankingResult;
|
||||
console.log(`[getProductRows] mensuel data for ${mensuelMap.size}/${articles.length} articles`);
|
||||
|
||||
// ─── Phase 3 : Fenêtre temporelle (12 mois complets) ─────────────────
|
||||
@@ -230,6 +231,7 @@ export async function getProductRows(input: GetProductRowsInput): Promise<Produc
|
||||
product.rankingQte = ranking.ranking_qte;
|
||||
product.rankingMagCa = ranking.ranking_mag_ca;
|
||||
product.rankingMagQte = ranking.ranking_mag_qte;
|
||||
product.totalRankedProducts = totalRankedProducts;
|
||||
}
|
||||
|
||||
// ─── Phase 7 : Restaurer gammes depuis dernier snapshot ──────────────
|
||||
|
||||
Reference in new issue
Block a user