Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ SELECT
e.modified
FROM Events e, PMIC_getFolderInfo r
Where r.id = e.resourceid
--And e.container = '783D2EA5-C6AC-1036-A33C-BD25D0574070'
And CAST(e.startDate AS DATE) = curdate() --Show only PMIC events
And CAST(e.startDate AS DATE) = curdate() --Show only PMIC events
Order by e.startDate
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
Created by: Kolli on 11/14/2019
Weekly report: This query filters all the PMIC events from today to the next 7 days
Change by Kolli, 5/5/21: This query filters all the PMIC events from next day to the next 7 days.
The Daily events will cover the current day events, no need to duplicate same day events again in the weekly report.
*/
SELECT
r.resourceid,
Expand All @@ -19,5 +21,9 @@ SELECT
e.modified
FROM Events e, PMIC_getFolderInfo r
Where r.id = e.resourceid
--And e.container = '783D2EA5-C6AC-1036-A33C-BD25D0574070' -- PMIC container
And CAST(e.startDate AS DATE) BETWEEN curdate() and TIMESTAMPADD('SQL_TSI_DAY', 7, curdate())
--And CAST(e.startDate AS DATE) BETWEEN curdate() and TIMESTAMPADD('SQL_TSI_DAY', 7, curdate())
And CAST(e.startDate AS DATE) BETWEEN TIMESTAMPADD('SQL_TSI_DAY', 1, curdate()) and TIMESTAMPADD('SQL_TSI_DAY', 7, curdate())
Order by e.startdate



Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ protected void pmicSchedulerAlert(final Container c, User u, final StringBuilder
final Map<FieldKey, ColumnInfo> colMap = QueryService.get().getColumns(ti, columns);
TableSelector ts2 = new TableSelector(ti, colMap.values(), null, null);

msg.append("<hr><b>Daily PMIC events:</b><br><br>\n");
msg.append("<hr><b>Today's PMIC events:</b><br><br>\n");
msg.append("<table border=1 style='border-collapse: collapse;'>");
msg.append("<tr bgcolor = " + '"' + "#FFD700" + '"' + "style='font-weight: bold;'>");
msg.append("<td>Resource Id </td><td>Start Date </td><td>End Date </td><td>Name </td><td>Alias </td><td>Quantity </td><td>Comments </td><td>Color </td><td>Room </td><td>Bldg </td></tr>");
Expand Down