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

📄 rili_zmqhaction.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_zmqh;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_zmqhForm;/**  * Rili_zmqhAction.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 10-23-2004 *  * XDoclet definition: * @struts:action path="/rili_zmqh" name="rili_zmqhForm" input="/form/rili_zmqh.jsp" validate="true" * @struts:action-forward name="/YLHQ_zmqhD" path="/YLHQ_zmqhD" */public class Rili_zmqhAction 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_zmqhForm rili_zmqhForm = (Rili_zmqhForm) form;				String names=rili_zmqhForm.getnames().trim();			names=new String(names.getBytes("ISO-8859-1"));		String sql;			String times=rili_zmqhForm.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_zmqh";		rs=db.executeQuery(sql);		if(rs.next())		{			times1=rs.getString(1);//最大天		}		rs.close();				if(times.compareTo(times1)>0)		{			sql="select pubdate,types,price_f,price_h,price_l,price_e,price_js,zd,cjl,ccl,bd from ylhq1_zmqh where pubdate='"+times1+"' order by types asc";				rs=db.executeQuery(sql);				while(rs.next())				{					YLHQ_zmqh zmqh=new YLHQ_zmqh();					zmqh.setbd(rs.getInt("bd"));					zmqh.setcjl(rs.getInt("cjl"));					zmqh.setccl(rs.getInt("ccl"));					zmqh.setprice_js(rs.getInt("price_js"));					zmqh.setprice_e(rs.getInt("price_e"));					zmqh.setprice_l(rs.getInt("price_l"));					zmqh.setprice_h(rs.getInt("price_h"));					zmqh.setprice_f(rs.getInt("price_f"));					zmqh.setzd(rs.getInt("zd"));					zmqh.setpubdate(rs.getString("pubdate"));					zmqh.settypes(rs.getString("types"));					all_number=all_number+rs.getInt("cjl");					vector1.add(zmqh);				}				rs.close();				request.setAttribute("all_number",String.valueOf(all_number));				request.setAttribute("vector1",vector1);				request.setAttribute("names",names);				request.setAttribute("times",times1);					}		else		{			sql="select pubdate,types,price_f,price_h,price_l,price_e,price_js,zd,cjl,ccl,bd from ylhq1_zmqh where pubdate='"+times+"' order by types asc";				rs=db.executeQuery(sql);				while(rs.next())				{					YLHQ_zmqh zmqh=new YLHQ_zmqh();					zmqh.setbd(rs.getInt("bd"));					zmqh.setcjl(rs.getInt("cjl"));					zmqh.setccl(rs.getInt("ccl"));					zmqh.setprice_js(rs.getInt("price_js"));					zmqh.setprice_e(rs.getInt("price_e"));					zmqh.setprice_l(rs.getInt("price_l"));					zmqh.setprice_h(rs.getInt("price_h"));					zmqh.setprice_f(rs.getInt("price_f"));					zmqh.setzd(rs.getInt("zd"));					zmqh.setpubdate(rs.getString("pubdate"));					zmqh.settypes(rs.getString("types"));					all_number=all_number+rs.getInt("cjl");					vector1.add(zmqh);					number++;				}				rs.close();				if(number>0)				{					request.setAttribute("all_number",String.valueOf(all_number));					request.setAttribute("vector1",vector1);					request.setAttribute("names",names);					request.setAttribute("times",times);				}				else				{					sql="select pubdate,types,price_f,price_h,price_l,price_e,price_js,zd,cjl,ccl,bd from ylhq1_zmqh where pubdate='"+times1+"' order by types asc";						rs=db.executeQuery(sql);						while(rs.next())						{							YLHQ_zmqh zmqh=new YLHQ_zmqh();							zmqh.setbd(rs.getInt("bd"));							zmqh.setcjl(rs.getInt("cjl"));							zmqh.setccl(rs.getInt("ccl"));							zmqh.setprice_js(rs.getInt("price_js"));							zmqh.setprice_e(rs.getInt("price_e"));							zmqh.setprice_l(rs.getInt("price_l"));							zmqh.setprice_h(rs.getInt("price_h"));							zmqh.setprice_f(rs.getInt("price_f"));							zmqh.setzd(rs.getInt("zd"));							zmqh.setpubdate(rs.getString("pubdate"));							zmqh.settypes(rs.getString("types"));							all_number=all_number+rs.getInt("cjl");							vector1.add(zmqh);						}						rs.close();						request.setAttribute("all_number",String.valueOf(all_number));						request.setAttribute("vector1",vector1);						request.setAttribute("names",names);						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 + -