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

📄 rili_dzchaction.java

📁 这个程序是花了好几十万请人开发的
💻 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.YLHQ_dzch;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_dzchForm;/**  * Rili_dzchAction.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 10-23-2004 *  * XDoclet definition: * @struts:action path="/rili_dzch" name="rili_dzchForm" input="/form/rili_dzch.jsp" validate="true" * @struts:action-forward name="/YLHQ_dzchD.jsp" path="/YLHQ_dzchD.jsp" */public class Rili_dzchAction 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_dzchForm rili_dzchForm = (Rili_dzchForm) form;				String names=rili_dzchForm.getnames().trim();			names=new String(names.getBytes("ISO-8859-1"));		String sql;			String times=rili_dzchForm.getDates();			int all_number=0;		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_dzch";		rs=db.executeQuery(sql);		if(rs.next())		{			times1=rs.getString(1);//最大天		}		rs.close();				if(times.compareTo(times1)>0)		{			sql="select * from ylhq1_dzch where pubdate='"+times1+"'";				rs=db.executeQuery(sql);				while(rs.next())				{					YLHQ_dzch dzch=new YLHQ_dzch();					dzch.setbd(rs.getInt("bd"));					dzch.setcjl(rs.getInt("cjl"));					dzch.setdhl(rs.getInt("dhl"));					dzch.setprice_a(rs.getInt("price_a"));					dzch.setprice_e(rs.getInt("price_e"));					dzch.setprice_l(rs.getInt("price_l"));					dzch.setprice_h(rs.getInt("price_h"));					dzch.setprice_f(rs.getInt("price_f"));					dzch.setzd(rs.getInt("zd"));					dzch.setpubdate(rs.getString("pubdate"));					dzch.settypes(rs.getString("types"));										all_number=all_number+rs.getInt("cjl");					vector1.add(dzch);				}				rs.close();								request.setAttribute("vector1",vector1);				request.setAttribute("names",names);				request.setAttribute("times",times1);					request.setAttribute("all_number",String.valueOf(all_number));				}		else		{			sql="select * from ylhq1_dzch where pubdate='"+times+"'";				rs=db.executeQuery(sql);				while(rs.next())				{					YLHQ_dzch dzch=new YLHQ_dzch();					dzch.setbd(rs.getInt("bd"));					dzch.setcjl(rs.getInt("cjl"));					dzch.setdhl(rs.getInt("dhl"));					dzch.setprice_a(rs.getInt("price_a"));					dzch.setprice_e(rs.getInt("price_e"));					dzch.setprice_l(rs.getInt("price_l"));					dzch.setprice_h(rs.getInt("price_h"));					dzch.setprice_f(rs.getInt("price_f"));					dzch.setzd(rs.getInt("zd"));					dzch.setpubdate(rs.getString("pubdate"));					dzch.settypes(rs.getString("types"));										all_number=all_number+rs.getInt("cjl");					vector1.add(dzch);					number++;				}				rs.close();				if(number>0)				{					request.setAttribute("vector1",vector1);					request.setAttribute("names",names);					request.setAttribute("times",times);					request.setAttribute("all_number",String.valueOf(all_number));				}				else				{					sql="select * from ylhq1_dzch where pubdate='"+times1+"'";						rs=db.executeQuery(sql);						while(rs.next())						{							YLHQ_dzch dzch=new YLHQ_dzch();							dzch.setbd(rs.getInt("bd"));							dzch.setcjl(rs.getInt("cjl"));							dzch.setdhl(rs.getInt("dhl"));							dzch.setprice_a(rs.getInt("price_a"));							dzch.setprice_e(rs.getInt("price_e"));							dzch.setprice_l(rs.getInt("price_l"));							dzch.setprice_h(rs.getInt("price_h"));							dzch.setprice_f(rs.getInt("price_f"));							dzch.setzd(rs.getInt("zd"));							dzch.setpubdate(rs.getString("pubdate"));							dzch.settypes(rs.getString("types"));												all_number=all_number+rs.getInt("cjl");							vector1.add(dzch);						}						rs.close();										request.setAttribute("vector1",vector1);						request.setAttribute("names",names);						request.setAttribute("times",times1);							request.setAttribute("all_number",String.valueOf(all_number));					}		}		return mapping.findForward("Success");		//throw new UnsupportedOperationException("Generated method 'execute(...)' not implemented.");	}}

⌨️ 快捷键说明

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