【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-04-28 1e955583470b47f7636eaba800c52c258ac24296
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
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include virtual="/inc/chkadmin.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
if isDepartment("0505")=0 then
  Response.Redirect "/"
  Response.End()
end If
 
searchTXT=SafeRequest(Request("searchTXT"))
 
Set rs = Server.CreateObject("ADODB.Recordset")
'默认显示字段
If OrdState="" Then OrdState=0
If OrdClassList="" Then OrdClassList="0"
If OrdClassList="0" Then
    OrdClassName="未审核"
ElseIf OrdClassList="1" Then
    OrdClassName="已审核"
Else
    OrdClassName="全部"
End if
 
'各种返回信息
SystemMessageType=trim(Request("SystemMessageType"))
SMT=trim(Request("SMT"))
if SystemMessageType<>"" then
  if SMT="1" then
    SystemMessageTXT="请选择需要操作的车辆"
  elseif SMT="2" then
    SystemMessageTXT="单据状态错误或重复提交"
  elseif SMT="3" then
    SystemMessageTXT="加油记录提交完成!!"
  elseif SMT="4" then
    SystemMessageTXT="请选择需要修改的加油记录!!"
  elseif SMT="5" then
    SystemMessageTXT="删除完成!!"
  elseif SMT="6" then
    SystemMessageTXT="请选择需要删除的加油记录!!"
  end if
end if
 
 
If OrdState<>"0" then
    OrdListName    = ServiceOrdStateA(OrdState)&"记录"
Else
    OrdListName    = "加油记录"
End If
 
 
OrdDateType=SafeRequest(Request("OrdDateType"))
OrdDateStart=SafeRequest(Request("OrdDateStart"))
OrdDateEnd=SafeRequest(Request("OrdDateEnd"))
If OrdDateType="" Then
  OrdDateType=4
  OrdDateTop=" top 20 "
End If
If OrdDateType="0" then
    If OrdDateStart="" And OrdDateEnd="" Then
        OrdDateStart=Date()
        OrdDateEnd=Date()&" 00:00"
    ElseIf OrdDateStart<>"" And OrdDateEnd="" Then
        OrdDateEnd=OrdDateStart
    ElseIf OrdDateStart="" And OrdDateEnd<>"" Then
        OrdDateStart=OrdDateEnd
    End If
    If Cdate(OrdDateStart)>Cdate(OrdDateEnd) Then
        OrdDateStart1=OrdDateStart
        OrdDateStart=OrdDateEnd
        OrdDateEnd=OrdDateStart1
    End if
    If OrdDateStart=OrdDateEnd Then
        OrdDateStart=FORMATDATETIME(OrdDateStart,vbShortDate)
        OrdDateTypeName=OrdDateStart
        OrdDateTypeName1=OrdDateTypeName
        OrdDateEnd=FORMATDATETIME(OrdDateEnd,vbShortDate)
    Else
        OrdDateTypeName=OrdDateStart&" 至 "&OrdDateEnd
        OrdDateTypeName1="时间段"
    End If
    SqlOrdDateType="between '"&OrdDateStart&"' and '"&OrdDateEnd&" 23:59:59'"
    
Else
    sql="select vID,vtext,vOrder2 from dictionary where vType>=1 and vtitle='OrdDateType' and vID="&OrdDateType
    rs.open Sql,objConn,1,1
    If not rs.Eof Then
        OrdDateTypeName    = rs("vtext")
        OrdDateTypeName1=OrdDateTypeName
        SqlOrdDateType    = rs("vOrder2")
    Else
        OrdDateType=4
        OrdDateTypeName="本月"
        OrdDateTypeName1=OrdDateTypeName
        SqlOrdDateType="between DATEADD(mm,DATEDIFF(mm,0,getdate()),0) and dateadd(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate())+1,0))"
    End If
    rs.close()
End If
'时间段列表
sql="select vID,vtext from dictionary where vType>=1 and vtitle='OrdDateType' order by vOrder"
rs.open Sql,objConn,1,1
do while not rs.Eof
    OrdDateTypes = OrdDateTypes & rs("vID") &","& rs("vtext") & "|"
