Modified vefn_ChronologyReport to include datetime parameter
Modified vefn_GetMyChronology to include datetime parameter Modified getContentAuditsChronologyByItemID to include datetime parameter Modified getContentAuditsSummaryByItemID to include datetime parameter Modified getAnnotationAuditsChronologyByItemID to include datetime parameter Modified getAnnotationAuditsChronologyByItemIDandUnitID to include datetime parameter Modified getContentAuditsChronologyByItemIDandUnitID to include datetime parameter Modified getContentAuditsSummaryByItemIDandUnitID to include datetime parameter
This commit is contained in:
parent
f8a3adcd32
commit
3dac6dd926
@ -209,7 +209,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,
|
||||
@ -238,8 +238,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
|
||||
@ -631,7 +631,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,
|
||||
@ -679,7 +679,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
|
||||
@ -715,13 +715,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
|
||||
-- (
|
||||
@ -778,7 +779,8 @@ CREATE PROCEDURE [dbo].[getContentAuditsSummaryByItemID]
|
||||
(
|
||||
@ProcedureItemID int,
|
||||
@SelectedItemID int,
|
||||
@IncludeDeletedChildren int
|
||||
@IncludeDeletedChildren int,
|
||||
@DTS datetime
|
||||
)
|
||||
|
||||
WITH EXECUTE AS OWNER
|
||||
@ -805,7 +807,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
|
||||
@ -1335,13 +1337,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,
|
||||
@ -4642,13 +4645,14 @@ create procedure [dbo].[getAnnotationAuditsChronologyByItemIDandUnitID]
|
||||
(
|
||||
@ProcItemID int,
|
||||
@ItemID int,
|
||||
@UnitID int
|
||||
@UnitID 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,
|
||||
@ -4758,13 +4762,14 @@ CREATE PROCEDURE [dbo].[getContentAuditsChronologyByItemIDandUnitID]
|
||||
@ProcedureItemID int,
|
||||
@SelectedItemID int,
|
||||
@IncludeDeletedChildren int,
|
||||
@UnitID int
|
||||
@UnitID 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
|
||||
-- (
|
||||
@ -4827,7 +4832,8 @@ create PROCEDURE [dbo].[getContentAuditsSummaryByItemIDandUnitID]
|
||||
@ProcedureItemID int,
|
||||
@SelectedItemID int,
|
||||
@IncludeDeletedChildren int,
|
||||
@UnitID int
|
||||
@UnitID int,
|
||||
@DTS datetime
|
||||
)
|
||||
|
||||
WITH EXECUTE AS OWNER
|
||||
@ -4855,7 +4861,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)
|
||||
where dbo.ve_GetItemApplicability(ItemID) = '-1' or ',' + dbo.ve_GetItemApplicability(ItemID) + ',' like '%,' + cast(@UnitID as varchar(10)) + ',%'
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user