📄 equipadd.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()!=12) response.sendRedirect("../../error/access.html"); else{%><%CheckReportJBean crj=(CheckReportJBean)session.getAttribute("checkejb");EquipmentJBean eqj=(EquipmentJBean)session.getAttribute("equipmentj");EquipmentDetailsStruct eqd=(EquipmentDetailsStruct)session.getAttribute("equipmentdj");session.removeAttribute("checkejb");session.removeAttribute("equipmentj");session.removeAttribute("equipmentdj");int amount = crj.amount.intValue();java.util.Date today = new java.util.Date();EquipmentJBean teqj = new EquipmentJBean();EquipmentDetailsStruct teqd = new EquipmentDetailsStruct();//System.out.println("1");Context ctx=new InitialContext();Object ref=ctx.lookup("EquipmentControllerEJB");EquipmentControllerEJBHome eqHome=(EquipmentControllerEJBHome) PortableRemoteObject.narrow(ref,EquipmentControllerEJBHome.class);EquipmentControllerEJB eqController = eqHome.create();Context ctx1=new InitialContext();Object ref1=ctx1.lookup("HandtakeController");HandtakeControllerHome handtakeControllerHome=(HandtakeControllerHome) PortableRemoteObject.narrow(ref1,HandtakeControllerHome.class);HandtakeController handtakeController = handtakeControllerHome.create();//System.out.println("2");for(int j=0;j<amount;j++){eqj.setDeviceid(eqj.getContractid()+"/"+today.toString()+"/"+user.unitid.toString()+"/"+(new Integer(j)).toString());eqd.setDeviceid(eqj.getDeviceid());eqController.addEqdetails(eqd);eqController.addEquipment(eqj);//rs.hamount=new Integer(rs.hamount.intValue()-1);crj.lastamount = new Integer(crj.lastamount.intValue() - 1);handtakeController.editCheck(crj.check_id,crj);//.editRechange(rs.rechangeid,rs);}response.sendRedirect("equiplist.jsp");%><%}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -