📄 zhoubaozfsfjcresultqueryaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.oa.personaloffice.action;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
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 com.oa.db.ZhoubaoZfsfjcDAO;
/**
* MyEclipse Struts
* Creation date: 09-19-2007
*
* XDoclet definition:
* @struts.action validate="true"
* @struts.action-forward name="success" path="/personaloffice/zhoubao-zfsfjcView.jsp"
*/
public class ZhoubaozfsfjcResultqueryAction extends Action {
/*
* Generated Methods
*/
ZhoubaoZfsfjcDAO zdao;
public ZhoubaoZfsfjcDAO getZdao() {
return zdao;
}
public void setZdao(ZhoubaoZfsfjcDAO zdao) {
this.zdao = zdao;
}
/**
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
// TODO Auto-generated method stub
HttpSession session = request.getSession();
String username=(String)session.getAttribute("username");
PrintWriter out = null;
response.setCharacterEncoding("gbk");
try {
out = response.getWriter();
} catch (IOException e) {
// TODO 自动生成 catch 块
e.printStackTrace();
}
int id = Integer.parseInt(request.getParameter("id"));
String weeklyofyear = request.getParameter("querydate");System.out.println(weeklyofyear);
try {
weeklyofyear = new String(weeklyofyear.getBytes("iso8859-1"),"gbk");
} catch (UnsupportedEncodingException e) {
// TODO 自动生成 catch 块
e.printStackTrace();
}
if(username!=null){
List list = zdao.ByWeeklyofyearQueryZhoubaoZfsfjc(weeklyofyear);
if(list!=null&&list.size()!=0){
request.setAttribute("list", list);
return mapping.findForward("success");
}
}else{
out.print("<script>alert('您的操作超时,请重新登录!');");
out.print("window.open('login.jsp','_top');");
out.print("</script>");
out.flush();
}
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -