【调度系统】广东民航医疗快线调度系统源代码
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %> 
<% Session.CodePage=65001 %> 
<% Response.charset = "utf-8" %>
<!--#include virtual="/weixin/OAuth2.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
'腾讯地图
lbs_key="KDJBZ-45QW2-I36UJ-CB53K-OUFE5-DJBQ5"
 
'百度地图
'ak="lA7jbMtGXprDlUfbvAGNRuXm4phHhk7b" 'vicgame
ak="rGQBbHKGjAtVQy23OckafQkC6nNlaGmi" 'vicgame_NS1
 
FromLatLng=trim(Request("FromLatLng"))
WaypointsLatLng=trim(Request("WaypointsLatLng"))
ToLatLng=trim(Request("ToLatLng"))
 
If FromLatLng<>"" And ToLatLng<>"" And 1=2 then    '腾讯地图
    appUrl    = "https://apis.map.qq.com/ws/direction/v1/driving/"
    args1    = "from="&FromLatLng&"&to="&ToLatLng&"&key="&lbs_key
    If WaypointsLatLng<>"" Then
        args1    = args1&"&waypoints="&WaypointsLatLng
    End If
    'Response.Write appUrl&"?"&args1 &"<br><br>"
    'Response.End
    HTMLCODE= GetBody(appUrl,args1)
    'Response.Write HTMLCODE &"<br><br>"
    'Response.End
 
    str="["&HTMLCODE&"]"
    set obj = getjson(str)
    status    = obj.get(0).status
    lbs_from=""
    lbs_from_j=""
    webJson=""
    Dim FormArray()
    REDIM FormArray(10,10)
    '表头
    If status=0 then
        distance = obj.get(0).result.routes.get(0).distance    '方案总距离
        duration = obj.get(0).result.routes.get(0).duration    '方案估算时间(含路况)
        'Response.Write distance&","&duration &"<br><br>"
        'Response.End
        'webJson="{""method"":""StoreDistance"",""result"":1,""to_lat"":"""&to_lat&""",""to_lng"":"""&to_lng&"""}"
        webJson=distance&"|"&duration
    Else
        webJson=0
    End If
 
ElseIf FromLatLng<>"" And ToLatLng<>"" then    '百度地图
    appUrl    = "https://api.map.baidu.com/directionlite/v1/driving"
    args1    = "origin="&FromLatLng&"&destination="&ToLatLng&"&ak="&ak
    If WaypointsLatLng<>"" Then
        args1    = args1&"&waypoints="&Replace(WaypointsLatLng,";","|")
    End If
    'Response.Write appUrl&"?"&args1 &"<br><br>"
    'Response.End
    HTMLCODE= GetBody(appUrl,args1)
    'Response.Write HTMLCODE &"<br><br>"
    'Response.End
 
    str="["&HTMLCODE&"]"
    set obj = getjson(str)
    status    = obj.get(0).status
    lbs_from=""
    lbs_from_j=""
    webJson=""
    '表头
    If status=0 then
        distance = obj.get(0).result.routes.get(0).distance    '方案总距离
        duration = obj.get(0).result.routes.get(0).duration    '方案估算时间(含路况)
        'Response.Write distance&","&duration &"<br><br>"
        'Response.End
        'webJson="{""method"":""StoreDistance"",""result"":1,""to_lat"":"""&to_lat&""",""to_lng"":"""&to_lng&"""}"
        webJson=distance&"|"&duration
    Else
        webJson=0
    End If
 
Else
    webJson=0
End If
'Response.End
 
Response.Write webJson
%>