rs.movenext
Loop
rs.close()
OrdDateTypes = left(OrdDateTypes,len(OrdDateTypes)-1)
OrdDateTypesPS = SPLIT(OrdDateTypes,"|")
 
 
page_URL="&searchTXT="&searchTXT&""
 
            TitleTXT=OrdListName
            response.buffer = true 
            response.addheader "content-disposition","attachment;filename="&TitleTXT&"导出"&DTimeID()&".csv;" 
            response.contenttype = "application/octet-stream" 
            Response.BinaryWrite ChrB(&HEF) & ChrB(&HBB) & ChrB(&HBF)
 
            acc1=request("page")
            if acc1=empty then acc1=clng(1)
            QuantityInt = 20
            acc2=0
            acc3=0
 
            if searchTXT<>"" Then
              searchSql=" and (CarLicense like '%"&searchTXT&"%' or GasStation like '%"&searchTXT&"%' or GasRemarks like '%"&searchTXT&"%') "
            else
              searchSql=""
            end If
 
            sql="select *,GasOldMileage=(select top 1 GasMileage from CarGas as b where a.GasCarID=b.GasCarID and a.GasDate>b.GasDate and b.GasState>=0 order by b.GasDate desc) from CarGas as a,CarData where CarID=GasCarID and GasState>=0 and GasDate "&SqlOrdDateType&searchSql&" order by id desc"
            'Response.Write sql
            rs.open sql,objConn,1,1
            if not rs.eof then
            rs.pagesize=QuantityInt
            rs.absolutepage=acc1
            acc2=rs.pagecount
            acc3=rs.recordcount
            else
            SystemMessageType=2
            SystemMessageTXT="数据库中相关无数据!"
            end If
            
            response.write "单据编号,加油日期,车牌,上次加油里程,当前里程,里程差值,加油量,单价,总额,类型,加油站,支付方式,备注,操作人" & vbcrlf
            i=1
            do while not rs.Eof
              CarGasID        = rs("id")                '加油记录号
              GasCarID        = rs("GasCarID")        '车辆ID
              GasDate        = rs("GasDate")            '加油时间
              CarLicense    = rs("CarLicense")        '车牌
              GasMileage    = rs("GasMileage")        '当前里程
              GasOldMileage    = rs("GasOldMileage")    '上次加油里程
              GasVolume        = rs("GasVolume")        '加油量
              GasPrice        = rs("GasPrice")        '单价
              GasSumPrice    = rs("GasSumPrice")        '总金额
              GasType        = rs("GasType")            '加油类型
              GasStation    = rs("GasStation")        '加油站
              GasPayment    = rs("GasPayment")        '支付方式
              GasRemarks    = rs("GasRemarks")        '备注
              
              OAID            = rs("OAID")
              OATime        = rs("OATime")
              GasState        = rs("GasState")
 
              GasRemarks = Replace(GasRemarks,CHR(10),"")
              GasRemarks = Replace(GasRemarks,CHR(13),"<BR>")
              If GasOldMileage<>"" Then 
                GasOldMileageTXT = GasOldMileage&"公里"
              Else
                GasOldMileageTXT = "--"
              End If
              If GasMileage<>"" Then 
                GasMileageTXT = GasMileage&"公里"
              Else
                GasMileageTXT = "--"
              End If
              If GasOldMileage<>"" And GasMileage<>"" Then
                GasMileageDiffTXT=(GasMileage-GasOldMileage)&"公里"
              Else
                GasMileageDiffTXT = "--"
              End If
              If GasVolume<>"0" Then 
                GasVolumeTXT = GasVolume&"升"
              Else
                GasVolumeTXT = "--"
              End If
              If GasPrice<>"0" Then 
                GasPriceTXT = GasPrice&"元"
              Else
                GasPriceTXT = "--"
              End If
              If GasSumPrice<>"0" Then 
                GasSumPriceTXT = GasSumPrice&"元"
              Else
                GasSumPriceTXT = "--"
              End If
              i=i+1
              
                response.write "CG"&Right("000000"&CarGasID,6) & ","
                response.write FORMATDATETIME(GasDate,vbShortDate) & ","
                response.write CarLicense & ","
                response.write GasOldMileageTXT & ","
                response.write GasMileageTXT & ","
                response.write GasMileageDiffTXT & ","
                response.write GasVolumeTXT & ","
                response.write GasPriceTXT & ","
                response.write GasSumPriceTXT & ","
                response.write GasType & ","
                response.write GasStation & ","
                response.write GasPayment & ","
                response.write GasRemarks & ","
                response.write OAUser(OAID,"UserName") & ","
                response.write(vbcrlf)
            rs.movenext
            loop
            rs.close()
%>