📄 equipdetails.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK" import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*,java.sql.*,java.io.*"%><% request.setCharacterEncoding("GBK"); session=request.getSession(); userStruct user=(userStruct)session.getAttribute("user"); if(user==null){ response.sendRedirect("../../login.html"); } else if(user.userAccess.intValue()==0||user.userAccess.intValue()==1) response.sendRedirect("../../error/access.html"); else if((user.userAccess.intValue()==12)||(user.userAccess.intValue() == 9)){%><%String deviceid=request.getParameter("deviceid");System.out.println("deviceid1="+deviceid);EquipmentJBean eqj = new EquipmentJBean();EquipmentDetailsStruct eqd = new EquipmentDetailsStruct();malfunctionreportStruct mfs = null;MaintenanceStruct mas = null;Collection mfc = new ArrayList();Collection ccc = new ArrayList();Collection mac = new ArrayList(); Context ctx=new InitialContext(); Object ref=ctx.lookup("EquipmentControllerEJB"); EquipmentControllerEJBHome eqHome=(EquipmentControllerEJBHome) PortableRemoteObject.narrow(ref,EquipmentControllerEJBHome.class); EquipmentControllerEJB eqController = eqHome.create(); eqj = eqController.getEquipmentByDeviceid(deviceid); eqd = eqController.getEqdetailsByDeviceid(deviceid); mfc = eqController.getMalByDeviceid(eqj.getDeviceid()); ccc = eqController.getCircsByDeviceId(eqj.getDeviceid()); mac = eqController.getMainByDeviceid(eqj.getDeviceid());Context psctx=new InitialContext();Object psref=psctx.lookup("OfficeUnitController");OfficeUnitControllerHome officeUnitControllerHome=(OfficeUnitControllerHome) PortableRemoteObject.narrow(psref,OfficeUnitControllerHome.class);;OfficeUnitController officeUnitController=officeUnitControllerHome.create();Collection ousc=new ArrayList();officeUnitStruct ous = new officeUnitStruct();Iterator ousi;Collection officec = new ArrayList();officec = officeUnitController.getUnitid(eqj.getUnitid());ousi = officec.iterator();String uname="";if(ousi.hasNext()){officeUnitStruct offices = new officeUnitStruct();offices=(officeUnitStruct)ousi.next();uname=offices.processname;System.out.println("uname="+uname);}%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>MSA Office</TITLE> <META http-equiv=Content-Type content="text/html; charset=gb_2312-80"> <META content="Microsoft FrontPage 4.0" name=GENERATOR> <link rel="stylesheet" href="../../css/msa.css" type="text/css"> <script language="JavaScript" src="../../public/js/cehui_menu.js"></script> <SCRIPT> window.onload=init </SCRIPT> </STYLE> </HEAD> <BODY class="bg" topMargin=20 leftmargin="0" marginwidth="0" marginheight="0"> <DIV align=center> <form name="form1" method="post" action="" > <TABLE class=outter cellSpacing=0 cellPadding=0 width=500 border=0> <TR> <TD><IMG height=4 src="../../MacOS/lefttop.gif" width=6></TD> <TD background=../../MacOS/top.gif colSpan=3><IMG height=4 src="../../MacOS/top.gif" width=1></TD> <TD><IMG height=4 src="../../MacOS/righttop.gif"></TD> </TR> <TR> <TD vAlign=top background=../../MacOS/lwing.gif rowSpan=3><IMG height=18 src="../../MacOS/left.gif" width=6></TD> <TD vAlign=top background=../../MacOS/titlebg.gif width="16"> <DIV><img src="../../MacOS/logo.gif" width="16" height="16" border="0" ></DIV> </TD> <TD vAlign=top noWrap align=center width="100%" background=../../MacOS/titlebg.gif><SPAN style="BACKGROUND-COLOR: #cecece"><FONT class=strong> MSA - OFFICE </font></SPAN></TD> <TD><IMG height=18 src="../../MacOS/right_b2.gif" width=18 border="0" ></TD> <TD vAlign=top background=../../MacOS/rwing.gif rowSpan=3><IMG height=18 src="../../MacOS/right.gif" width=7></TD> </TR> <TR> <TD background=../../MacOS/hr.gif colSpan=3><IMG height=2 src="../../MacOS/hr.gif" width=1></TD> </TR> <TR> <TD colSpan=3 align="center"><br> <table width="500" border="1" cellspacing="1" bordercolor="#666666"> <tr bgcolor="#FAFAFA"> <td> <table width="500" border="0" cellspacing="0" cellpadding="2"> <tr bgcolor="#fafafa"> <td colspan="3">设备管理>> 设备详细信息</td> </tr> </table> <table class=title width="500" border="0" cellspacing="1" cellpadding="2"> <tr bgcolor="#fafafa"> <td width="30%"> <font class="strong" > 设备类型:</font> <% String devtype="";if(eqd.getType()!=null){ if(eqd.getType().intValue()==1) devtype="VTS备件"; if(eqd.getType().intValue()==2) devtype="航标设备及备件"; if(eqd.getType().intValue()==3) devtype="AIS系统及备件"; if(eqd.getType().intValue()==4) devtype="测绘设备及备件"; if(eqd.getType().intValue()==5) devtype="其他";} %> <%=devtype%></td> <td > <font class="strong"> 设备名称:</font> <%=eqd.getName()%></td> <td > <font class="strong"> 设备型号:</font> <%=eqd.getModel()%> </td> </tr> <tr bgcolor="#e0e0e0"> <td ><font class="strong"> 生产厂商:</font> <% String a=""; if(eqd.getCompany()!=null) a=eqd.getCompany(); %> <%=a%></td> <td ><font class="strong"> 引进日期:</font><%a=""; if(eqd.getIntime()!=null) a=eqd.getIntime().toString();%> <%=a%> </td> <td ><font class="strong"> 合同编号:</font> <%=eqj.getContractid()%></td> </tr> <tr bgcolor="#fafafa"> <td > <font class="strong"> 性能参数:</font><%a="";if(eqd.getParameter()!=null) a=eqd.getParameter();%> <%=a%> </td> <td ><font class="strong"> 所属单位:</font> <%=uname%> </td> <td ><font class="strong"> 验收日期:</font><%a="";if(eqd.getChecktime()!=null) a=eqd.getChecktime().toString();%> <%=a%> </td> </tr> <tr bgcolor="#e0e0e0"> <td colspan=3> <font class="strong"> 设备机号:</font><%a="";if(eqd.devicesn!=null) a=eqd.devicesn;%> <%=a%></td> </tr> <tr bgcolor="#e0e0e0"> <td><font class="strong"> 使用汇总:</font></td> <td><font class="strong"> 日常维护记录:</font></td> <td><font class="strong"> 重大故障记录:</font></td> </tr> <tr bgcolor="#e0e0e0"> <td><textarea cols="40" rows="10" readonly><%System.out.println("123");Iterator ccci = ccc.iterator(); System.out.println("124"); circscollectionStruct ccs = new circscollectionStruct(); System.out.println("1255"); while(ccci.hasNext()) { ccs = (circscollectionStruct)ccci.next(); ousc = officeUnitController.getUnitid(ccs.unitid); ousi = ousc.iterator(); String unitname=""; System.out.println("uname="+1); if(ousi.hasNext()) { ous=(officeUnitStruct)ousi.next(); unitname=ous.processname; } %>安装地点:<%=ccs.address%> 安装时间:<%=ccs.installtime.toString()%>填表人单位:<%=unitname%> 填表人:<%=ccs.person%>填表时间:<%=ccs.time.toString()%>使用情况:<%=ccs.usething%>------------------------------------- <% }%> </textarea></td> <td><textarea cols="40" rows="10" readonly><%Iterator maci = mac.iterator();System.out.println("1256"); while(maci.hasNext()) { mas = new MaintenanceStruct();mas = (MaintenanceStruct)maci.next(); ousc = officeUnitController.getUnitid(mas.unitid); ousi = ousc.iterator(); String unitname=""; if(ousi.hasNext()) { ous=(officeUnitStruct)ousi.next(); unitname=ous.processname; } %> <%String pa=""; if(mas.type.intValue()==1) pa="安装"; if(mas.type.intValue()==2) pa="保养"; if(mas.type.intValue()==3) pa="维修"; if(mas.type.intValue()==4) pa="报废"; if(mas.type.intValue()==5) pa="其他";%>维护类型:<%=pa%> 维护日期:<%=mas.timeM.toString()%>维护人单位:<%=unitname%> 维护人:<%=mas.personM%><%pa="";if(mas.feeM!=null) pa=mas.feeM.toString();%>维护费用:<%=pa%>处理情况:<%=mas.maintenance%><%pa="";if(mas.malfunc!=null) pa=mas.malfunc;%>故障情况:<%=pa%><%pa="";if(mas.reason!=null) pa=mas.reason;%>故障原因:<%=pa%>----------------------------------------- <% }%></textarea></td> <td><textarea cols="40" rows="10" readonly><%System.out.println("1257");Iterator mfci = mfc.iterator(); while(mfci.hasNext()) { mfs = new malfunctionreportStruct();mfs = (malfunctionreportStruct)mfci.next(); ousc = officeUnitController.getUnitid(mfs.unitid); ousi = ousc.iterator(); String unitname=""; if(ousi.hasNext()) { ous=(officeUnitStruct)ousi.next(); unitname=ous.processname; } System.out.println("1258"); %> <%String mfsa=""; if(mfs.installtime!=null) mfsa=mfs.installtime.toString();%>安装日期:<%=mfsa%> <%mfsa="";if(mfs.firsttime!=null) mfsa=mfs.firsttime.toString();%>发现故障日期:<%=mfsa%><%mfsa="";if(mfs.address!=null) mfsa=mfs.address;%>故障地点:<%=mfsa%>记录人单位:<%=unitname%> 记录人:<%=mfs.person%><%mfsa="";if(mfs.malreason!=null) mfsa = mfs.malreason;%>故障原因:<%=mfsa%><%mfsa="";if(mfs.malcontent!=null) mfsa = mfs.malcontent;%>故障情况:<%=mfsa%><%mfsa="";if(mfs.malduty!=null) mfsa = mfs.malduty;%>处理情况:<%=mfsa%>----------------------------------------- <% }System.out.println("1259");%></textarea></td> </tr><tr bgcolor="#fafafa"><td colspan="5"><font class="strong"><%=eqd.getName()%></font>设备数量的统计:</td></tr><% Context ctxh=new InitialContext(); Object refh=ctxh.lookup("HandtakeController"); HandtakeControllerHome handtakeControllerHome=(HandtakeControllerHome) PortableRemoteObject.narrow(refh,HandtakeControllerHome.class); HandtakeController hController = handtakeControllerHome.create();Integer hbzid=eqd.getUnitid();String hbzname=uname;System.out.println("1230");officec = new ArrayList();ous = new officeUnitStruct();officec = officeUnitController.getUnitid(eqj.getUnitid());ousi = officec.iterator();if(ousi.hasNext()) { ous = (officeUnitStruct)ousi.next();}Integer wxid = ous.unitid;System.out.println("wxid="+wxid+"hbzid="+hbzid);String hqname = ous.processname;Integer buid=new Integer(1);String buname="部海事局";int hbzzong = 0;int hbzb = 0;int hbzs = 0;int hbzw = 0;int hbzd = 0;int hbzy = 0;int hbczong = 0;int hbcb = 0;int hbcs = 0;int hbcw = 0;int hbcd = 0;int hbcy = 0;int hqzong = 0;int hqb = 0;int hqs = 0;int hqw = 0;int hqd = 0;int hqy = 0;int buzong = 0;int bub = 0;int bus = 0;int buw = 0;int bud = 0;int buy = 0;if(user.unitid.intValue()==wxid.intValue())
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -