init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
INSERT INTO [dbo].[SensorsType] ([TypeId], [SensorType]) VALUES (6, 'StreamInput')
|
||||
@@ -0,0 +1,64 @@
|
||||
ALTER PROCEDURE [dbo].[sp_CalculatedChannelsUpdateInsert]
|
||||
@id int = 0
|
||||
,@Operation int
|
||||
,@CalculatedChannelValueCode nvarchar(255)
|
||||
,@InputChannelIds varbinary(max)
|
||||
,@CFCForInputChannels nvarchar(255)
|
||||
,@CFCForOutput nvarchar(255)
|
||||
,@TestSetupName nvarchar(255)
|
||||
,@CCName nvarchar(255)
|
||||
,@ClipLength int
|
||||
,@ViewInRealtime bit
|
||||
,@new_id int OUTPUT
|
||||
,@errorNumber int output
|
||||
,@errorMessage nvarchar(250) output
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
set @errorNumber = 0
|
||||
set @errorMessage = space(0)
|
||||
|
||||
if(@Operation is null or @TestSetupName is null)
|
||||
begin
|
||||
RAISERROR(15600,-1,-1, 'sp_CalculatedChannelsUpdateInsert') /* Error 1560 - An invalid parameter or option was specified for procedure*/
|
||||
end
|
||||
else
|
||||
begin
|
||||
declare @TestSetupId int
|
||||
set @TestSetupId = dbo.foo_IdGetTestSetup(@TestSetupName)
|
||||
|
||||
if(@id != 0 and exists(select Id from [dbo].[CalculatedChannels] where Id = @id and TestSetupId = @TestSetupId))
|
||||
begin
|
||||
set @new_id = @id
|
||||
|
||||
exec [dbo].[sp_CalculatedChannelsUpdate] @id
|
||||
,@Operation
|
||||
,@CalculatedChannelValueCode
|
||||
,@InputChannelIds
|
||||
,@CFCForInputChannels
|
||||
,@CFCForOutput
|
||||
,@TestSetupName
|
||||
,@CCName
|
||||
,@ClipLength
|
||||
,@ViewInRealtime
|
||||
,@errorNumber output
|
||||
,@errorMessage output
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
exec [dbo].[sp_CalculatedChannelsInsert] @Operation
|
||||
,@CalculatedChannelValueCode
|
||||
,@InputChannelIds
|
||||
,@CFCForInputChannels
|
||||
,@CFCForOutput
|
||||
,@TestSetupName
|
||||
,@CCName
|
||||
,@ViewInRealtime
|
||||
,@ClipLength
|
||||
,@new_id OUTPUT
|
||||
,@errorNumber output
|
||||
,@errorMessage output
|
||||
end
|
||||
end
|
||||
END
|
||||
Binary file not shown.
@@ -0,0 +1,47 @@
|
||||
ALTER PROCEDURE [dbo].[sp_DASGet_95]
|
||||
@SerialNumber nvarchar(50) = null
|
||||
,@position nvarchar(10) = null
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
SELECT [DASId]
|
||||
,[SerialNumber]
|
||||
,[Type]
|
||||
,[MaxModules]
|
||||
,[MaxMemory]
|
||||
,[MaxSampleRate]
|
||||
,[MinSampleRate]
|
||||
,[FirmwareVersion]
|
||||
,[CalDate]
|
||||
,[ProtocolVersion]
|
||||
,[LastModified]
|
||||
,[LastModifiedBy]
|
||||
,[Version]
|
||||
,[LocalOnly]
|
||||
,[LastUsed]
|
||||
,[LastUsedBy]
|
||||
,[Connection]
|
||||
,[Channels]
|
||||
,[Position]
|
||||
,[ChannelTypes]
|
||||
,[Reprogramable]
|
||||
,[Reconfigurable]
|
||||
,[IsModule]
|
||||
,isnull([PositionOnDistributor], 0) as [PositionOnDistributor]
|
||||
,isnull([PositionOnChain], 0) as [PositionOnChain]
|
||||
,isnull([Port],0) as [Port]
|
||||
,isnull([ParentDAS], space(0)) as [ParentDAS],
|
||||
[FirstUseDate],
|
||||
[TestId],
|
||||
[GroupId],
|
||||
[StandIn],
|
||||
[MaxAAFRate]
|
||||
|
||||
FROM [dbo].[DAS] where
|
||||
(@SerialNumber is null or DASId = dbo.foo_IdGetDAS(@SerialNumber))
|
||||
and
|
||||
Position = case when @position is null then space(0) else @position end
|
||||
and
|
||||
Type!=59
|
||||
END
|
||||
Binary file not shown.
Reference in New Issue
Block a user