PrinfSfzySelectFenYe.java
上传用户:quasar007
上传日期:2022-08-11
资源大小:4067k
文件大小:2k
源码类别:

企业管理

开发平台:

Java

  1. package com.webtier.queryInformation;
  2. import org.apache.struts.action.ActionMapping;
  3. import org.apache.struts.action.ActionForm;
  4. import javax.servlet.http.HttpServletRequest;
  5. import javax.servlet.http.HttpServletResponse;
  6. import org.apache.struts.action.ActionForward;
  7. import org.apache.struts.action.Action;
  8. import com.service.SfzyFacade;
  9. import com.service.SfzyFacadeImpl;
  10. import java.io.UnsupportedEncodingException;
  11. import java.util.List;
  12. public class PrinfSfzySelectFenYe
  13.     extends Action {
  14.   private SfzyFacade facade;
  15.   public PrinfSfzySelectFenYe() {
  16.     this.facade = new SfzyFacadeImpl();
  17.   }
  18.   public ActionForward perform(ActionMapping actionMapping,
  19.                                ActionForm actionForm,
  20.                                HttpServletRequest httpServletRequest,
  21.                                HttpServletResponse httpServletResponse) throws
  22.       UnsupportedEncodingException {
  23.     httpServletRequest.setCharacterEncoding("gb2312");
  24.     Integer iCount = Integer.valueOf(httpServletRequest.getParameter("iCount"));
  25.     Integer iCount1=new Integer( (iCount.intValue() - 1) * 8);
  26.     if (iCount1.intValue() > 0) {
  27.       List list=this.facade.sfzyFenYe(iCount1);
  28.       httpServletRequest.setAttribute("iCount", String.valueOf(iCount));
  29.       httpServletRequest.setAttribute("total", String.valueOf(this.facade.toatl()));
  30.       httpServletRequest.setAttribute("sfzylist",list);
  31.       return actionMapping.findForward("prinfSfzySelectFenYeSuccess");
  32.     }
  33.     else {
  34.       return actionMapping.findForward("prinfSfzySelectFenYeFail");
  35.     }
  36.   }
  37. }