refactor(printer delays): reduced the time formula from .9 to .7 to give a little more freedom
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
export const lotQuery = `
|
export const lotQuery = `
|
||||||
select IdMaschinen_ProdPlanung as LabelOnlineID,
|
select IdMaschinen_ProdPlanung as LabelOnlineID,
|
||||||
IdMaschine as machineID,
|
x.IdMaschine as machineID,
|
||||||
MaschinenStandort as MachineLocation,
|
MaschinenStandort as MachineLocation,
|
||||||
MaschinenBez as MachineDescription,
|
MaschinenBez as MachineDescription,
|
||||||
IdProdPlanung as lot,
|
x.IdProdPlanung as lot,
|
||||||
prolink.lot as ProlinkLot,
|
prolink.lot as ProlinkLot,
|
||||||
IdArtikelvarianten as AV,
|
x.IdArtikelvarianten as AV,
|
||||||
ArtikelVariantenBez as Alias,
|
x.ArtikelVariantenBez as Alias,
|
||||||
convert(varchar, add_date, 20) as Add_Date,
|
convert(varchar, x.add_date, 20) as Add_Date,
|
||||||
Add_user,
|
x.Add_user,
|
||||||
idEtikettenDrucker as printerID,
|
idEtikettenDrucker as printerID,
|
||||||
b.name as PrinterName,
|
b.name as PrinterName,
|
||||||
CAST(TotalPlannedLoadingUnits as float) as PlannedQTY,
|
CAST(TotalPlannedLoadingUnits as float) as PlannedQTY,
|
||||||
@@ -23,21 +23,26 @@ select IdMaschinen_ProdPlanung as LabelOnlineID,
|
|||||||
else 'no' end as overPrinting,
|
else 'no' end as overPrinting,
|
||||||
CustomerHumanReadableId as CustomerId,
|
CustomerHumanReadableId as CustomerId,
|
||||||
CustomerName as CustomerName,
|
CustomerName as CustomerName,
|
||||||
idMaschine as MachineID,
|
x.idMaschine as MachineID,
|
||||||
prolink.lastProlinkUpdate as lastProlinkUpdate,
|
prolink.lastProlinkUpdate as lastProlinkUpdate,
|
||||||
IdEtikettenLayoutPalette as palletLabel,
|
IdEtikettenLayoutPalette as palletLabel,
|
||||||
AnzahlKopienPalette as pallerCopies,
|
AnzahlKopienPalette as pallerCopies,
|
||||||
IdEtikettenLayoutKarton as cartonLabel,
|
IdEtikettenLayoutKarton as cartonLabel,
|
||||||
AnzahlKopienKarton as cartonCopies,
|
AnzahlKopienKarton as cartonCopies,
|
||||||
IsTechnicallyReleased
|
IsTechnicallyReleased,
|
||||||
|
DruckStatus as allowPrinting,
|
||||||
|
p.MaschZyklus as cycleTime,
|
||||||
|
x.StueckzahlJePalette,
|
||||||
|
p.WerkzeugKavität,
|
||||||
|
(((x.StueckzahlJePalette /p.WerkzeugKavität) * p.MaschZyklus) * (p.MaschAuslastung/100)) * .70 as timeTOmakeInSeconds
|
||||||
--*
|
--*
|
||||||
from AlplaPROD_test1.dbo.V_Maschinen_ProdPlanungen x (nolock)
|
from AlplaPROD_test1.dbo.V_Maschinen_ProdPlanungen x (nolock)
|
||||||
join
|
join
|
||||||
[test1_AlplaPROD2.0_Read].[productionControlling].[ProducedLot] on
|
[test1_AlplaPROD2.0_Read].[productionControlling].[ProducedLot](nolock) on
|
||||||
x.IdProdPlanung =
|
x.IdProdPlanung =
|
||||||
[test1_AlplaPROD2.0_Read].[productionControlling].[ProducedLot].ProductionLotHumanReadableId
|
[test1_AlplaPROD2.0_Read].[productionControlling].[ProducedLot].ProductionLotHumanReadableId
|
||||||
left join
|
left join
|
||||||
[test1_AlplaPROD2.0_Read].masterData.Printer as b on
|
[test1_AlplaPROD2.0_Read].masterData.Printer (nolock) as b on
|
||||||
x.IdEtikettenDrucker = b.HumanReadableId
|
x.IdEtikettenDrucker = b.HumanReadableId
|
||||||
-- adding in prolink lot
|
-- adding in prolink lot
|
||||||
left join
|
left join
|
||||||
@@ -51,5 +56,16 @@ select IdMaschinen_ProdPlanung as LabelOnlineID,
|
|||||||
) as prolink on
|
) as prolink on
|
||||||
x.idMaschine = prolink.prolinkMachineId
|
x.idMaschine = prolink.prolinkMachineId
|
||||||
|
|
||||||
where IsTechnicallyReleased = 1
|
----packagin info
|
||||||
|
--left join
|
||||||
|
--[test1_AlplaPROD2.0_Read].[masterData].[PackagingInstruction] (nolock) pkg on
|
||||||
|
--pkg.HumanReadableId = x.IdVpkVorschrift
|
||||||
|
|
||||||
|
-- cycle time info
|
||||||
|
left join
|
||||||
|
AlplaPROD_test1.dbo.V_ProdPlanung (nolock) as p on
|
||||||
|
p.IdProdPlanung = x.IdProdPlanung
|
||||||
|
|
||||||
|
|
||||||
|
where IsTechnicallyReleased = 1 and DruckStatus = 1
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user