<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include file="JsonPost_1000006.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<%
|
ServiceOrdID = trim(request("ServiceOrdID"))
|
OAid = trim(request("OAid"))
|
|
If OAid="" Or OAid="0" Then
|
Response.Write "2"
|
Response.End
|
End If
|
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
sql="select OA_User_ID,OA_weixinUserID,OA_Name from OA_User where OA_execLevel>-1 and OA_weixinStatus=1 and OA_User_ID in ("&OAid&")"
|
rs.open sql,objConn,1,1
|
do while not rs.Eof
|
OA_weixinUserID = rs("OA_weixinUserID")
|
OA_Name = rs("OA_Name")
|
touser=touser&OA_weixinUserID&""","""
|
'Call OA_Running("发送服务单提醒通知给OA:"&OA_Name&" 服务单:"&ServiceOrdNo&" ID:"&ServiceOrdID)
|
rs.movenext
|
loop
|
rs.close()
|
If touser="" Then
|
Response.Write "4"
|
Response.End
|
End If
|
touser=Mid(touser,1,Len(touser)-3)
|
|
'微信OA信息下发接口
|
appUrl="https://qyapi.weixin.qq.com/cgi-bin/pstncc/call?access_token="&access_token
|
|
'微信验证码下发
|
args1="{"
|
args1=args1&"""callee_userid"":["""&touser&"""]"
|
args1=args1&"}"
|
'Response.Write args1 &"<br>"
|
'Response.end
|
HTMLCODE= PostBody(appUrl,args1)
|
'Response.Write HTMLCODE &"<br>"
|
|
If Mid(HTMLCODE,12,1)<>"0" Then
|
Response.Write "5"
|
Else
|
MessageContents="发起语音电话给"&OA_Name
|
If ServiceOrdID<>"" Then
|
sql="insert into ServiceOrd_Message (ServiceOrdIDDt,MessageContents,MessageOAid) values ("&ServiceOrdID&",'"&MessageContents&"',"&session("adminID")&")"
|
objConn.Execute sql
|
End If
|
Response.Write "1"
|
End If
|
%>
|