/**
   * 查找到所有的通知
   *
   * @return 返回给研究生发送的所有同志
   */
  public String findAllNotice() {
    FUserNumber = (String) session.get("FUserNumber"); // 从session中取到数据
    List<TabNoticetosb> nlist = systomNoticeService.findNoticeToByUserNum(FUserNumber);
    System.out.println(nlist.size());
    noticeList = new ArrayList<TabNotice>();
    for (int i = 0; i < nlist.size(); i++) {
      if (nlist
          .get(i)
          .getTabNotice()
          .getFInfoType()
          .equals(CommonConstVariable.NOTICE_TYPE_ADMINTOCOMPANY)) {
        noticeList.add(nlist.get(i).getTabNotice());
      }
    }
    if (noticeList.size() > 10) {
      int pages = 10;
      int listlength = this.noticeList.size();
      if (listlength % pages == 0) {
        this.lastPage = listlength / pages;
      } else {
        this.lastPage = listlength / pages + 1;
      }
      if (this.p < 1) this.p = 1;
      if (this.p > this.lastPage) this.p = this.lastPage;
      int startIndex = (this.p - 1) * pages;
      int endIndex = startIndex + pages;
      if (endIndex >= listlength) endIndex = listlength;
      this.noticeList = this.noticeList.subList(startIndex, endIndex);
    }

    return "findAllNotice";
  }
  public String getUserNewNotice() {
    // Notice
    FUserNumber = (String) session.get("FUserNumber");
    // 从session中取到数据
    System.out.println("Notice:" + FUserNumber);
    List<TabNoticetosb> list = systomNoticeService.findNoticeToByUserNum(FUserNumber);
    noticeList = new ArrayList<TabNotice>();
    for (int i = 0; i < list.size(); i++) {
      noticeList.add(list.get(i).getTabNotice());
    }
    //	HttpSession session = ServletActionContext.getRequest().getSession();

    //		if(session.getAttribute("roletype").toString().equals("1"))
    //		{
    //		//homework
    //		isTeacher=1;
    //	homeworkcount =teacherHomeworkManageDAO.findNewHomeworkCount(FUserNumber);
    return "getUserNewNotice";
    //		}
    //		else
    //		{
    //			return "getUserNewNotice";
    //		}
  }