CREATE PROCEDURE [dbo].[LogAdpSend]
@inMobileCrewTimeIds varchar(max),
@inMobileCrewTimeSentStatus varchar(16),
@inSuccess bit,
@inAdpBadge varchar(512),
@inLocation varchar(50),
@inTimeclock varchar(64),
@inJsonMessage varchar(max),
@inIsReceivedJson bit,
@inNumberOfPunches int
as
declare @theMobileCrewTimeStatusId int
select @theMobileCrewTimeStatusId = MobileCrewTimeSentStatusID
from MobileCrewTimeSentStatus
where [Status] = @inMobileCrewTimeSentStatus
insert into [dbo].[AdpExportLog]
(
[TimeStamp],
[Success],
[AdpBadge],
[Location],
[Timeclock],
[JsonMessage],
[NumberOfPunches],
[MobileCrewTimeFIDs],
[MobileCrewTimeSentStatusFID],
[IsReceivedJson]
)
select
getdate(),
@inSuccess,
@inAdpBadge,
@inLocation,
@inTimeclock,
@inJsonMessage,
@inNumberOfPunches,
@inMobileCrewTimeIds,
@theMobileCrewTimeStatusId,
@inIsReceivedJson
GO
GRANT EXECUTE ON [dbo].[LogAdpSend] TO [MssExec]
GO