📄 main2.asp
字号:
eqwillfixcount4=cstr(cint(eqwillfixcount4)+rs4(0))
rs4.movenext
loop
set rs4=nothing
set rs5 = server.createobject("adodb.recordset")
sql5="select count(*) from mfh_equipment "&condition&" and skcondition='待修'"
rs5.open sql5,conn, 1,1
eqwillfixcount5="0"
do while not (rs5.eof or rs5.bof)
eqwillfixcount5=cstr(cint(eqwillfixcount5)+rs5(0))
rs5.movenext
loop
set rs5=nothing
eqwillfixcount=cstr(cint(eqwillfixcount1)+cint(eqwillfixcount2)+cint(eqwillfixcount3)+cint(eqwillfixcount4)+cint(eqwillfixcount5))
else
'选择此大型装备来自哪个表,并选择改大型装备的待修数
tableid=left(request("eqname"),1)
if tableid="1" then
sql = "select count(*) from mtk_equipment "&condition&" and equipname='"&eqname&"' and wellornot='待修'"
else if tableid="2" then
sql = "select count(*) from mca_equipment "&condition&" and equipname='"&eqname&"' and style='待修'"
else if tableid="3" then
sql = "select count(*) from mvo_equipment "&condition&" and equipname='"&eqname&"' and style='待修'"
else if tableid="4" then
sql = "select count(*) from men_vehicle "&condition&" and enname='"&eqname&"' and skillcondition='待修'"
else if tableid="5" then
sql = "select count(*) from mfh_equipment "&condition&" and equipname='"&eqname&"' and skcondition='待修'"
end if
end if
end if
end if
end if
'response.Write(sql)
set rs = server.createobject("adodb.recordset")
rs.open sql,conn, 1,1
eqwillfixcount="0"
do while not (rs.eof or rs.bof)
'response.Write(rs(0))
'response.Write("<br>")
eqwillfixcount=cstr(cint(eqwillfixcount)+cint(rs(0)))
rs.movenext
loop
set rs=nothing
end if
%>
<%
'获得大型装备的配套数
if (eqname="" or eqname="择大型装备名称")then
set rs1 = server.createobject("adodb.recordset")
sql1="select count(*) from mtk_equipment "&condition&" and fixornot='是'"
rs1.open sql1,conn, 1,1
eqmatchcount1="0"
do while not (rs1.eof or rs1.bof)
eqmatchcount1=cstr(cint(eqmatchcount1)+rs1(0))
rs1.movenext
loop
set rs1=nothing
set rs2 = server.createobject("adodb.recordset")
sql2="select count(*) from mca_equipment "&condition&" and fixornot='是'"
rs2.open sql2,conn, 1,1
eqmatchcount2="0"
do while not (rs2.eof or rs2.bof)
eqmatchcount2=cstr(cint(eqmatchcount2)+rs2(0))
rs2.movenext
loop
set rs2=nothing
set rs3 = server.createobject("adodb.recordset")
sql3="select count(*) from mvo_equipment "&condition&" and fixornot='是'"
rs3.open sql3,conn, 1,1
eqmatchcount3="0"
do while not (rs3.eof or rs3.bof)
eqmatchcount3=cstr(cint(eqmatchcount3)+rs3(0))
rs3.movenext
loop
set rs3=nothing
set rs4 = server.createobject("adodb.recordset")
sql4="select count(*) from men_vehicle "&condition&" and isfix='是'"
rs4.open sql4,conn, 1,1
eqmatchcount4="0"
do while not (rs4.eof or rs4.bof)
eqmatchcount4=cstr(cint(eqmatchcount4)+rs4(0))
rs4.movenext
loop
set rs4=nothing
set rs5 = server.createobject("adodb.recordset")
sql5="select count(*) from mfh_equipment "&condition&" and aisfix='是'"
rs5.open sql5,conn, 1,1
eqmatchcount5="0"
do while not (rs5.eof or rs5.bof)
eqmatchcount5=cstr(cint(eqmatchcount5)+rs5(0))
rs5.movenext
loop
set rs5=nothing
eqmatchcount=cstr(cint(eqmatchcount1)+cint(eqmatchcount2)+cint(eqmatchcount3)+cint(eqmatchcount4)+cint(eqmatchcount5))
else
'选择此大型装备来自哪个表,并选择改大型装备的待修数
tableid=left(request("eqname"),1)
if tableid="1" then
sql = "select count(*) from mtk_equipment "&condition&" and equipname='"&eqname&"' and fixornot='是'"
else if tableid="2" then
sql = "select count(*) from mca_equipment "&condition&" and equipname='"&eqname&"' and fixornot='是'"
else if tableid="3" then
sql = "select count(*) from mvo_equipment "&condition&" and equipname='"&eqname&"' and fixornot='是'"
else if tableid="4" then
sql = "select count(*) from men_vehicle "&condition&" and enname='"&eqname&"' and isfix='是'"
else if tableid="5" then
sql = "select count(*) from mfh_equipment "&condition&" and equipname='"&eqname&"' and aisfix='是'"
end if
end if
end if
end if
end if
'response.Write(sql)
set rs = server.createobject("adodb.recordset")
rs.open sql,conn, 1,1
eqmatchcount="0"
do while not (rs.eof or rs.bof)
eqmatchcount=cstr(cint(eqmatchcount)+cint(rs(0)))
rs.movenext
loop
set rs=nothing
end if
%>
<%
'求得大型装备的编配率=配套数/编制数
if eqauthorized="0" then
eqmarate=0
else
eqmarate=clng(eqmatchcount)/clng(eqauthorized)
end if
%>
<%
'求得大型装备的完好率=完好数/现有数
if eqnowcount="0" then
eqwellrate=0
else
eqwellrate=clng(eqwellcount)/clng(eqnowcount)
end if
%>
<%
'求得大型装备的配套率=配套数/现有数
if eqnowcount="0" then
eqmatchrate=0
else
eqmatchrate=clng(eqmatchcount)/clng(eqnowcount)
end if
%>
<td width="88" height="22" align="center" valign="middle"><%=eqauthorized%></td>
<td width="80" height="22" align="center"><%=eqnowcount%></td>
<td width="80" height="22" align="center"><%=eqwellcount%></td>
<td width="65" height="22">
<div align="center"><%=eqfixcount%></div></td>
<td width="58" height="22">
<div align="center"><%=eqwillfixcount%></div></td>
<td width="55" height="22">
<div align="center"><%=eqmatchcount%></div></td>
<td width="65" height="22">
<div align="center"><%=FormatNumber(eqmarate*100,1)%>%</div></td>
<td width="65" height="22">
<div align="center"><%=FormatNumber(eqwellrate*100,1)%>%</div></td>
<td width="73" height="22">
<div align="center"><%=FormatNumber(eqmatchrate*100,1)%>%</div></td>
<td height="22" colspan="3">
<div align="center">
<table width="153" height="26" border="0">
<tr>
<td width="143" background="images/backbon1.gif">
<div align="center"><a href="../inquire/equipquery.asp">大型装备查询</a></div></td>
</tr>
</table>
</div></td>
</tr>
<tr bgcolor="#567D30">
<td width="133" height="20" align="center">
<div align="center">
<select name="vcname" onChange="javascript:document.form1.submit();" style="background:#efebef;border-style:solid;border-width:1px;border-color:#efebef">
<option value="选择修理设备名称" >选择修理设备名称</option>
<%
'选择修理设备的名称
set rs = server.createobject("adodb.recordset")
sql = "select distinct vcname from mvc_vehicle "&condition
rs.open sql,conn, 1,1
do while not (rs.eof or rs.bof)
%>
<option value="<%=rs("vcname")%>" <% if trim(rs("vcname"))=trim(request("vcname")) then %> selected <%end if%>><%=rs("vcname")%></option>
<%
rs.movenext
loop
set rs=nothing
%>
</select>
</div></td>
<%
'得到提交过来的修理设备名称
vcname=request("vcname")
%>
<%
'获得修理设备的编制数
set rs = server.createobject("adodb.recordset")
if vcname="" or vcname="选择修理设备名称" then
sql = "select authorized from mvc_authorized "&condition
else
sql = "select authorized from mvc_authorized "&condition&" and vcname='"&vcname&"'"
end if
rs.open sql,conn, 1,1
vcauthorized="0"
do while not (rs.eof or rs.bof)
vcauthorized=cstr(cint(vcauthorized)+cint(rs("authorized")))
rs.movenext
loop
set rs=nothing
%>
<%
'获得修理设备的现有数
set rs = server.createobject("adodb.recordset")
if vcname="" or vcname="选择修理设备名称" then
sql = "select count(*) from mvc_vehicle "&condition
else
sql = "select count(*) from mvc_vehicle "&condition&" and vcname='"&vcname&"'"
end if
rs.open sql,conn, 1,1
vcnowcount="0"
if not (rs.eof or rs.bof) then
vcnowcount=rs(0)
end if
'response.Write(vcnowcount)
set rs=nothing
%>
<%
'获得修理设备的完好数
set rs = server.createobject("adodb.recordset")
if vcname="" or vcname="选择修理设备名称" then
sql = "select count(*) from mvc_vehicle "&condition&" and isnormal='完好'"
else
sql = "select count(*) from mvc_vehicle "&condition&" and vcname='"&vcname&"' and isnormal='完好'"
end if
'response.Write(sql)
rs.open sql,conn, 1,1
vcwellcount="0"
if not (rs.eof or rs.bof) then
vcwellcount=rs(0)
end if
'response.Write(vcnowcount)
set rs=nothing
%>
<%
'获得修理设备的在修数
set rs = server.createobject("adodb.recordset")
if vcname="" or vcname="选择修理设备名称" then
sql = "select count(*) from mvc_vehicle "&condition&" and isnormal='在修'"
else
sql = "select count(*) from mvc_vehicle "&condition&" and vcname='"&vcname&"' and isnormal='在修'"
end if
'response.Write(sql)
rs.open sql,conn, 1,1
vcfixcount="0"
if not (rs.eof or rs.bof) then
vcfixcount=rs(0)
end if
'response.Write(vcnowcount)
set rs=nothing
%>
<%
'获得修理设备的待修数
set rs = server.createobject("adodb.recordset")
if vcname="" or vcname="选择修理设备名称" then
sql = "select count(*) from mvc_vehicle "&condition&" and isnormal='待修'"
else
sql = "select count(*) from mvc_vehicle "&condition&" and vcname='"&vcname&"' and isnormal='待修'"
end if
'response.Write(sql)
rs.open sql,conn, 1,1
vcwellfixcount="0"
if not (rs.eof or rs.bof) then
vcwillfixcount=rs(0)
end if
'response.Write(vcnowcount)
set rs=nothing
%>
<%
'获得修理设备的配套数
set rs = server.createobject("adodb.recordset")
if vcname="" or vcname="选择修理设备名称" then
sql = "select count(*) from mvc_vehicle "&condition&" and isfix='是'"
else
sql = "select count(*) from mvc_vehicle "&condition&" and vcname='"&vcname&"' and isfix='是'"
end if
'response.Write(sql)
rs.open sql,conn, 1,1
vcmatchcount="0"
if not (rs.eof or rs.bof) then
vcmatchcount=rs(0)
end if
'response.Write(vcnowcount)
set rs=nothing
%>
<%
'求得修理设备的编配率=配套数/编制数
if vcauthorized="0" then
vcmarate=0
else
vcmarate=clng(vcmatchcount)/clng(vcauthorized)
end if
%>
<%
'求得修理设备的完好率=完好数/现有数
if vcnowcount="0" then
vcwellrate=0
else
vcwellrate=clng(vcwellcount)/clng(vcnowcount)
end if
%>
<%
'求得修理设备的配套率=配套数/现有数
if vcnowcount="0" then
vcmatchrate=0
else
vcmatchrate=clng(vcmatchcount)/clng(vcnowcount)
end if
%>
<td width="88" height="20" align="center" valign="middle">
<div align="center"><%=vcauthorized%></div></td>
<td width="80" height="20" align="center"><%=vcnowcount%></td>
<td width="80" height="20" align="center"><%=vcwellcount%></td>
<td width="65" height="20">
<div align="center"><%=vcfixcount%></div></td>
<td width="58" height="20">
<div align="center"><%=vcwillfixcount%></div></td>
<td width="55" height="20"><div align="center"><%=vcmatchcount%></div></td>
<td width="65" height="20">
<div align="center">%<%=FormatNumber(vcmarate*100,1)%></div></td>
<td width="65" height="20">
<div align="center"><%=FormatNumber(vcwellrate*100,1)%>%</div></td>
<td width="73" height="20"><div align="center"><%=FormatNumber(vcmatchrate*100,1)%>%</div></td>
<td height="20" colspan="3">
<div align="center">
<table width="153" height="26" border="0">
<tr>
<td width="147" height="22" background="images/backbon1.gif">
<div align="center"><a href="../inquire/vc.asp">修理设备查询</a></div></td>
</tr>
</table>
</div></td>
</tr>
<tr bgcolor="#567D30">
<td width="30" rowspan="4" align="center">装备<br>
动用<br>
使用</td>
<td width="133" height="20" align="center">
<div align="center">类别内容项目</div></td>
<td width="88" height="20" align="center" valign="middle">
<div align="center">装备号码
</div></td>
<td width="80" height="20" align="center">
<p>出库(场)时间</p></td>
<td width="80" height="20" align="center">入库(场)时间</td>
<td width="65" height="20">
<div align="center">负责人</div></td>
<td width="58" height="20">
<div align="center">批准人</div></td>
<td height="20" colspan="2">
<div align="center"></div>
<div align="center">任务</div></td>
<td width="65" height="20">
<div align="center"> 技术状况</div></td>
<td width="73" height="20">
<div align="center"> 配套情况</div></td>
<td width="73" height="20">
<div align="center">弹药消耗数、小时、公里</div></td>
<td width="73" height="20">
<div align="center"> 备注</div></td>
<td height="20">
<div align="center">提交</div></td>
</tr>
<tr bgcolor="#56
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -