📄 hbz_uped.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK" import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*"%><% request.setCharacterEncoding("GBK"); session=request.getSession(); userStruct user=(userStruct)session.getAttribute("user"); if(user==null){ response.sendRedirect("../../login.html"); }else{%><%session=request.getSession();Collection collect = (Collection)session.getAttribute("hbzcollect");Collection collect_d = (Collection)session.getAttribute("hbzcollect_d");Integer unitid = new Integer(request.getParameter("unitid"));Integer planyear = new Integer(request.getParameter("planyear"));Context ctx=new InitialContext();Object ref=ctx.lookup("SchemeplanController");SchemeplanControllerHome schemeplanControllerHome=(SchemeplanControllerHome) PortableRemoteObject.narrow(ref,SchemeplanControllerHome.class);;SchemeplanController schemeplanController=schemeplanControllerHome.create();Iterator i = collect.iterator();while(i.hasNext()){SchemeplanStruct sps = (SchemeplanStruct)i.next();sps.upstatus = new Integer(1);schemeplanController.editPlan(sps.planid,sps);}Vector d_name = new Vector(); i = collect_d.iterator(); while(i.hasNext()) { PlandetailsStruct pds = (PlandetailsStruct)i.next(); d_name.addElement(pds.devicename); } for(int l=0;l<d_name.size()-1;l++) for(int k=l+1;k<d_name.size();k++) { if(d_name.elementAt(l).equals(d_name.elementAt(k))) { d_name.remove(k); k--; } } int rows = d_name.size();//session.setAttribute("hbzcollect_d",collect_d);//session.setAttribute("hbzcollect",collect); 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(); ousc = officeUnitController.getUnitid(unitid); Iterator ousi = ousc.iterator(); officeUnitStruct ous = new officeUnitStruct(); ous = (officeUnitStruct)ousi.next(); String unitname = ous.processname;%><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=gb_2312-80"><link rel="stylesheet" href="../../css/stii.css" type="text/css"></HEAD><BODY><form name="myform" method="post" action=""><table width=600 class=title cellspacing=0 cellpadding=0 border=1 align=center ><caption align=right><%=unitname%><%=planyear%>年度上报统计表 <font style="font-size:12px">单位:万元(人民币)</font></caption><tr align=middle><td width=25%>设备名称<td width=30%>设备规格/型号<td width=20%>申请数量<td width=25%>设备总价</tr><%for(int j=0;j<rows;j++){Collection temp = new ArrayList();String devname = d_name.elementAt(j).toString();String devmodel = "";int appamount = 0;double appmoney = 0;Iterator ii = collect_d.iterator();while(ii.hasNext()){PlandetailsStruct pds = (PlandetailsStruct)ii.next();if(pds.devicename.equals(devname)){devmodel = pds.devicemodel;temp.add(pds);}}Iterator di = temp.iterator();while(di.hasNext()){PlandetailsStruct pds = (PlandetailsStruct)di.next();appamount = appamount+pds.appamount.intValue();appmoney = appmoney+pds.deviceprice.doubleValue();}%><tr align=center><td><%=devname%><td><%=devmodel%><td><%=appamount%><td><%=appmoney%></td><%}%></table></form><BODY></HTML><%}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -