feat(finaly): the final push before moving all to the new lst
This commit is contained in:
@@ -1,33 +1,34 @@
|
||||
export const planningNumbersByAVDate = `
|
||||
use AlplaPROD_test1
|
||||
declare @start_date nvarchar(30) = [startDate] --'2025-01-01'
|
||||
declare @end_date nvarchar(30) = [endDate] --'2025-08-09'
|
||||
declare @start_date nvarchar(30) = '[startDate]' --'2025-01-01'
|
||||
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
|
||||
*/
|
||||
|
||||
-- planned lots in planning
|
||||
|
||||
select V_ProdLosProduktionJeProdTag_PLANNING.IdArtikelvarianten As Article,
|
||||
select x.IdArtikelvarianten As Article,
|
||||
ProduktionAlias as Description,
|
||||
standort as MachineId,
|
||||
MaschinenBezeichnung as MachineName,
|
||||
--MaschZyklus as PlanningCycleTime,
|
||||
V_ProdLosProduktionJeProdTag_PLANNING.IdProdPlanung as LotNumber,
|
||||
x.IdProdPlanung as LotNumber,
|
||||
FORMAT(ProdTag, 'MM/dd/yyyy') as ProductionDay,
|
||||
V_ProdLosProduktionJeProdTag_PLANNING.planMenge as TotalPlanned,
|
||||
x.planMenge as TotalPlanned,
|
||||
ProduktionMenge as QTYPerDay,
|
||||
round(ProduktionMengeVPK, 2) PalDay,
|
||||
Status as finished
|
||||
--MaschStdAuslastung as nee
|
||||
|
||||
from dbo.V_ProdLosProduktionJeProdTag_PLANNING (nolock)
|
||||
from dbo.V_ProdLosProduktionJeProdTag_PLANNING (nolock) as x
|
||||
|
||||
left join
|
||||
dbo.V_ProdPlanung (nolock) on
|
||||
V_ProdLosProduktionJeProdTag_PLANNING .IdProdPlanung = V_ProdPlanung.IdProdPlanung
|
||||
dbo.V_ProdPlanung (nolock) as p on
|
||||
x.IdProdPlanung = p.IdProdPlanung
|
||||
|
||||
where V_ProdLosProduktionJeProdTag_PLANNING.IdArtikelvarianten in ([articles]) and ProdTag between @start_date and @end_date --and IdProdPlanung = 18442
|
||||
where ProdTag between @start_date and @end_date
|
||||
and p.IdArtikelvarianten in ([articles])
|
||||
--and V_ProdLosProduktionJeProdTag_PLANNING.IdKunde = 10
|
||||
--and IdProdPlanung = 18442
|
||||
|
||||
order by ProdTag
|
||||
order by ProdTag desc
|
||||
`;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
export const productionNumbers = `
|
||||
use [test1_AlplaPROD2.0_Reporting]
|
||||
|
||||
declare @startDate nvarchar(30) = [startDate] --'2024-12-30'
|
||||
declare @endDate nvarchar(30) = [endDate] --'2025-08-09'
|
||||
declare @startDate nvarchar(30) = '[startDate]' --'2024-12-30'
|
||||
declare @endDate nvarchar(30) = '[endDate]' --'2025-08-09'
|
||||
|
||||
select MachineLocation,
|
||||
ArticleHumanReadableId as article,
|
||||
|
||||
34
server/services/sqlServer/querys/psiReport/psiinventory.ts
Normal file
34
server/services/sqlServer/querys/psiReport/psiinventory.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
export const planningNumbersByAVDate = `
|
||||
use AlplaPROD_test1
|
||||
declare @start_date nvarchar(30) = '[startDate]' --'2025-01-01'
|
||||
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
|
||||
*/
|
||||
|
||||
select x.IdArtikelvarianten As Article,
|
||||
ProduktionAlias as Description,
|
||||
standort as MachineId,
|
||||
MaschinenBezeichnung as MachineName,
|
||||
--MaschZyklus as PlanningCycleTime,
|
||||
x.IdProdPlanung as LotNumber,
|
||||
FORMAT(ProdTag, 'MM/dd/yyyy') as ProductionDay,
|
||||
x.planMenge as TotalPlanned,
|
||||
ProduktionMenge as QTYPerDay,
|
||||
round(ProduktionMengeVPK, 2) PalDay,
|
||||
Status as finished
|
||||
--MaschStdAuslastung as nee
|
||||
|
||||
from dbo.V_ProdLosProduktionJeProdTag_PLANNING (nolock) as x
|
||||
|
||||
left join
|
||||
dbo.V_ProdPlanung (nolock) as p on
|
||||
x.IdProdPlanung = p.IdProdPlanung
|
||||
|
||||
where ProdTag between @start_date and @end_date
|
||||
and p.IdArtikelvarianten in ([articles])
|
||||
--and V_ProdLosProduktionJeProdTag_PLANNING.IdKunde = 10
|
||||
--and IdProdPlanung = 18442
|
||||
|
||||
order by ProdTag desc
|
||||
`;
|
||||
Reference in New Issue
Block a user