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]
|
||||
(
|
||||
@ProcItemID int,
|
||||
@ItemID int
|
||||
@ItemID int,
|
||||
@DTS datetime
|
||||
)
|
||||
WITH EXECUTE AS OWNER
|
||||
AS
|
||||
begin
|
||||
declare @dts datetime
|
||||
set @dts = (select dts from items where itemid = @procitemid)
|
||||
-- declare @dts datetime
|
||||
-- set @dts = (select dts from items where itemid = @procitemid)
|
||||
declare @tci table
|
||||
(
|
||||
ItemID int,
|
||||
@ -1036,7 +1037,7 @@ GO
|
||||
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
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
|
||||
(
|
||||
[AuditID] bigint,
|
||||
@ -1084,7 +1085,7 @@ select distinct [AuditID],[ContentID],[Number],[Text],[Type],[FormatID],[Config]
|
||||
,(select dbo.vefn_GetStepTypeNameByItemIDandTypeID(t.itemid,r.type)) TypeName
|
||||
,*
|
||||
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
|
||||
-- where ActionDTS > procdts or dts > procdts
|
||||
) ah
|
||||
@ -1116,13 +1117,14 @@ CREATE PROCEDURE [dbo].[getContentAuditsChronologyByItemID]
|
||||
(
|
||||
@ProcedureItemID int,
|
||||
@SelectedItemID int,
|
||||
@IncludeDeletedChildren int
|
||||
@IncludeDeletedChildren int,
|
||||
@DTS datetime
|
||||
)
|
||||
|
||||
WITH EXECUTE AS OWNER
|
||||
AS
|
||||
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
|
||||
-- from
|
||||
-- (
|
||||
@ -1179,7 +1181,8 @@ CREATE PROCEDURE [dbo].[getContentAuditsSummaryByItemID]
|
||||
(
|
||||
@ProcedureItemID int,
|
||||
@SelectedItemID int,
|
||||
@IncludeDeletedChildren int
|
||||
@IncludeDeletedChildren int,
|
||||
@DTS datetime
|
||||
)
|
||||
|
||||
WITH EXECUTE AS OWNER
|
||||
@ -1206,7 +1209,7 @@ TypeName nvarchar(max),
|
||||
ordinalpath nvarchar(max)
|
||||
)
|
||||
insert into @Chrono
|
||||
select * from vefn_GetMyChronology(@ProcedureItemID,@SelectedItemID,@IncludeDeletedChildren)
|
||||
select * from vefn_GetMyChronology(@ProcedureItemID,@SelectedItemID,@IncludeDeletedChildren,@DTS)
|
||||
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)
|
||||
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
|
||||
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
|
||||
(
|
||||
src int,
|
||||
@ -2709,8 +2712,8 @@ declare @tmpTable table
|
||||
)
|
||||
insert into @tmpTable select icontentid from vefn_tblchilditems(@ProcItemID,@ProcItemID,1)
|
||||
--added jcb 20111122
|
||||
declare @dts datetime
|
||||
set @dts = (select dts from items where itemid = @ProcItemID )
|
||||
--declare @dts datetime
|
||||
--set @dts = (select dts from items where itemid = @ProcItemID )
|
||||
--set @dts = (SELECT .[dbo].[vefn_GetPreviousRevisionDTSByItemID] (@ProcItemID))
|
||||
--end added jcb 20111122
|
||||
insert into @Report
|
||||
|
Loading…
x
Reference in New Issue
Block a user