📄 subinputed.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 if(user.getAccess().intValue()==3||user.getAccess().intValue()==4){%><%officeUnitStruct ous = new officeUnitStruct();try{ Context ctx = new InitialContext(); Object ref = ctx.lookup("OfficeUnitController"); OfficeUnitControllerHome officeUnitControllerHome = (OfficeUnitControllerHome) PortableRemoteObject.narrow(ref, OfficeUnitControllerHome.class); OfficeUnitController officeUnitController=officeUnitControllerHome.create(); String processname = request.getParameter("processname"); String unitremark = request.getParameter("unitremark"); Integer upunitid=new Integer(0); Integer unitid=new Integer(0); /* Integer unitid2=new Integer(0); Integer unitid3=new Integer(0); Integer unitid4=new Integer(0); Integer unitid5=new Integer(0);*/ Collection collect=officeUnitController.getAll(); Iterator i=collect.iterator(); while(i.hasNext()){ officeUnitStruct temp=(officeUnitStruct)i.next(); if(unitid.intValue()<temp.unitid.intValue()) { unitid=new Integer(temp.unitid.intValue()); /*if(temp.upunitid.intValue() == 2){ unitid=new Integer(temp.unitid.intValue()); unitid2 = unitid; ous.unitid = new Integer(unitid2.intValue()+1); } if(temp.upunitid.intValue() == 3){ unitid=new Integer(temp.unitid.intValue()); unitid3 = unitid; ous.unitid = new Integer(unitid3.intValue()+1); } if(temp.upunitid.intValue() == 4){ unitid=new Integer(temp.unitid.intValue()); unitid4 = unitid; ous.unitid = new Integer(unitid4.intValue()+1); } if(temp.upunitid.intValue() == 5){ unitid=new Integer(temp.unitid.intValue()); unitid5 = unitid; ous.unitid = new Integer(unitid5.intValue()+1); }*/ } }System.out.println("unitid value is ::"+unitid.intValue()); /*if(unitid.intValue()<1000){ if(user.unitid.intValue()==2){ ous.unitid = new Integer(unitid.intValue()+1000); }else if(user.unitid.intValue()==3){ ous.unitid = new Integer(unitid.intValue()+2000); }else if(user.unitid.intValue()==4){ ous.unitid = new Integer(unitid.intValue()+3000); }else if(user.unitid.intValue()==5){ ous.unitid = new Integer(unitid.intValue()+40000); } }else{*/ ous.unitid = new Integer(unitid.intValue()+1); // }// }System.out.println("mmmmmmmmmmmmmmmmmm"); ous.processname = processname; ous.upunitid = user.unitid; ous.unitremark = unitremark; System.out.println("ous.unitid="+ous.unitid.intValue());System.out.println("kkkkkkkkkkkkkkkkkkkkkkkk"); boolean ok = false; ok = officeUnitController.add(ous); if(ok){ response.sendRedirect("subaddsuccess.html"); }}catch(Exception e){e.printStackTrace();response.sendRedirect("../../error/adderror.html"); }%><%}else{ response.sendRedirect("../../error/accesserror.html");}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -