Modified getAnnotationAuditsChronologyByItemID to include datetime parameter
Modified vefn_GetMyChronology to include datetime parameter Modified getContentAuditsChronologyByItemID to include datetime parameter Modified getContentAuditsSummaryByItemID to include datetime parameter Modified vefn_ChronologyReport to include datetime parameter
This commit is contained in:
parent
3dac6dd926
commit
6046f905b1
@ -696,13 +696,14 @@ getAnnotationAuditsChronologyByItemID 30,8505
|
|||||||
CREATE procedure [dbo].[getAnnotationAuditsChronologyByItemID]
|
CREATE procedure [dbo].[getAnnotationAuditsChronologyByItemID]
|
||||||
(
|
(
|
||||||
@ProcItemID int,
|
@ProcItemID int,
|
||||||
@ItemID int
|
@ItemID int,
|
||||||
|
@DTS datetime
|
||||||
)
|
)
|
||||||
WITH EXECUTE AS OWNER
|
WITH EXECUTE AS OWNER
|
||||||
AS
|
AS
|
||||||
begin
|
begin
|
||||||
declare @dts datetime
|
-- declare @dts datetime
|
||||||
set @dts = (select dts from items where itemid = @procitemid)
|
-- set @dts = (select dts from items where itemid = @procitemid)
|
||||||
declare @tci table
|
declare @tci table
|
||||||
(
|
(
|
||||||
ItemID int,
|
ItemID int,
|
||||||
@ -1036,7 +1037,7 @@ GO
|
|||||||
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||||
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
CREATE FUNCTION [dbo].[vefn_GetMyChronology](@ProcItemID int, @ItemID int, @IncludeDeletedChildren int)
|
CREATE FUNCTION [dbo].[vefn_GetMyChronology](@ProcItemID int, @ItemID int, @IncludeDeletedChildren int, @DTS datetime)
|
||||||
RETURNS @Chrono TABLE
|
RETURNS @Chrono TABLE
|
||||||
(
|
(
|
||||||
[AuditID] bigint,
|
[AuditID] bigint,
|
||||||
@ -1084,7 +1085,7 @@ select distinct [AuditID],[ContentID],[Number],[Text],[Type],[FormatID],[Config]
|
|||||||
,(select dbo.vefn_GetStepTypeNameByItemIDandTypeID(t.itemid,r.type)) TypeName
|
,(select dbo.vefn_GetStepTypeNameByItemIDandTypeID(t.itemid,r.type)) TypeName
|
||||||
,*
|
,*
|
||||||
from vefn_tblchilditems (@ProcItemID,@ItemID,@IncludeDeletedChildren) t
|
from vefn_tblchilditems (@ProcItemID,@ItemID,@IncludeDeletedChildren) t
|
||||||
inner join vefn_chronologyreport(@ProcItemID) r
|
inner join vefn_chronologyreport(@ProcItemID,@DTS) r
|
||||||
on t.icontentid = r.contentid
|
on t.icontentid = r.contentid
|
||||||
-- where ActionDTS > procdts or dts > procdts
|
-- where ActionDTS > procdts or dts > procdts
|
||||||
) ah
|
) ah
|
||||||
@ -1116,13 +1117,14 @@ CREATE PROCEDURE [dbo].[getContentAuditsChronologyByItemID]
|
|||||||
(
|
(
|
||||||
@ProcedureItemID int,
|
@ProcedureItemID int,
|
||||||
@SelectedItemID int,
|
@SelectedItemID int,
|
||||||
@IncludeDeletedChildren int
|
@IncludeDeletedChildren int,
|
||||||
|
@DTS datetime
|
||||||
)
|
)
|
||||||
|
|
||||||
WITH EXECUTE AS OWNER
|
WITH EXECUTE AS OWNER
|
||||||
AS
|
AS
|
||||||
begin
|
begin
|
||||||
select * from vefn_GetMyChronology(@ProcedureItemID,@SelectedItemID,@IncludeDeletedChildren)
|
select * from vefn_GetMyChronology(@ProcedureItemID,@SelectedItemID,@IncludeDeletedChildren,@DTS)
|
||||||
-- select distinct [AuditID],[ContentID],[Number],[Text],[Type],[FormatID],[Config],[DTS],[UserID],[DeleteStatus],[ActionDTS],[ActionWhat],[ActionWhen],[Path],ItemID,TypeName,ordinalpath
|
-- select distinct [AuditID],[ContentID],[Number],[Text],[Type],[FormatID],[Config],[DTS],[UserID],[DeleteStatus],[ActionDTS],[ActionWhat],[ActionWhen],[Path],ItemID,TypeName,ordinalpath
|
||||||
-- from
|
-- from
|
||||||
-- (
|
-- (
|
||||||
@ -1179,7 +1181,8 @@ CREATE PROCEDURE [dbo].[getContentAuditsSummaryByItemID]
|
|||||||
(
|
(
|
||||||
@ProcedureItemID int,
|
@ProcedureItemID int,
|
||||||
@SelectedItemID int,
|
@SelectedItemID int,
|
||||||
@IncludeDeletedChildren int
|
@IncludeDeletedChildren int,
|
||||||
|
@DTS datetime
|
||||||
)
|
)
|
||||||
|
|
||||||
WITH EXECUTE AS OWNER
|
WITH EXECUTE AS OWNER
|
||||||
@ -1206,7 +1209,7 @@ TypeName nvarchar(max),
|
|||||||
ordinalpath nvarchar(max)
|
ordinalpath nvarchar(max)
|
||||||
)
|
)
|
||||||
insert into @Chrono
|
insert into @Chrono
|
||||||
select * from vefn_GetMyChronology(@ProcedureItemID,@SelectedItemID,@IncludeDeletedChildren)
|
select * from vefn_GetMyChronology(@ProcedureItemID,@SelectedItemID,@IncludeDeletedChildren,@DTS)
|
||||||
select * from @Chrono
|
select * from @Chrono
|
||||||
where AuditID is null OR AuditID in (select min(auditID) from @Chrono group by contentid UNION select max(auditID) from @Chrono group by contentid)
|
where AuditID is null OR AuditID in (select min(auditID) from @Chrono group by contentid UNION select max(auditID) from @Chrono group by contentid)
|
||||||
order by OrdinalPath, contentid,auditid
|
order by OrdinalPath, contentid,auditid
|
||||||
@ -2680,7 +2683,7 @@ select * from vefn_chronologyreport(2) where type > 0 order by contentid,auditid
|
|||||||
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||||
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
CREATE function [dbo].[vefn_ChronologyReport](@ProcItemID int)
|
CREATE function [dbo].[vefn_ChronologyReport](@ProcItemID int, @DTS datetime)
|
||||||
returns @Report table
|
returns @Report table
|
||||||
(
|
(
|
||||||
src int,
|
src int,
|
||||||
@ -2709,8 +2712,8 @@ declare @tmpTable table
|
|||||||
)
|
)
|
||||||
insert into @tmpTable select icontentid from vefn_tblchilditems(@ProcItemID,@ProcItemID,1)
|
insert into @tmpTable select icontentid from vefn_tblchilditems(@ProcItemID,@ProcItemID,1)
|
||||||
--added jcb 20111122
|
--added jcb 20111122
|
||||||
declare @dts datetime
|
--declare @dts datetime
|
||||||
set @dts = (select dts from items where itemid = @ProcItemID )
|
--set @dts = (select dts from items where itemid = @ProcItemID )
|
||||||
--set @dts = (SELECT .[dbo].[vefn_GetPreviousRevisionDTSByItemID] (@ProcItemID))
|
--set @dts = (SELECT .[dbo].[vefn_GetPreviousRevisionDTSByItemID] (@ProcItemID))
|
||||||
--end added jcb 20111122
|
--end added jcb 20111122
|
||||||
insert into @Report
|
insert into @Report
|
||||||
|
Loading…
x
Reference in New Issue
Block a user