【调度系统】广东民航医疗快线调度系统源代码
hzj
2025-07-09 4418374d26a16ec759e06059c2b1fedabe1827e6
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<%
CONST BASE_64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Dim MapEnc(63)
Dim MapDec(127)
Dim i
For i=0 To 63
    MapEnc(i)=Mid(BASE_64_MAP,i+1,1)
Next
For i=0 To 63
    MapDec(Asc(MapEnc(i)))=i
Next
Set i=Nothing
Private Function DecToBin(intDecimal)
 Dim strBinary,blnFlag
 strBinary=""
 blnFlag=True
 Do While blnFlag
    strBinary=Cstr(intDecimal AND &H01)&strBinary
    intDecimal=intDecimal\2
    If intDecimal=0 Then blnFlag=False
 Loop
 Set blnFlag=Nothing
 strBinary=Right("00000000"&strBinary,8)
 DecToBin=strBinary
 Set strBinary=Nothing
End Function
Private Function BinToDec(strBin)
 Dim intDec,i,j
 intDec=0
 j=Len(strBin)
 For i=1 To j
     intDec=intDec+2^(j-i)*CInt(Mid(strBin,i,1))
 Next
 Set i=Nothing
 Set j=Nothing
 BinToDec=intDec
 Set intDec=Nothing
End Function
Private Function Bin24Encode(strBin24)
 Dim strEncoder,strBin6
 strEncoder=""
 If (Len(strBin24)<=8) Then
    strBin24=Left(strBin24&"00000000",8)
    strBin6="00"&Mid(strBin24,1,6)
    strEncoder=MapEnc(BinToDec(strBin6))
    strBin6="00"&Mid(strBin24,7,2)&"0000"
    strEncoder=strEncoder&MapEnc(BinToDec(strBin6))
    strEncoder=strEncoder&"=="
 Else If (Len(strBin24)<=16) Then
     strBin24=Left(strBin24&"00000000",16)
     strBin6="00"&Mid(strBin24,1,6)
     strEncoder=MapEnc(BinToDec(strBin6))
     strBin6="00"&Mid(strBin24,7,6)
     strEncoder=strEncoder&MapEnc(BinToDec(strBin6))
     strBin6="00"&Mid(strBin24,13,4)&"00"
     strEncoder=strEncoder&MapEnc(BinToDec(strBin6))
     strEncoder=strEncoder&"="
      Else
     strBin24=Left(strBin24&"00000000",24)
     strBin6="00"&Mid(strBin24,1,6)
     strEncoder=MapEnc(BinToDec(strBin6))
     strBin6="00"&Mid(strBin24,7,6)
     strEncoder=strEncoder&MapEnc(BinToDec(strBin6))
     strBin6="00"&Mid(strBin24,13,6)
     strEncoder=strEncoder&MapEnc(BinToDec(strBin6))
     strBin6="00"&Mid(strBin24,19,6)
     strEncoder=strEncoder&MapEnc(BinToDec(strBin6))
      End If
 End If
 Set strBin6=Nothing
 Bin24Encode=strEncoder
 Set strEncoder=Nothing
End Function
Private  Function HexToDec(strHex)
 Dim intDec,i,j
 j=Len(strHex)
 intDec=0
 For i=1 To j
   Select Case Mid(strHex,i,1)
    Case "0" intDec=intDex+16^(j-i)*0
    Case "1" intDec=intDex+16^(j-i)*1
    Case "2" intDec=intDex+16^(j-i)*2
    Case "3" intDec=intDex+16^(j-i)*3
    Case "4" intDec=intDex+16^(j-i)*4
    Case "5" intDec=intDex+16^(j-i)*5
    Case "6" intDec=intDex+16^(j-i)*6
    Case "7" intDec=intDex+16^(j-i)*7
    Case "8" intDec=intDex+16^(j-i)*8
    Case "9" intDec=intDex+16^(j-i)*9
    Case "A" intDec=intDex+16^(j-i)*10
    Case "B" intDec=intDex+16^(j-i)*11
    Case "C" intDec=intDex+16^(j-i)*12
    Case "D" intDec=intDex+16^(j-i)*13
    Case "E" intDec=intDex+16^(j-i)*14
    Case "F" intDec=intDex+16^(j-i)*15
  End Select
 Next
 Set i=Nothing
 HexToDec=intDec
 Set intDec=Nothing
