<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include file="JsonPost_1000006.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<%
|
OAid = trim(request("OAid"))
|
ID = trim(request("ID"))
|
is_callid = trim(request("is_callid"))
|
|
If OAid="" Or OAid="0" Then
|
Response.Write "2"
|
Response.End
|
End If
|
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
isOA=""
|
touser=""
|
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
|
ToOA_UserID = rs("OA_User_ID")
|
ToOA_weixinUserID = rs("OA_weixinUserID")
|
ToOA_Name = rs("OA_Name")
|
touser = touser&ToOA_weixinUserID&"|"
|
rs.movenext
|
loop
|
rs.close()
|
If touser="" Then
|
Response.Write "4"
|
Response.End
|
End If
|
touser=Mid(touser,1,Len(touser)-1)
|
'微信电话通知接口
|
If InStr(touser,"|")>0 Then touser=Replace(touser,"|",""",""")
|
appUrl="https://qyapi.weixin.qq.com/cgi-bin/pstncc/call?access_token="&access_token
|
args1="{"
|
args1=args1&"""callee_userid"":["""&touser&"""]"
|
args1=args1&"}"
|
|
'Response.End
|
HTMLCODE= PostBody(appUrl,args1)
|
|
If Mid(HTMLCODE,12,1)<>"0" Then
|
Call OA_Running("weixin_message_send|phone|"&touser&"|"&HTMLCODE)
|
Response.Write "6"
|
Response.End
|
ElseIf ID<>"" Then
|
If InStr(HTMLCODE,"callid"":""")>0 Then
|
HTMLCODE=Mid(HTMLCODE,InStr(HTMLCODE,"callid"":""")+9)
|
callid=Mid(HTMLCODE,1,InStr(HTMLCODE,"""")-1)
|
End If
|
sql="update ServiceOrd_Message set Phone_is=1,Phone_callid='"&callid&"' where MID="&ID
|
objConn.Execute sql
|
Response.Write "1"
|
ElseIf is_callid="1" Then
|
Response.Write appUrl&"<br>"&args1
|
Response.Write "<br>"&HTMLCODE
|
Else
|
Response.Write "1"
|
End If
|
|
%>
|