【调度系统】广东民航医疗快线调度系统源代码
wlzboy
2025-08-14 b3f8789cf8bf0d934f8431b1d7b564a756576b4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>  
<!--#include file="JsonPost_1000006.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
OAid        = trim(request("OAid"))
callid        = trim(request("callid"))
 
If OAid="" Or OAid="0" Or callid="" Then
    Response.Write "2"
    Response.End
End If
 
Set rs = Server.CreateObject("ADODB.Recordset")
isOA=""
touser=""
OAidSP    = SPLIT(OAid,"|")
callidSP    = SPLIT(callid,"|")
for i=0 to ubound(OAidSP) 
    
    OAid=OAidSP(i)
    callid=callidSP(i)
    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
    if not rs.Eof Then
        ToOA_UserID        = rs("OA_User_ID")
        ToOA_weixinUserID    = rs("OA_weixinUserID")
        ToOA_Name            = rs("OA_Name")
        touser            = ToOA_weixinUserID
    rs.movenext
    End If
    rs.close()
    If touser="" Then
        Response.Write "4"
        Response.End
    End If
    '微信电话通知接口
    appUrl="https://qyapi.weixin.qq.com/cgi-bin/pstncc/getstates?access_token="&access_token
    args1="{"
        args1=args1&"""callee_userid"":"""&touser&""","
        args1=args1&"""callid"":"""&callid&""""
    args1=args1&"}"
    'Response.Write appUrl&"<br>"&args1
    'Response.End
    HTMLCODE= PostBody(appUrl,args1)
    'Response.Write HTMLCODE&"<br>"
    If Mid(HTMLCODE,12,1)<>"0" Then
        'Call OA_Running("weixin_message_send|phone|"&touser&"|"&HTMLCODE)
        Response.Write "6"
        Response.End
    Else
        HTMLCODE=Mid(HTMLCODE,InStr(HTMLCODE,"istalked"":")+10)
        istalked=Mid(HTMLCODE,1,1)    '0.表示未接听,1.表示接听
        HTMLCODE=Mid(HTMLCODE,InStr(HTMLCODE,"reason"":")+8)
        reason=Mid(HTMLCODE,1,InStr(HTMLCODE,"}")-1)    '0:接听,3:通话中,4:呼叫超时 – 用户挂机,5:不在服务区,6:欠费未接听,7:被叫拒接,8:被叫关机,9: 空号,10: 停机,11: 线路错误,12: 呼叫超时 – 系统挂机,13: 呼叫超过限制(24小时8次),99: 其他
        If reason="0" Then reason=2
        sql="update ServiceOrd_Message set Phone_is="&reason&" where Phone_callid='"&callid&"'"
        objConn.Execute sql
    End If
Next
Response.Write "1"
'Response.Write "1"
%>