case 4200

This commit is contained in:
2022-09-29 21:36:13 +00:00
parent 1f5fabf5ea
commit 6a5053eeda
15 changed files with 118 additions and 100 deletions

View File

@@ -41,7 +41,7 @@ AuthorizationRoles.TechRestricted;
LEFT JOIN ACUSTOMER ON (ACUSTOMERSERVICEREQUEST.CUSTOMERID = ACUSTOMER.ID)
WHERE (ACUSTOMERSERVICEREQUEST.STATUS = 0) {custTagsWhere}
ORDER BY ACUSTOMERSERVICEREQUEST.DATEREQUESTED ASC
) t";
) t LIMIT {KPIFetcher.KPI_LIST_MAX_ITEMS_TO_RETURN}";
_metaQuery = string.Empty;
// @"SELECT row_to_json(t) as res from (
// select name from auser where id = 10

View File

@@ -15,11 +15,15 @@ namespace AyaNova.KPI
#if (AYSHOWKPIQUERYINFO)
#if (DEBUG)
#warning FYI AYSHOWKPIQUERYINFO is defined
#else
#else
#error ### HOLDUP: AYSHOWKPIQUERYINFO is defined in a RELEASE BUILD!!!!
#endif
#endif
//case 4200
//### WARNING: IF CHANGE HERE **must** update CLIENT dash-base.js same named constant as it relies on it's own copy of this CONSTANT value to indicate if there are possibly more
internal const int KPI_LIST_MAX_ITEMS_TO_RETURN = 100;//Maximum number of items to return from a KPI dashboard query so as not to overwhelm the client with too much data
////////////////////////////////////////////////
// Get the kpi data requested
//

View File

@@ -78,7 +78,7 @@ namespace AyaNova.KPI
LEFT JOIN ACUSTOMER ON (AWORKORDER.CUSTOMERID = ACUSTOMER.ID)
WHERE {dateWhere} {statusWhere} {woTagsWhere} {woItemTagsWhere}
ORDER BY AWORKORDER.ID DESC
) t";
) t LIMIT {KPIFetcher.KPI_LIST_MAX_ITEMS_TO_RETURN}";
_metaQuery = string.Empty;
// @"SELECT row_to_json(t) as res from (
// select name from auser where id = 10

View File

@@ -48,7 +48,7 @@ namespace AyaNova.KPI
WHERE (LASTSTATUSID IS NULL OR AWORKORDERSTATUS.COMPLETED = FALSE) and aworkorder.completebydate < now()
{woTagsWhere} {woItemTagsWhere}
ORDER BY AWORKORDER.ID ASC
) t";
) t LIMIT {KPIFetcher.KPI_LIST_MAX_ITEMS_TO_RETURN}";
_metaQuery = string.Empty;
// @"SELECT row_to_json(t) as res from (
// select name from auser where id = 10

View File

@@ -43,7 +43,7 @@ namespace AyaNova.KPI
WHERE (LASTSTATUSID IS NULL OR AWORKORDERSTATUS.COMPLETED = FALSE) and aworkorder.completebydate < now()
AND AWORKORDERITEMSCHEDULEDUSER.userID = {userId} {woTagsWhere} {woItemTagsWhere}
ORDER BY AWORKORDER.ID ASC
) t";
) t LIMIT {KPIFetcher.KPI_LIST_MAX_ITEMS_TO_RETURN}";
_metaQuery = string.Empty;
// @"SELECT row_to_json(t) as res from (
// select name from auser where id = 10

View File

@@ -66,7 +66,7 @@ AuthorizationRoles.TechRestricted;
{woTagsWhere} {woItemTagsWhere}
{statusWhere}
ORDER BY AWORKORDER.ID ASC
) t";
) t LIMIT {KPIFetcher.KPI_LIST_MAX_ITEMS_TO_RETURN}";
_metaQuery = string.Empty;
// @"SELECT row_to_json(t) as res from (
// select name from auser where id = 10