fix(datamart): fix for delivery date by range error for hardcoded date

This commit is contained in:
2025-06-10 11:47:55 -05:00
parent 12d0c6923d
commit 7b60ddcadf
2 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,9 @@ export const startNotificationMonitor = async () => {
createLog("info", "notify", "notify", `Notification system is now active.`); createLog("info", "notify", "notify", `Notification system is now active.`);
setInterval(async () => { setInterval(async () => {
const { data, error } = await tryCatch(db.select().from(notifications)); const { data: notes, error } = (await tryCatch(
db.select().from(notifications)
)) as any;
if (error) { if (error) {
createLog( createLog(
@@ -27,8 +29,6 @@ export const startNotificationMonitor = async () => {
); );
} }
const notes: any = data;
for (const note of notes) { for (const note of notes) {
//if we get deactivated remove it. //if we get deactivated remove it.
if (runningCrons[note.name] && !note.active) { if (runningCrons[note.name] && !note.active) {

View File

@@ -1,7 +1,7 @@
export const deliveryByDateRange = ` export const deliveryByDateRange = `
use AlplaPROD_test1 use AlplaPROD_test1
DECLARE @StartDate DATE = ' 1990-1-1 ' -- 2025-1-1 DECLARE @StartDate DATE = '[startDate]' -- 2025-1-1
DECLARE @EndDate DATE = '2025-4-18' -- 2025-1-31 DECLARE @EndDate DATE = '[endDate]' -- 2025-1-31
select * from select * from
(select (select wert from dbo.T_SystemParameter where Bezeichnung = 'Werkskuerzel') as Plant, (select (select wert from dbo.T_SystemParameter where Bezeichnung = 'Werkskuerzel') as Plant,
AuftragsNummer as OrderNumber, AuftragsNummer as OrderNumber,