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

📄 jtlist.java

📁 用JSP JAVA 做的 系统 只是初来扎到还望西黄!别乱来哦!
💻 JAVA
字号:
package com.chis.model.family;

import java.util.List;
import com.stframe.dao.PageUtil;
import com.stframe.dao.DaoUtil;
import com.stframe.form.ActionForm;
import com.stframe.form.DataForm;
import com.stframe.servlet.ActionInstance;
/**
 * 家庭档案信息查询
 * 
 * @author 翟昌强
 *  
 */
public class JtList extends ActionInstance {
	public int execute(ActionForm af) throws Exception {
		String corp_code=af.getHttpSession().getAttribute("CORP_CODE").toString();
		String page =(String)af.getHttpRequest().getParameter("currentpage");
		String jtbh = af.getHttpRequest().getParameter("JTBH");
		String HZ = af.getHttpRequest().getParameter("HZ");

        StringBuffer sql = new StringBuffer();
		StringBuffer path = new StringBuffer();
		path.append(af.getHttpRequest().getContextPath()+"/Selevet.do?action=JT_LIST");
		sql.append(" select * from DA_JT \n"); 
		sql.append(" where 1=1 and CORP_CODE='"+corp_code+"'\n");
		if(!(jtbh==null)&&!("".equals(jtbh))) 
		{
		    sql.append("and JTBH ='"+jtbh+"'");
		    path.append("&JTBH="+jtbh);
		}
		if(!(HZ==null)&&!("".equals(HZ))) 
		{
		    sql.append("and HZ like '%"+HZ+"%'");
		    path.append("&HZ="+HZ);
		}
		int ipage = 0;
		if (page!=null&&!page.equals("")){
			ipage=Integer.valueOf(page);
		}
		//List list = DaoUtil.select(af.getConnection(), sql.toString(), new DataForm("DA_JT"));
		PageUtil pageUtil = (PageUtil)DaoUtil.selectPage(af.getConnection(), sql.toString(),ipage, 20);
		pageUtil.setPath(path.toString());
		
		af.getHttpRequest().setAttribute("jtlist", pageUtil.getContext());
		af.getHttpRequest().setAttribute("pagebar", pageUtil.pageBar());
		af.getHttpRequest().setAttribute("JTBH", jtbh);
		af.getHttpRequest().setAttribute("HZ", HZ);
		return 1;
	}
}

⌨️ 快捷键说明

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