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

📄 rili_mmxhaction.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.Checkdate;import javabean.PubDate;import javabean.YLHQ_mmxh;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_mmxhForm;/**  * Rili_mmxhAction.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 10-27-2004 *  * XDoclet definition: * @struts:action path="/rili_mmxh" name="rili_mmxhForm" input="/form/rili_mmxh.jsp" validate="true" * @struts:action-forward name="/YLHQ_mmxhD.jsp" path="/YLHQ_mmxhD.jsp" */public class Rili_mmxhAction 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_mmxhForm rili_mmxhForm = (Rili_mmxhForm) form;						String names=rili_mmxhForm.getnames().trim();			names=new String(names.getBytes("ISO-8859-1"));		String sql;			String times=rili_mmxhForm.getDates();			String times2;		int number=0;		ResultSet rs;		dbconnect db=new dbconnect();		Vector vector1=new Vector();		PubDate pub=new PubDate();		String times1=pub.getshortPubdate();		Checkdate checkdate=new Checkdate();				sql="select max(pubdate) from ylhq1_mmxh";		rs=db.executeQuery(sql);		if(rs.next())		{			times1=rs.getString(1);//最大天		}		rs.close();				if(times.compareTo(times1)>0)		{			checkdate.settimes(times1);			times2=checkdate.gettimes();			sql="select pubdate,ljcjl,cjl,bzj,zdj,bindex,zindex from ylhq1_mmxh where pubdate between '"+times2+"' and '"+times1+"' order by pubdate desc";				rs=db.executeQuery(sql);				while(rs.next())				{					YLHQ_mmxh mmxh=new YLHQ_mmxh();					mmxh.setbzj(rs.getString("bzj"));					mmxh.setzdj(rs.getString("zdj"));					mmxh.setljcjl(rs.getInt("ljcjl"));					mmxh.setcjl(rs.getInt("cjl"));					mmxh.setbindex(rs.getFloat("bindex"));					mmxh.setzindex(rs.getFloat("zindex"));					mmxh.setpubdate(rs.getString("pubdate"));					vector1.add(mmxh);				}				rs.close();								request.setAttribute("vector1",vector1);				request.setAttribute("names",names);				request.setAttribute("times_first",times2);					request.setAttribute("times_end",times1);								}		else		{			checkdate.settimes(times);			times2=checkdate.gettimes();			sql="select pubdate,ljcjl,cjl,bzj,zdj,bindex,zindex from ylhq1_mmxh where pubdate between '"+times2+"' and'"+times+"' order by pubdate desc";				rs=db.executeQuery(sql);				while(rs.next())				{					YLHQ_mmxh mmxh=new YLHQ_mmxh();					mmxh.setbzj(rs.getString("bzj"));					mmxh.setzdj(rs.getString("zdj"));					mmxh.setljcjl(rs.getInt("ljcjl"));					mmxh.setcjl(rs.getInt("cjl"));					mmxh.setbindex(rs.getFloat("bindex"));					mmxh.setzindex(rs.getFloat("zindex"));					mmxh.setpubdate(rs.getString("pubdate"));					vector1.add(mmxh);					number++;				}				rs.close();				if(number>0)				{					request.setAttribute("vector1",vector1);					request.setAttribute("names",names);					request.setAttribute("times_first",times2);					request.setAttribute("times_end",times);				}				else				{					checkdate.settimes(times1);					times2=checkdate.gettimes();					sql="select pubdate,ljcjl,cjl,bzj,zdj,bindex,zindex from ylhq1_mmxh where pubdate between '"+times2+"' and '"+times1+"' order by pubdate desc";						rs=db.executeQuery(sql);						while(rs.next())						{							YLHQ_mmxh mmxh=new YLHQ_mmxh();							mmxh.setbzj(rs.getString("bzj"));							mmxh.setzdj(rs.getString("zdj"));							mmxh.setljcjl(rs.getInt("ljcjl"));							mmxh.setcjl(rs.getInt("cjl"));							mmxh.setbindex(rs.getFloat("bindex"));							mmxh.setzindex(rs.getFloat("zindex"));							mmxh.setpubdate(rs.getString("pubdate"));							vector1.add(mmxh);						}						rs.close();										request.setAttribute("vector1",vector1);						request.setAttribute("names",names);						request.setAttribute("times_first",times2);							request.setAttribute("times_end",times1);				}		}		return mapping.findForward("Success");		//throw new UnsupportedOperationException("Generated method 'execute(...)' not implemented.");	}}

⌨️ 快捷键说明

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