diff --git a/axisintegrationapi/MCS.FOI.AXISIntegration/MCS.FOI.AXISIntegration.DAL/RequestsDA.cs b/axisintegrationapi/MCS.FOI.AXISIntegration/MCS.FOI.AXISIntegration.DAL/RequestsDA.cs index c92718d24..f92ab2b46 100644 --- a/axisintegrationapi/MCS.FOI.AXISIntegration/MCS.FOI.AXISIntegration.DAL/RequestsDA.cs +++ b/axisintegrationapi/MCS.FOI.AXISIntegration/MCS.FOI.AXISIntegration.DAL/RequestsDA.cs @@ -196,7 +196,7 @@ private DataTable GetAxisRequestData(string request) onbehalf.vcLastName as onbehalfLastName, onbehalf.vcMiddleName as onbehalfMiddleName, (SELECT terminology.vcTerminology from tblTerminologyLookup terminology WHERE terminology.iLabelID = requestTypes.iLabelID and terminology.tiLocaleID = 1) as requestType, - sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT + sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT else 0 end) as requestPageCount, (case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount, @@ -353,7 +353,7 @@ private DataTable GetAxisRequestsPageCount(string[] arrayOfRequestId) ConnectionString = SettingsManager.ConnectionString; var inClauseValues = RequestsHelper.GetInClause(arrayOfRequestId); - string query = $@"Select vcVisibleRequestID as axisRequestId, sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT + string query = $@"Select vcVisibleRequestID as axisRequestId, sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT else 0 end) as requestPageCount, (case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount @@ -394,7 +394,7 @@ private DataTable GetAxisRequestsPageCount() { ConnectionString = SettingsManager.ConnectionString; - string query = @"Select vcVisibleRequestID as axisRequestId, sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT + string query = @"Select vcVisibleRequestID as axisRequestId, sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT else 0 end) as requestPageCount, (case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount diff --git a/request-management-api/request_api/schemas/foirequestwrapper.py b/request-management-api/request_api/schemas/foirequestwrapper.py index 67db1d9b0..d41378eb0 100644 --- a/request-management-api/request_api/schemas/foirequestwrapper.py +++ b/request-management-api/request_api/schemas/foirequestwrapper.py @@ -91,6 +91,7 @@ class Meta: # pylint: disable=too-few-public-methods axisSyncDate = fields.Str(data_key="axisSyncDate",allow_none=True) axisRequestId = fields.Str(data_key="axisRequestId",allow_none=True, validate=[validate.Length(max=120, error=MAX_EXCEPTION_MESSAGE)]) axispagecount = fields.Int(data_key="axispagecount",allow_none=True) + recordspagecount = fields.Int(data_key="recordspagecount",allow_none=True) description = fields.Str(data_key="description", required=True,validate=[validate.Length(min=1, error=BLANK_EXCEPTION_MESSAGE)]) category = fields.Str(data_key="category", required=True,validate=[validate.Length(min=1, error=BLANK_EXCEPTION_MESSAGE)]) requestType = fields.Str(data_key="requestType", required=True,validate=[validate.Length(min=1, error=BLANK_EXCEPTION_MESSAGE)])