From d232e5ca46a86436e6fd4eefe6964e4bc75f26d4 Mon Sep 17 00:00:00 2001 From: amrita.vishnoi Date: Wed, 20 Jun 2018 13:04:11 +0530 Subject: [PATCH] At module files along with few procedures which need to be merge in develop but now they will merge when AT will merge in develop --- 400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj | 1 + 400-SOURCECODE/AIAHTML5.Web/content/data/json/at/at_question_filter.json | 41 +++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReport.sql | 56 -------------------------------------------------------- 500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReports.sql | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+), 56 deletions(-) create mode 100644 400-SOURCECODE/AIAHTML5.Web/content/data/json/at/at_question_filter.json delete mode 100644 500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReport.sql create mode 100644 500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReports.sql diff --git a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj index 0fb61dc..7ad525d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj +++ b/400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj @@ -1060,6 +1060,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.Web/content/data/json/at/at_question_filter.json b/400-SOURCECODE/AIAHTML5.Web/content/data/json/at/at_question_filter.json new file mode 100644 index 0000000..e2cf3c7 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.Web/content/data/json/at/at_question_filter.json @@ -0,0 +1,41 @@ +{ + "root": { + "it": [ + { + "_Id": "23", + "_tl": "Head and Neck", + "_ti": "at_tni_23.jpg" + }, + { + "_Id": "24", + "_tl": "Upper Limb", + "_ti": "at_tni_24.jpg" + }, + { + "_Id": "25", + "_tl": "Body Wall and Back", + "_ti": "at_tni_25.jpg" + }, + { + "_Id": "26", + "_tl": "Thorax", + "_ti": "at_tni_26.jpg" + }, + { + "_Id": "27", + "_tl": "Abdomen", + "_ti": "at_tni_27.jpg" + }, + { + "_Id": "28", + "_tl": "Pelvis and Perineum", + "_ti": "at_tni_28.jpg" + }, + { + "_Id": "29", + "_tl": "Lower Limb", + "_ti": "at_tni_29.jpg" + } + ] + } +} \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReport.sql b/500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReport.sql deleted file mode 100644 index 2936271..0000000 --- a/500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReport.sql +++ /dev/null @@ -1,56 +0,0 @@ -if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteLicenseUsageReports]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) -drop procedure [dbo].[usp_GetSiteLicenseUsageReports] -GO - -CREATE PROCEDURE [dbo].[usp_GetSiteLicenseUsageReports] - -- Add the parameters for the stored procedure here - @sFromDate varchar(20), @sToDate varchar(20), @sAccoutNumber varchar(50)='', @iEditionId tinyint = 0, - @pageNo int, @pageLength int, @recordCount int out -AS -BEGIN - IF 1=0 BEGIN - SET FMTONLY OFF - END - -- SET NOCOUNT ON added to prevent extra result sets from - SET NOCOUNT ON - DECLARE @dtFromDate DATETIME - DECLARE @dtToDate DATETIME - - -- convert the datatype of fromdate & todate parameter to datetime - SELECT @dtFromDate = CONVERT(DATETIME,@sFromDate) - SELECT @dtToDate = DATEADD(ms,-3,DATEADD(DAY,1,CONVERT(DATETIME,@sToDate))) - - Select RowNum,AccountNumber, EditionTitle, ReferalUrl, InstitutionName, LicenseCreationDate,TotalLogins,LastLogin - from ( - SELECT ROW_NUMBER() OVER (ORDER BY UserLoginLog.AccountNumber) AS RowNum , UserLoginLog.AccountNumber, Edition.Title AS EditionTitle, UserLoginLog.ReferalUrl, - (SELECT License.InstitutionName FROM License WHERE License.AccountNumber = UserLoginLog.AccountNumber) as InstitutionName, - (SELECT CONVERT(VARCHAR,License.CreationDate,101) FROM License WHERE License.AccountNumber = UserLoginLog.AccountNumber) as LicenseCreationDate, - COUNT(DISTINCT UserLoginLog.LogDate) AS TotalLogins, - CONVERT(VARCHAR,MAX(UserLoginLog.LogDate),101) AS LastLogin FROM - UserLoginLog INNER JOIN Edition ON UserLoginLog.Edition = CAST(Edition.Id AS NVARCHAR) - WHERE UserLoginLog.FailureId IS NULL - AND UserLoginLog.LogDate BETWEEN @dtFromDate AND @dtToDate - AND UserLoginLog.AccountNumber = (CASE WHEN LEN(@sAccoutNumber) > 0 THEN @sAccoutNumber ELSE UserLoginLog.AccountNumber END) - AND Edition.IsActive = 1 - AND Edition.Id = (CASE WHEN @iEditionId > 0 THEN @iEditionId ELSE Edition.Id END) - GROUP BY UserLoginLog.AccountNumber, Edition.Title, UserLoginLog.ReferalUrl) as usr - WHERE RowNum > @pageLength * (@pageNo - 1) AND RowNum <= @pageLength * @pageNo order by AccountNumber - - - --Calculate total number of records - select @recordCount = count(ResultTable.AccountNumber) from ( - SELECT UserLoginLog.AccountNumber, Edition.Title AS EditionTitle, UserLoginLog.ReferalUrl, - (SELECT License.InstitutionName FROM License WHERE License.AccountNumber = UserLoginLog.AccountNumber) as InstitutionName, - (SELECT CONVERT(VARCHAR,License.CreationDate,101) FROM License WHERE License.AccountNumber = UserLoginLog.AccountNumber) as LicenseCreationDate, - COUNT(DISTINCT UserLoginLog.LogDate) AS TotalLogins, - CONVERT(VARCHAR,MAX(UserLoginLog.LogDate),101) AS LastLogin FROM - UserLoginLog INNER JOIN Edition ON UserLoginLog.Edition = CAST(Edition.Id AS NVARCHAR) - WHERE UserLoginLog.FailureId IS NULL - AND UserLoginLog.LogDate BETWEEN @dtFromDate AND @dtToDate - AND UserLoginLog.AccountNumber = (CASE WHEN LEN(@sAccoutNumber) > 0 THEN @sAccoutNumber ELSE UserLoginLog.AccountNumber END) - AND Edition.IsActive = 1 - AND Edition.Id = (CASE WHEN @iEditionId > 0 THEN @iEditionId ELSE Edition.Id END) - GROUP BY UserLoginLog.AccountNumber, Edition.Title, UserLoginLog.ReferalUrl) as ResultTable; - -END - diff --git a/500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReports.sql b/500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReports.sql new file mode 100644 index 0000000..2a9420f --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/ADMIN-ANGULAR-VERSION-PROCS/dbo.usp_GetSiteLicenseUsageReports.sql @@ -0,0 +1,56 @@ +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteLicenseUsageReports]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetSiteLicenseUsageReports] +GO + +CREATE PROCEDURE [dbo].[usp_GetSiteLicenseUsageReports] + -- Add the parameters for the stored procedure here + @sFromDate varchar(20), @sToDate varchar(20), @sAccoutNumber varchar(50)='', @iEditionId tinyint = 0, + @pageNo int, @pageLength int, @recordCount int out +AS +BEGIN + IF 1=0 BEGIN + SET FMTONLY OFF + END + -- SET NOCOUNT ON added to prevent extra result sets from + SET NOCOUNT ON + DECLARE @dtFromDate DATETIME + DECLARE @dtToDate DATETIME + + -- convert the datatype of fromdate & todate parameter to datetime + SELECT @dtFromDate = CONVERT(DATETIME,@sFromDate) + SELECT @dtToDate = DATEADD(ms,-3,DATEADD(DAY,1,CONVERT(DATETIME,@sToDate))) + + Select RowNum as 'Serial_No',AccountNumber, EditionTitle, ReferalUrl, InstitutionName, LicenseCreationDate,TotalLogins,LastLogin + from ( + SELECT ROW_NUMBER() OVER (ORDER BY UserLoginLog.AccountNumber) AS RowNum , UserLoginLog.AccountNumber, Edition.Title AS EditionTitle, UserLoginLog.ReferalUrl, + (SELECT License.InstitutionName FROM License WHERE License.AccountNumber = UserLoginLog.AccountNumber) as InstitutionName, + (SELECT CONVERT(VARCHAR,License.CreationDate,101) FROM License WHERE License.AccountNumber = UserLoginLog.AccountNumber) as LicenseCreationDate, + COUNT(DISTINCT UserLoginLog.LogDate) AS TotalLogins, + CONVERT(VARCHAR,MAX(UserLoginLog.LogDate),101) AS LastLogin FROM + UserLoginLog INNER JOIN Edition ON UserLoginLog.Edition = CAST(Edition.Id AS NVARCHAR) + WHERE UserLoginLog.FailureId IS NULL + AND UserLoginLog.LogDate BETWEEN @dtFromDate AND @dtToDate + AND UserLoginLog.AccountNumber = (CASE WHEN LEN(@sAccoutNumber) > 0 THEN @sAccoutNumber ELSE UserLoginLog.AccountNumber END) + AND Edition.IsActive = 1 + AND Edition.Id = (CASE WHEN @iEditionId > 0 THEN @iEditionId ELSE Edition.Id END) + GROUP BY UserLoginLog.AccountNumber, Edition.Title, UserLoginLog.ReferalUrl) as usr + WHERE RowNum > @pageLength * (@pageNo - 1) AND RowNum <= @pageLength * @pageNo order by AccountNumber + + + --Calculate total number of records + select @recordCount = count(ResultTable.AccountNumber) from ( + SELECT UserLoginLog.AccountNumber, Edition.Title AS EditionTitle, UserLoginLog.ReferalUrl, + (SELECT License.InstitutionName FROM License WHERE License.AccountNumber = UserLoginLog.AccountNumber) as InstitutionName, + (SELECT CONVERT(VARCHAR,License.CreationDate,101) FROM License WHERE License.AccountNumber = UserLoginLog.AccountNumber) as LicenseCreationDate, + COUNT(DISTINCT UserLoginLog.LogDate) AS TotalLogins, + CONVERT(VARCHAR,MAX(UserLoginLog.LogDate),101) AS LastLogin FROM + UserLoginLog INNER JOIN Edition ON UserLoginLog.Edition = CAST(Edition.Id AS NVARCHAR) + WHERE UserLoginLog.FailureId IS NULL + AND UserLoginLog.LogDate BETWEEN @dtFromDate AND @dtToDate + AND UserLoginLog.AccountNumber = (CASE WHEN LEN(@sAccoutNumber) > 0 THEN @sAccoutNumber ELSE UserLoginLog.AccountNumber END) + AND Edition.IsActive = 1 + AND Edition.Id = (CASE WHEN @iEditionId > 0 THEN @iEditionId ELSE Edition.Id END) + GROUP BY UserLoginLog.AccountNumber, Edition.Title, UserLoginLog.ReferalUrl) as ResultTable; + +END + -- libgit2 0.21.4