快捷搜索:  as  2018  FtCWSyGV  С˵  test  xxx  Ψһ  w3viyKQx

和记注册:VBS实现工作任务自动QQ提醒



在现实事情中,大年夜部分软件项目都流程化、版本化治理。每小我的事情义务都必要及时处置惩罚,才能够使事情高效的进行。为此就想到用VBS来实现事情义务自动QQ提醒的功能。其事情道和记注册理很简单:使用ADO实现数据库连接,来查询相关事情义务在不合环节的状态,经由过程建立QQ临时会话看护相关职员进行处置惩罚。这样就可以避免人工的去查询事情义务,使事情加倍高效化。

以下为该法度榜样的源代码,将以下代码保存为如:Automatic_notification.vbs的vbs脚本文件。

''''''''''''''''''''设置设置设备摆设摆设信息部分''''''''''''''''''''

Dim logo_six

logo_six = "SG186"rem 项目名称设置设置设备摆设摆设

dim item_code

item_code = "330"rem 环节名称设置

dim state

state = "0"rem 工单处置惩罚状态设置

dim at_emp_no

at_emp_no = "32557"rem 指定处置惩罚职员设置

dim qq_id

qq_id = "420363096"rem 创建会话的QQ号码

dim msg

msg = "有事情义务,请及时处置惩罚!工单编号为:"rem 发送消息内容

dim Data_Source

Data_Source="BRT170"

'''''''''''''''''''''''''''''''''''''''''''''''''''

Dim res,cmd,sql

Set res=createobject("adodb.recordset")

Set cmd=createobject("adodb.command")

Rem 连接数据库

Dim Connstring

Connstring="Provider=OraOLEDB.Oracle.1;Password = query ;Persist Security Info=True; User ID= query ; Data Source = "&Dat和记注册a_Source&" ; Server = 172.19.201.170"

Cmd.activeconnection= Connstring

rem 查询语句

sql="SELECT wm_concat(app_no) app_no FROM sp_issue a WHERE substr(a.comp_code, 0, 4) IN (SELECT b.code_value FROM sp_code b WHERE b.logo_six = '"&logo_six&"') AND EXISTS (SELECT 1 FRO和记注册M sp_process c WHERE c.item_code = '"&item_code&"' AND c.state = '"&state&"' AND c.at_emp_no='"&at_emp_no&"' AND c.app_no = a.app_no)"

Cmd.CommandText=sql

Dim returnapp_no

Set res=Cmd.Execute()

If res.EOF And res.BOF Then

res.Close

Else

If res(0)"" Then

returnapp_no=Cstr(res(0))

On Error Resume Next

str=""&msg&""&returnapp和记注册_no&""

Set WshShell=WScript.CreateObject("WScript.Shell")

WshShell.run "和记注册mshta vbscript:clipboardData.SetData("+""""+"text"+""""+","+""""&str&""""+")(close)",0

WshShell.run "tencent://message/?Menu=yes&uin="&qq_id&"&Site=&Service=200&sigT=2a39fb276d15586e1114e71f7af38e195148b0369a16a40fdad564ce185f72e8de86db22c67ec3c1",0,true

WScript.Sleep 1000

WshShell.SendKeys "^v"

WshShell.SendKeys "%s"

WshShell.sendkeys "{enter}"

returnapp_no=Cstr(res(0))

End If

End If

Set res=Nothing

Set Cmd.activeconnection=Nothing

Set Cmd=Nothing

您可能还会对下面的文章感兴趣: