在快表代理配置工具自动任务中执行如下脚本
- DECLARE @UUID varchar(1000),@NN varchar(100)
- DECLARE cursor_name CURSOR FOR --定义游标
- SELECT UUID,NN
- FROM [dbo].[SYS_FLOWDETAIL]
- WHERE NT = 0
- OPEN cursor_name --打开游标
- FETCH NEXT FROM cursor_name INTO @UUID,@NN --抓取下一行游标数据
- WHILE @@FETCH_STATUS = 0
- BEGIN
- INSERT INTO [dbo].[SYS_AGENT]
- ([ID]
- ,[FDID]
- ,[DEST]
- ,[TYPE]
- ,[SUBJECT]
- ,[RETRY]
- ,[STATUS]
- ,[MAILTITLE]
- ,[GENERATETIME]
- ,[SENDTIME]
- ,[URL])
- SELECT NEWID(),
- NEWID(),
- (SELECT USEREMAIL FROM SYS_USER WHERE UUID = VALUE)
- ,'1'
- ,@NN
- ,'0'
- ,'0'
- ,'邮件标题'+ @NN
- ,GetDate()
- ,NULL
- ,''
- FROM [dbo].[Split](@UUID,',')
- FETCH NEXT FROM cursor_name INTO @UUID,@NN
- END
- CLOSE cursor_name --关闭游标
- DEALLOCATE cursor_name --释放游标
复制代码
或可以直接下载
工作流催办.rar
(560 Bytes, 下载次数: 8)
上述是邮件提醒,也可以改为短信、微信、钉钉提醒
|
|
hessen