예제 #1
0
  /**
   * @Description 获取列表数据
   *
   * @param request
   * @param model
   * @author davidwan
   */
  private void getList(HttpServletRequest request, Model model) {
    int pageIndex = WebUtil.getInt(request, "page_index", 0);
    int pageSize = WebUtil.getInt(request, "page_size", ConfigValue.PAGE_SIZE);
    int menu_id = WebUtil.getInt(request, "menu_id", 0);
    Integer directoryId = WebUtil.getInteger(request, "directory_id", null);
    Integer creatorId = WebUtil.getInteger(request, "creator_id", null);
    String name = WebUtil.getString(request, "name", "");
    String types = WebUtil.getString(request, "types", "");
    String minCreateTime = WebUtil.getString(request, "min_create_time", "");
    String maxCreateTime = WebUtil.getString(request, "max_create_time", "");
    String notIds = WebUtil.getString(request, "not_ids", "");
    boolean isDelete = WebUtil.getBoolean(request, "is_delete", false);

    File entity = new File();
    entity.setDirectory_id(directoryId);
    entity.setCreator_id(creatorId);
    if (!isDelete) {
      entity.setModule_type(EnumDirModuleType.我的文档.getValue());
    }
    entity.getMap().put("is_delete", isDelete);

    if (StringUtils.isNotBlank(name)) {
      entity.getMap().put("name", name);
    }
    if (StringUtils.isNotBlank(types)) {
      entity.getMap().put("types", types.split(","));
    }
    if (StringUtils.isNotBlank(minCreateTime)) {
      entity.getMap().put("min_create_time", minCreateTime);
    }
    if (StringUtils.isNotBlank(maxCreateTime)) {
      entity.getMap().put("max_create_time", maxCreateTime);
    }
    if (StringUtils.isNotBlank(notIds)) {
      entity.getMap().put("not_ids", notIds.split(","));
    }

    PageInfo<File> pageInfo = fileService.queryPageList(entity, pageIndex, pageSize);
    model.addAttribute("list", pageInfo.getData());
    model.addAttribute("pageInfo", pageInfo);

    model.addAttribute("roleMenuList", super.gainRoleMenu(menu_id));
  }
예제 #2
0
  /**
   * @Description 获取列表数据
   *
   * @param request
   * @param model
   * @return String
   * @author davidwan
   */
  @RequestMapping("/showdatalist")
  public String showDatalist(HttpServletRequest request, Model model) {
    int pageIndex = WebUtil.getInt(request, "page_index", 0);
    int pageSize = WebUtil.getInt(request, "page_size", ConfigValue.PAGE_SIZE);
    String name = WebUtil.getString(request, "name", null);
    String minCreateTime = WebUtil.getString(request, "min_create_time", null);
    String maxCreateTime = WebUtil.getString(request, "max_create_time", null);

    File entity = new File();
    entity.setModule_type(3);
    if (StringUtils.isNotBlank(name)) {
      entity.getMap().put("name", name);
    }
    if (StringUtils.isNotBlank(minCreateTime)) {
      entity.getMap().put("min_create_time", minCreateTime);
    }
    if (StringUtils.isNotBlank(maxCreateTime)) {
      entity.getMap().put("max_create_time", maxCreateTime);
    }
    PageInfo<File> pageInfo = fileService.queryPageList(entity, pageIndex, pageSize);
    model.addAttribute("list", pageInfo.getData());
    model.addAttribute("pageInfo", pageInfo);
    return getPath("showdata_list");
  }