feat(lstv2 move): moved lstv2 into this app to keep them combined and easier to maintain
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export const alplaStock = `
|
||||
select IdLagerAbteilung as alpla_laneID,
|
||||
LagerAbteilungKurzBez as alpla_laneDescription,
|
||||
IdArtikelVarianten as Article,
|
||||
ArtikelVariantenBez as description,
|
||||
lfdnr as runningNumber
|
||||
from AlplaPROD_test1.dbo.V_LagerPositionenBarcodes
|
||||
where IdLagerAbteilung = [laneID]
|
||||
`;
|
||||
@@ -0,0 +1,24 @@
|
||||
export const ocmeInventory = `
|
||||
SELECT [ocme_laneLevelID]
|
||||
,[alpla_laneID]
|
||||
,[alpla_laneDescription]
|
||||
,bob.SKU as Article
|
||||
,bob.description
|
||||
,bob.sscc
|
||||
,bob.runningNumber
|
||||
FROM [Alpla_Lst].[dbo].[lanes] (nolock) a
|
||||
|
||||
left JOIN
|
||||
(Select p.SKEY,
|
||||
x.y.value('(value)[1]', 'varchar(max)') AS sscc,
|
||||
b.y.value('(value)[1]', 'varchar(max)') AS runningNumber,
|
||||
k.l.value('(value)[1]', 'varchar(max)') AS SKU,
|
||||
d.l.value('(value)[1]', 'varchar(max)') AS description
|
||||
from Agv_AlplaDayton.dbo.Park p (nolock)
|
||||
outer apply p.pallet_card.nodes('/*:ArrayOfClsPalletCard/*:clsPalletCard/*:PalletCardConfig/*:palletCardFieldList/*:clsPalletCardField[Name="SSCC"]') as x(y)
|
||||
outer apply p.pallet_card.nodes('/*:ArrayOfClsPalletCard/*:clsPalletCard/*:PalletCardConfig/*:palletCardFieldList/*:clsPalletCardField[Name="RUNNING_NUMBER"]') as b(y)
|
||||
outer apply p.pallet_card.nodes('/*:ArrayOfClsPalletCard/*:clsPalletCard/*:PalletCardConfig/*:palletCardFieldList/*:clsPalletCardField[Name= "SKU" ]') as k(l)
|
||||
outer apply p.pallet_card.nodes('/*:ArrayOfClsPalletCard/*:clsPalletCard/*:PalletCardConfig/*:palletCardFieldList/*:clsPalletCardField[Name= "DESCRIPTION" ]') as d(l)) as bob
|
||||
on a.ocme_laneLevelID = bob.SKEY
|
||||
where alpla_laneDescription = '[lane]' and runningNumber > 1
|
||||
`;
|
||||
@@ -0,0 +1,6 @@
|
||||
export const getLanes = `
|
||||
select DISTINCT alpla_laneDescription
|
||||
from Alpla_Lst.dbo.lanes (nolock)
|
||||
where alpla_laneDescription is not null
|
||||
order by alpla_laneDescription desc
|
||||
`;
|
||||
@@ -0,0 +1,18 @@
|
||||
export const shipmentPallets = `
|
||||
select TOP([totalPallets]) IdLagerAbteilung as laneId,
|
||||
LagerAbteilungKurzBez as lane,
|
||||
Produktionslos as lotNum,
|
||||
lfdnr as runningNumber,
|
||||
IdAdresse as addressID,
|
||||
ProduktionsDatumMin as productionDate,
|
||||
IdArtikelVarianten as article
|
||||
from AlplaPROD_test1.dbo.V_LagerPositionenBarcodes (nolock)
|
||||
where IdArtikelVarianten = [article]
|
||||
and LagerAbteilungKurzBez in ([lanes])
|
||||
and IdWarenlager not in (1)
|
||||
and GesperrtAktivSum in (0)
|
||||
order by CASE
|
||||
WHEN BewegungsDatumMax <= DATEADD(DAY, -[fifo], GETDATE()) THEN 0
|
||||
ELSE 1
|
||||
END desc
|
||||
`;
|
||||
Reference in New Issue
Block a user