📄 rili_qtylaction.java
字号:
// Created by Xslt generator for Eclipse.// XSL : not found (java.io.FileNotFoundException: (Bad file descriptor))// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xslpackage struts.action;import java.sql.ResultSet;import java.util.Vector;import javabean.PubDate;import javabean.YLHQ1_qtyl;import javabean.dbconnect;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.struts.action.Action;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionForward;import org.apache.struts.action.ActionMapping;import struts.form.Rili_qtylForm;/** * Ylhq_qtylAction.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 10-24-2004 * * XDoclet definition: * @struts:action path="/ylhq_qtyl" name="ylhq_qtylForm" input="/form/ylhq_qtyl.jsp" validate="true" * @struts:action-forward name="/YLHQ_qtylD.jsp" path="/YLHQ_qtylD.jsp" */public class Rili_qtylAction extends Action { // --------------------------------------------------------- Instance Variables // --------------------------------------------------------- Methods /** * Method execute * @param ActionMapping mapping * @param ActionForm form * @param HttpServletRequest request * @param HttpServletResponse response * @return ActionForward * @throws Exception */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { Rili_qtylForm ylhq_qtylForm = (Rili_qtylForm) form; String namess=ylhq_qtylForm.getnames().trim(); namess=new String(namess.getBytes("ISO-8859-1")); String sql; String times=ylhq_qtylForm.getDates(); int number=0; ResultSet rs; dbconnect db=new dbconnect(); Vector vector1=new Vector(); PubDate pub=new PubDate(); String times1=pub.getshortPubdate(); sql="select max(pubdate) from ylhq1_zmzs"; rs=db.executeQuery(sql); if(rs.next()) { times1=rs.getString(1);//最大天 } rs.close(); if(times.compareTo(times1)>0) { sql="select * from ylhq1_qtyl where times='"+times1+"'"; rs=db.executeQuery(sql); while(rs.next()) { YLHQ1_qtyl qtyl=new YLHQ1_qtyl(); qtyl.setnames(rs.getString(2)); qtyl.settimes(rs.getString(7)); qtyl.setareas(rs.getString(5)); qtyl.setmarket(rs.getString(4)); qtyl.settypes(rs.getString(3)); qtyl.setprices(rs.getInt(6)); qtyl.setdanw(rs.getString(8)); vector1.add(qtyl); } rs.close(); request.setAttribute("vector1",vector1); request.setAttribute("namess",namess); request.setAttribute("times",times1); } else { sql="select * from ylhq1_qtyl where times='"+times+"'"; rs=db.executeQuery(sql); while(rs.next()) { YLHQ1_qtyl qtyl=new YLHQ1_qtyl(); qtyl.setnames(rs.getString(2)); qtyl.settimes(rs.getString(7)); qtyl.setareas(rs.getString(5)); qtyl.setmarket(rs.getString(4)); qtyl.settypes(rs.getString(3)); qtyl.setprices(rs.getInt(6)); qtyl.setdanw(rs.getString(8)); vector1.add(qtyl); number++; } rs.close(); if(number>0) { request.setAttribute("vector1",vector1); request.setAttribute("namess",namess); request.setAttribute("times",times); } else { sql="select * from ylhq1_qtyl where times='"+times1+"'"; rs=db.executeQuery(sql); while(rs.next()) { YLHQ1_qtyl qtyl=new YLHQ1_qtyl(); qtyl.setnames(rs.getString(2)); qtyl.settimes(rs.getString(7)); qtyl.setareas(rs.getString(5)); qtyl.setmarket(rs.getString(4)); qtyl.settypes(rs.getString(3)); qtyl.setprices(rs.getInt(6)); qtyl.setdanw(rs.getString(8)); vector1.add(qtyl); } rs.close(); request.setAttribute("vector1",vector1); request.setAttribute("namess",namess); request.setAttribute("times",times1); } } return mapping.findForward("Success"); //throw new UnsupportedOperationException("Generated method 'execute(...)' not implemented."); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -