refactor(psi): old planning numbers to revert back to maybe
This commit is contained in:
@@ -1,34 +1,34 @@
|
|||||||
export const planningNumbersByAVDate = `
|
export const planningNumbersByAVDate = `
|
||||||
use AlplaPROD_test1
|
use AlplaPROD_test1
|
||||||
declare @start_date nvarchar(30) = '[startDate]' --'2025-01-01'
|
declare @start_date nvarchar(30) = '[startDate]' --'2025-01-01'
|
||||||
declare @end_date nvarchar(30) = '[endDate]' --'2025-08-09'
|
declare @end_date nvarchar(30) = '[endDate]' --'2025-08-09'
|
||||||
/*
|
/*
|
||||||
articles will need to be passed over as well as the date structure we want to see
|
articles will need to be passed over as well as the date structure we want to see
|
||||||
*/
|
*/
|
||||||
|
|
||||||
select x.IdArtikelvarianten As Article,
|
select x.IdArtikelvarianten As Article,
|
||||||
ProduktionAlias as Description,
|
ProduktionAlias as Description,
|
||||||
standort as MachineId,
|
standort as MachineId,
|
||||||
MaschinenBezeichnung as MachineName,
|
MaschinenBezeichnung as MachineName,
|
||||||
--MaschZyklus as PlanningCycleTime,
|
--MaschZyklus as PlanningCycleTime,
|
||||||
x.IdProdPlanung as LotNumber,
|
x.IdProdPlanung as LotNumber,
|
||||||
FORMAT(ProdTag, 'MM/dd/yyyy') as ProductionDay,
|
FORMAT(ProdTag, 'MM/dd/yyyy') as ProductionDay,
|
||||||
x.planMenge as TotalPlanned,
|
x.planMenge as TotalPlanned,
|
||||||
ProduktionMenge as QTYPerDay,
|
ProduktionMenge as QTYPerDay,
|
||||||
round(ProduktionMengeVPK, 2) PalDay,
|
round(ProduktionMengeVPK, 2) PalDay,
|
||||||
Status as finished
|
Status as finished
|
||||||
--MaschStdAuslastung as nee
|
--MaschStdAuslastung as nee
|
||||||
|
|
||||||
from dbo.V_ProdLosProduktionJeProdTag_PLANNING (nolock) as x
|
from dbo.V_ProdLosProduktionJeProdTag_PLANNING (nolock) as x
|
||||||
|
|
||||||
left join
|
left join
|
||||||
dbo.V_ProdPlanung (nolock) as p on
|
dbo.V_ProdPlanung (nolock) as p on
|
||||||
x.IdProdPlanung = p.IdProdPlanung
|
x.IdProdPlanung = p.IdProdPlanung
|
||||||
|
|
||||||
where ProdTag between @start_date and @end_date
|
where ProdTag between @start_date and @end_date
|
||||||
and p.IdArtikelvarianten in ([articles])
|
and p.IdArtikelvarianten in ([articles])
|
||||||
--and V_ProdLosProduktionJeProdTag_PLANNING.IdKunde = 10
|
--and V_ProdLosProduktionJeProdTag_PLANNING.IdKunde = 10
|
||||||
--and IdProdPlanung = 18442
|
--and IdProdPlanung = 18442
|
||||||
|
|
||||||
order by ProdTag desc
|
order by ProdTag desc
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user