fix(datamart): psiPlanning was looking at thertical but a rare case this would look at last years da

and be missed and not pull correct data, switched to plan end
This commit is contained in:
2026-01-15 13:28:18 -06:00
parent 3cc55436f3
commit 9d0db71f6a

View File

@@ -65,7 +65,7 @@ SELECT
,[ArticleAlias] ,[ArticleAlias]
FROM [test1_AlplaPROD2.0_Read].[productionScheduling].[ProductionLot] with (nolock) FROM [test1_AlplaPROD2.0_Read].[productionScheduling].[ProductionLot] with (nolock)
where TheoreticEnd between @StartDate and @EndDate where PlanEnd between @StartDate and @EndDate
and ArticleHumanReadableId in ([articles]) and ArticleHumanReadableId in ([articles])
and PublishState = 1 and PublishState = 1
order by PlanStart order by PlanStart
@@ -157,6 +157,7 @@ const splitProduction = (runs: any) => {
QTYPerDay: parseInt(qty.toFixed(0)), QTYPerDay: parseInt(qty.toFixed(0)),
PalDay: parseFloat(pal.toFixed(2)), PalDay: parseFloat(pal.toFixed(2)),
finished: e.ProductionLotState === 3 ? 1 : 0, finished: e.ProductionLotState === 3 ? 1 : 0,
cavities: e.Cavities,
//prodDuration, //prodDuration,
}); });
} }