refactor(blocking query): changes made to only show 1 bo at a atime

This commit is contained in:
2025-05-02 07:52:37 -05:00
parent 6f46f40414
commit 21bcdde625

View File

@@ -1,5 +1,5 @@
export const blockQuery = `
SELECT
SELECT TOP(1)
'Alert! new blocking order: #' + cast(HumanReadableId as varchar) + ' - ' + ArticleVariantDescription as subject,
cast([HumanReadableId] as varchar) as blockingNumber,
[ArticleVariantDescription] as article,
@@ -41,5 +41,6 @@ on [test1_AlplaPROD2.0_Reporting].[reporting_blocking].[BlockingOrder].Producti
where [test1_AlplaPROD2.0_Reporting].[reporting_blocking].[BlockingOrder].[BlockingDate] between getdate() - 1 and getdate() + 1
and [test1_AlplaPROD2.0_Reporting].[reporting_blocking].[BlockingOrder].BlockingTrigger = 1
and HumanReadableId NOT IN ([sentBlockingOrders])
--and HumanReadableId NOT IN ([sentBlockingOrders])
and HumanReadableId > [lastBlocking]
`;