Пример #1
0
  @RequestMapping("detail/{noticeId}")
  public String detail(
      HttpServletRequest request, HttpServletResponse response, @PathVariable Long noticeId) {
    Infomation infomation = infomationManager.getByObjectId(noticeId);
    User user = userManager.getUserByUserId(infomation.getCreatedBy());
    infomation.setCreateUserName(user.getUserName());
    request.setAttribute("infomation", infomation);

    InfomationNotice sample = new InfomationNotice();
    sample.setInfomationId(noticeId);
    List<InfomationNotice> notices = infomationNoticeManager.getBySample(sample);
    request.setAttribute("notices", notices);
    return getFileBasePath() + "detail";
  }
Пример #2
0
 @RequestMapping("edit/{objectId}/{type}")
 public String saveActivity(
     HttpServletRequest request,
     HttpServletResponse response,
     @PathVariable Long objectId,
     @PathVariable Integer type) {
   Infomation infomation = infomationManager.getByObjectId(objectId);
   infomation.setTitle(infomation.getTitle().trim());
   request.setAttribute("infomation", infomation);
   InfomationNotice sample = new InfomationNotice();
   sample.setInfomationId(objectId);
   List<InfomationNotice> notices = infomationNoticeManager.getBySample(sample);
   request.setAttribute("notices", notices);
   if (IBSConstants.HR_ACTIVITY == type) {
     return getFileBasePath() + "addActivity";
   } else if (IBSConstants.HR_NOTICE == type) {
     return getFileBasePath() + "addNotice";
   } else {
     return "redirect:detail/" + objectId;
   }
 }