End Function
Private Function HexToBin(strHex)
 Dim strBin,i,j
 j=Len(strHex)
 strBin=""
 For i=1 To j
  Select Case Mid(strHex,i,1)
    Case "0" strBin=strBin&"0000"
    Case "1" strBin=strBin&"0001"
    Case "2" strBin=strBin&"0010"
    Case "3" strBin=strBin&"0011"
    Case "4" strBin=strBin&"0100"
    Case "5" strBin=strBin&"0101"
    Case "6" strBin=strBin&"0110"
    Case "7" strBin=strBin&"0111"
    Case "8" strBin=strBin&"1000"
    Case "9" strBin=strBin&"1001"
    Case "A" strBin=strBin&"1010"
    Case "B" strBin=strBin&"1011"
    Case "C" strBin=strBin&"1100"
    Case "D" strBin=strBin&"1101"
    Case "E" strBin=strBin&"1110"
    Case "F" strBin=strBin&"1111"
  End Select
 Next
 Set i=Nothing
 Set j=Nothing
 HexToBin=strBin
 Set strBin=Nothing
End Function
Private Function BinToHex(strBin)
 Dim strHex,strBin4
 strHex=""
 Do While strBin<>""
   strBin4=Mid(strBin,1,4)
   If Len(strBin)>4 Then
      strBin=Mid(strBin,5,Len(strBin)-4)
   Else
      strBin=""
   End If
   Select Case strBin4
    Case "0000" strHex=strHex&"0"
    Case "0001" strHex=strHex&"1"
    Case "0010" strHex=strHex&"2"
    Case "0011" strHex=strHex&"3"
    Case "0100" strHex=strHex&"4"
    Case "0101" strHex=strHex&"5"
    Case "0110" strHex=strHex&"6"
    Case "0111" strHex=strHex&"7"
    Case "1000" strHex=strHex&"8"
    Case "1001" strHex=strHex&"9"
    Case "1010" strHex=strHex&"A"
    Case "1011" strHex=strHex&"B"
    Case "1100" strHex=strHex&"C"
    Case "1101" strHex=strHex&"D"
    Case "1110" strHex=strHex&"E"
    Case "1111" strHex=strHex&"F"
  End Select
 Loop
 Set strBin4=Nothing
 BinToHex=strHex
 Set strHex=Nothing
End Function
PUBLIC Function Encode(strText)
 Dim strTemp24,strBinarySource,strCode,intAsc,strHex,i,j
 strTemp24=""
 strBinarySource=""
 strCode=""
 j=Clng(Len(strText))
 For i=1 To j
     intAsc=Asc(Mid(strText,i,1))
     If intAsc>=0 AND intAsc<128 Then
    strBinarySource=strBinarySource&DecToBin(intAsc)
     Else
    strHex=CStr(Hex(intAsc))
    strHex=Right("0000"&strHex,4)
    strBinarySource=strBinarySource & HexToBin(strHex)
     End If
 Next
 Do While (strBinarySource<>"")
    If Clng(Len(strBinarySource))>=24 Then
    strTemp24=Mid(strBinarySource,1,24)
    strBinarySource=Mid(strBinarySource,25,Len(strBinarySource)-24)
    Else
    strTemp24=Mid(strBinarySource,1,Len(strBinarySource))
    strBinarySource=""
    End If
    strCode=strCode&Bin24Encode(strTemp24)
 Loop
 Set i=Nothing
 Set j=Nothing
 Set intAsc=Nothing
 Set strTemp24=Nothing
 Set strBinarySource=Nothing
 Set i=Nothing
 Encode=strCode
 Set strCode=Nothing
End Function
PUBLIC Function Decode(strCode)
 Dim i,j,strText,strBinarySource,strTemp8,intIndex
 j=Clng(Len(strCode))
 strText=""
 strBinarySource=""
 For i=1 To j
     intIndex=MapDec(Asc(Mid(strCode,i,1)))
     If Mid(strCode,i,1)<>"=" Then strBinarySource=strBinarySource&Right(DecToBin(intIndex),6)
 Next
 Do While (strBinarySource<>"")
    If Len(strBinarySource)>8 Then
       strTemp8=Mid(strBinarySource,1,8)
       strBinarySource=Mid(strBinarySource,9,Len(strBinarySource)-8)
    Else
       If Len(strBinarySource)=8 Then strTemp8=Mid(strBinarySource,1,8)
       strBinarySource=""
    End If
    If Mid(strTemp8,1,1)="0" Then
       strText=strText&Chr(BinToDec(strTemp8))
    Else
       If Len(strBinarySource)>8 Then
          strTemp8=strTemp8&Mid(strBinarySource,1,8)
          strBinarySource=Mid(strBinarySource,9,Len(strBinarySource)-8)
          strText=strText& Chr("&H"& BinToHex(strTemp8))
       Else
          If Len(strBinarySource)=8 Then
             strTemp8=strTemp8&Mid(strBinarySource,1,8)
             'response.write BinToHex(strTemp8)&"<br>"
             strText=strText& Chr("&H" & BinToHex(strTemp8))
          End If
          strBinarySource=""
       End If
    End If
 Loop
 Set strBinarySource=Nothing
 Set intIndex=Nothing
 Set i=Nothing
 Set j=Nothing
 Decode=strText
 Set strText=Nothing
End Function
%>