⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stati_num.jsp

📁 《jsp案例开发》这本书的源代码。包括源代码和相关的具体配置操作步骤。非常不错
💻 JSP
📖 第 1 页 / 共 5 页
字号:
}}}Collection crc = new ArrayList();crc = handtakeController.getCheckByModel(devmode);Iterator cri = crc.iterator();while(cri.hasNext()){crj = (CheckReportJBean)cri.next();Judge jd = new Judge();if(jd.decide(hqid,crj.unitid)){beiyong=new Integer(beiyong.intValue()+crj.lastamount.intValue());}}Collection htc = new ArrayList();htc = handtakeController.getHandByModel(devmode);Iterator hti = htc.iterator();while(hti.hasNext()){hjb = (HandtakeJBean)hti.next();Judge jd = new Judge();if(jd.decide(hqid,hjb.unitid)){beiyong=new Integer(beiyong.intValue()+hjb.hamount.intValue());}}Collection rcc = new ArrayList();rechangeStruct rcs = new rechangeStruct();rcc = handtakeController.getRechangeByModel(devmode);Iterator rci = rcc.iterator();while(rci.hasNext()){rcs = (rechangeStruct)rci.next();Judge jd = new Judge();if(jd.decide(hqid,rcs.unitid)){beiyong = new Integer(beiyong.intValue()+rcs.hamount.intValue());}   }/*Connection  con=DriverManager.getConnection(url,name,pass);Statement stmt=con.createStatement();ResultSet rs=null;String sqls="select HAMOUNT from RECHANGE where DEV_MODEL='"+devmode+"'";rs=stmt.executeQuery(sqls);while(rs.next()){int hamount=rs.getInt("HAMOUNT");beiyong = new Integer(beiyong.intValue()+hamount);}*/heji = new Integer(beiyong.intValue()+shiyong.intValue()+weixiu.intValue()+daibaofei.intValue()+yibaofei.intValue());hbeiyong = hbeiyong+beiyong.intValue();hshiyong = hshiyong+shiyong.intValue();hweixiu = hweixiu+weixiu.intValue();hdaibaofei = hdaibaofei+daibaofei.intValue();hyibaofei = hyibaofei+yibaofei.intValue();hheji = hheji+heji.intValue();%><tr bgcolor="#fafafa"><td><%=unitn%><td><%=devty%><td><%=devmode%><td><%=devname%><td><%=beiyong%><td><%=shiyong%><td><%=weixiu%><td><%=daibaofei%><td><%=yibaofei%><td><%=heji%><tr>      <%}else{       for(int p=0;p<devmod.size();p++)       {         String devname="";         Integer det = new Integer(-1);       cc=handtakeController.getCheckByModel((String)devmod.elementAt(p));       Iterator ii=cc.iterator();       if(ii.hasNext())         {         crj = (CheckReportJBean)ii.next();         devname=crj.dev_name;         det = crj.dev_type;         }       if(devname.equals(""))       {       ec = eqController.getEqdetailsByModel((String)devmod.elementAt(p));       Iterator iii=ec.iterator();       if(iii.hasNext())       {       eqd = (EquipmentDetailsStruct)iii.next();       devname=eqd.getName();       det = eqd.getType();       }       }       String devty="";       if(det.intValue()!=-1){       if(det.intValue()==1)         devty="VTS备件";       if(det.intValue()==2)         devty="航标设备及备件";       if(det.intValue()==3)         devty="AIS系统及备件";       if(det.intValue()==4)         devty="测绘设备及备件";       if(det.intValue()==5)         devty="其他";       }       Integer beiyong=new Integer(0);       Integer shiyong=new Integer(0);       Integer weixiu=new Integer(0);       Integer daibaofei=new Integer(0);       Integer yibaofei=new Integer(0);       Integer heji = new Integer(0);       Collection ect = new ArrayList();       EquipmentJBean eqj = new EquipmentJBean();       ect = eqController.getEqdetailsByModel((String)devmod.elementAt(p));       Iterator equipi = ect.iterator();       while(equipi.hasNext())       {      eqd = (EquipmentDetailsStruct)equipi.next();      eqj = eqController.getEquipmentByDeviceid(eqd.getDeviceid());      Judge jd = new Judge();if(jd.decide(hqid,eqj.getUnitid())){      if(eqj.getStatus().intValue()==1)        {      beiyong=new Integer(beiyong.intValue()+1);      }      if(eqj.getStatus().intValue()==2)        {      shiyong=new Integer(shiyong.intValue()+1);      }      if(eqj.getStatus().intValue()==3)        {      weixiu=new Integer(weixiu.intValue()+1);      }      if(eqj.getStatus().intValue()==4)        {      daibaofei=new Integer(daibaofei.intValue()+1);      }      if(eqj.getStatus().intValue()==5)        {      yibaofei=new Integer(yibaofei.intValue()+1);      }       }       }      Collection crc = new ArrayList();      crc = handtakeController.getCheckByModel((String)devmod.elementAt(p));      Iterator cri = crc.iterator();      while(cri.hasNext())      {      crj = (CheckReportJBean)cri.next();      Judge jd = new Judge();if(jd.decide(hqid,crj.unitid)){      beiyong=new Integer(beiyong.intValue()+crj.lastamount.intValue());      }      }      Collection htc = new ArrayList();      htc = handtakeController.getHandByModel((String)devmod.elementAt(p));      Iterator hti = htc.iterator();      while(hti.hasNext())      {      hjb = (HandtakeJBean)hti.next();      Judge jd = new Judge();if(jd.decide(hqid,hjb.unitid)) {      beiyong=new Integer(beiyong.intValue()+hjb.hamount.intValue());      }      }Collection rcc = new ArrayList();rechangeStruct rcs = new rechangeStruct();rcc = handtakeController.getRechangeByModel((String)devmod.elementAt(p));Iterator rci = rcc.iterator();while(rci.hasNext()){rcs = (rechangeStruct)rci.next();Judge jd = new Judge();if(jd.decide(hqid,rcs.unitid)){beiyong = new Integer(beiyong.intValue()+rcs.hamount.intValue());}   }/*      Connection  con=DriverManager.getConnection(url,name,pass);      Statement stmt=con.createStatement();      ResultSet rs=null;      String sqls="select HAMOUNT from RECHANGE where DEV_MODEL='"+(String)devmod.elementAt(p)+"'";      rs=stmt.executeQuery(sqls);      while(rs.next())      {      int hamount=rs.getInt("HAMOUNT");      beiyong = new Integer(beiyong.intValue()+hamount);      }*/      heji = new Integer(beiyong.intValue()+shiyong.intValue()+weixiu.intValue()+daibaofei.intValue()+yibaofei.intValue());      hbeiyong = hbeiyong+beiyong.intValue();      hshiyong = hshiyong+shiyong.intValue();      hweixiu = hweixiu+weixiu.intValue();      hdaibaofei = hdaibaofei+daibaofei.intValue();      hyibaofei = hyibaofei+yibaofei.intValue();      hheji = hheji+heji.intValue();      %>      <tr bgcolor="#fafafa">      <td><%=unitn%>      <td><%=devty%>      <td><%=devmod.elementAt(p)%>      <td><%=devname%>      <td><%=beiyong%>      <td><%=shiyong%>      <td><%=weixiu%>      <td><%=daibaofei%>      <td><%=yibaofei%>      <td><%=heji%>      <tr>      <%   }}  %>   <tr bgcolor="#fafafa">      <td>合计      <td>      <td>      <td>      <td><%=hbeiyong%>      <td><%=hshiyong%>      <td><%=hweixiu%>      <td><%=hdaibaofei%>      <td><%=hyibaofei%>      <td><%=hheji%>  <tr><%}}}//海区统计*************************************************************************************************************if(temp.intValue()==1){if(unitn!=null&&dtype!=null&&devmode!=null){  Integer devtype = new Integer(dtype); if(unitn.equals("")&&devtype.intValue()==-1) { Vector hqname = new Vector(); Vector hqid = new Vector(); hqname.addElement(ys); hqid.addElement(user.unitid); Collection hqc = new ArrayList(); hqc = officeUnitController.getAll(); Iterator hqi = hqc.iterator(); while(hqi.hasNext()) { officeUnitStruct ofus = (officeUnitStruct)hqi.next(); if(ofus.upunitid.intValue()==user.unitid.intValue())    {   hqname.addElement(ofus.processname);   hqid.addElement(ofus.unitid);    } } int hbeiyong=0; int hshiyong=0; int hweixiu=0; int hdaibaofei=0; int hyibaofei=0; int hheji=0; for(int l=0;l<hqid.size();l++) {   String haiqun=(String)hqname.elementAt(l);   Vector devmod = new Vector();   cc = handtakeController.getCheckAll();   Iterator i = cc.iterator();   while(i.hasNext())   {   crj = (CheckReportJBean)i.next();   Judge jd = new Judge();   if(jd.decide((Integer)hqid.elementAt(l),crj.unitid))   devmod.addElement(crj.dev_model); } ec = eqController.getEqdDetailsAll(); i.remove(); i=ec.iterator(); while(i.hasNext()) { eqd = (EquipmentDetailsStruct)i.next(); Judge jd = new Judge(); if(jd.decide((Integer)hqid.elementAt(l),eqd.getUnitid())) devmod.addElement(eqd.getModel()); } for(int p=0;p<devmod.size()-1;p++)  for(int k=p+1;k<devmod.size();k++)    {    if(devmod.elementAt(p).equals(devmod.elementAt(k)))             {             devmod.remove(k);             k--;               }      }  if(!devmode.equals(""))  {    String devname="";  Integer det = new Integer(-1);cc=handtakeController.getCheckByModel(devmode);Iterator ii=cc.iterator();if(ii.hasNext())  {  crj = (CheckReportJBean)ii.next();  devname=crj.dev_name;  det = crj.dev_type;  }if(devname.equals("")){ec = eqController.getEqdetailsByModel(devmode);Iterator iii=ec.iterator();if(iii.hasNext()){eqd = (EquipmentDetailsStruct)iii.next();devname=eqd.getName();det = eqd.getType();}}String devty="";if(det.intValue()!=-1){if(det.intValue()==1)  devty="VTS备件";if(det.intValue()==2)  devty="航标设备及备件";if(det.intValue()==3)  devty="AIS系统及备件";if(det.intValue()==4)  devty="测绘设备及备件";if(det.intValue()==5)  devty="其他";}Integer beiyong=new Integer(0);Integer shiyong=new Integer(0);Integer weixiu=new Integer(0);Integer daibaofei=new Integer(0);Integer yibaofei=new Integer(0);Integer heji = new Integer(0);Collection ect = new ArrayList();EquipmentJBean eqj = new EquipmentJBean();ect = eqController.getEqdetailsByModel(devmode);Iterator equipi = ect.iterator();while(equipi.hasNext()){eqd = (EquipmentDetailsStruct)equipi.next();eqj = eqController.getEquipmentByDeviceid(eqd.getDeviceid());if(((Integer)hqid.elementAt(l)).intValue()==user.unitid.intValue())  {if(eqj.getUnitid().intValue()==user.unitid.intValue()){  if(eqj.getStatus().intValue()==1)   {  beiyong=new Integer(beiyong.intValue()+1);  }  if(eqj.getStatus().intValue()==2)   {  shiyong=new Integer(shiyong.intValue()+1);  }  if(eqj.getStatus().intValue()==3)   {  weixiu=new Integer(weixiu.intValue()+1);  }  if(eqj.getStatus().intValue()==4)   {  daibaofei=new Integer(daibaofei.intValue()+1);  }  if(eqj.getStatus().intValue()==5)   {  yibaofei=new Integer(yibaofei.intValue()+1);}}  }  else{Judge jd = new Judge();if(jd.decide((Integer)hqid.elementAt(l),eqj.getUnitid())){if(eqj.getStatus().intValue()==1) {beiyong=new Integer(beiyong.intValue()+1);}if(eqj.getStatus().intValue()==2) {shiyong=new Integer(shiyong.intValue()+1);}if(eqj.getStatus().intValue()==3) {weixiu=new Integer(weixiu.intValue()+1);}if(eqj.getStatus().intValue()==4) {daibaofei=new Integer(daibaofei.intValue()+1);}if(eqj.getStatus().intValue()==5) {yibaofei=new Integer(yibaofei.intValue()+1);}}}}Collection crc = new ArrayList();crc = handtakeController.getCheckByModel(devmode);Iterator cri = crc.iterator();while(cri.hasNext()){crj = (CheckReportJBean)cri.next();if(((Integer)hqid.elementAt(l)).intValue()==user.unitid.intValue()){if(crj.unitid.intValue()==user.unitid.intValue()){beiyong=new Integer(beiyong.intValue()+crj.lastamount.intValue());}}else{Judge jd = new Judge();if(jd.decide((Integer)hqid.elementAt(l),crj.unitid)){beiyong=new Integer(beiyong.intValue()+crj.lastamount.intValue());}}}Collection htc = new ArrayList();htc = handtakeController.getHandByModel(devmode);Iterator hti = htc.iterator();while(hti.hasNext()){hjb = (HandtakeJBean)hti.next();if(((Integer)hqid.elementAt(l)).intValue()==user.unitid.intValue()){if(hjb.unitid.intValue()==user.unitid.intValue()){beiyong=new Integer(beiyong.intValue()+hjb.hamount.intValue());}}else{Judge jd = new Judge();if(jd.decide((Integer)hqid.elementAt(l),hjb.unitid)){beiyong=new Integer(beiyong.intValue()+hjb.hamount.intValue());}}}Collection rcc = new ArrayList();rechangeStruct rcs = new rechangeStruct();rcc = handtakeController.getRechangeByModel(devmode);Iterator rci = rcc.iterator();while(rci.hasNext()){rcs = (rechangeStruct)rci.next();if(((Integer)hqid.elementAt(l)).intValue()==user.unitid.intValue()){if(rcs.unitid.intValue()==user.unitid.intValue()){beiyong = new Integer(beiyong.intValue()+rcs.hamount.intValue());}}else{Judge jd = new Judge();if(jd.decide((Integer)hqid.elementAt(l),rcs.unitid)){beiyong = new Integer(beiyong.intValue()+rcs.hamount.intValue());}   }}/*Connection  con=DriverManager.getConnection(url,name,pass);Statement stmt=con.createStatement();ResultSet rs=null;String sqls="select HAMOUNT from RECHANGE where DEV_MODEL='"+devmode+"'";rs=stmt.executeQuery(sqls);while(rs.next()){int hamount=rs.getInt("HAMOUNT");beiyong = new Integer(beiyong.intValue()+hamount);}*/heji = new Integer(beiyong.intValue()+shiyong.intValue()+weixiu.intValue()+daibaofei.intValue()+yibaofei.intValue());hbeiyong = hbeiyong+beiyong.intValue();hshiyong = hshiyong+shiyong.intValue();hweixiu = hweixiu+weixiu.intValue();hdaibaofei = hdaibaofei+daibaofei.intValue();hyibaofei = hyibaofei+yibaofei.intValue();hheji = hheji+heji.intValue();if(heji.intValue()!=0)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -