日期:2014-05-17 浏览次数:20515 次
USE DP6_Siemens
GO
/****** Object: StoredProcedure [dbo].[ExtraProc_JD] Script Date: 02/04/2013 09:58:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <W>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[ExtraProc_SR]
-- Add the parameters for the stored procedure here
@NewSmsId BIGINT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
DECLARE @CorpId INT , @Mobile VARCHAR(15)
SET @CorpId = 1
SELECT @Mobile = Mobile
FROM DP_SmsInProcess
WHERE NewSmsId = @NewSmsId
---------------------------------------
IF DP_SmsInProcess.Content LIKE '%SR激活%'
BEGIN
INSERT INTO DP_SmsOutQueue(CorpId , Mobile , [Content] , SendChannel , AttemptTimes , Operator)
SELECT @CorpId AS CorpId ,
@Mobile AS Mobile ,
'西门子dp平台提醒:您的激活信息已收到,请耐心等待dp客服给您发出的资料核实,谢谢!' AS CONTENT ,
dbo.GetSmsChannelByMobile(@Mobile , @CorpId) AS SendChannel ,
0 AS AttemptTimes ,
'SR_Remind' AS Operator
END
---------------------------------------------
IF dbo.DP_SmsInProcess.Content LIKE '%SR调岗%'
BEGIN
INSERT INTO DP_SmsOutQueue(CorpId , Mobile , [Content] , SendChannel , AttemptTimes , Operator)
SELECT @CorpId AS CorpId ,
@Mobile AS Mobile ,
'西门子dp平台提醒:您的调岗信息已收到,请耐心等待dp客服给您发出的资料核实,谢谢!' AS CONTENT ,
dbo.GetSmsChannelByMobile(@Mobile , @CorpId) AS SendChannel ,
0 AS AttemptTimes ,
'SR_Remind' AS Operator
END
------------------------------------------------------
IF dbo.DP_SmsInProcess.Content LIKE '%SR更换手机%'
BEGIN
INSERT INTO DP_SmsOutQueue(CorpId , Mobile , [Content] , SendChannel , AttemptTimes , Operator)
SELECT @CorpId AS CorpId ,
@Mobile AS Mobile ,
'西门子dp平台提醒:您的更换手机信息已收到,请耐心等待dp客服给您发出的资料核实,谢谢!' AS CONTENT ,
dbo.GetSmsChannelByMobile(@Mobile , @CorpId) AS SendChannel ,
0 AS AttemptTimes ,
'SR_Remind' AS Operator
END
----------------------------
IF dbo.DP_SmsInProcess.Content LIKE