コード例 #1
0
ファイル: FileController.java プロジェクト: lithium429/hosp
  /**
   * @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
ファイル: FileController.java プロジェクト: lithium429/hosp
  /**
   * @Description 获取总结文档列表数据
   *
   * @param request
   * @param model
   * @author davidwan
   */
  private void getSummaryList(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);
    Integer deptId = WebUtil.getInteger(request, "dept_id", null);
    String name = WebUtil.getString(request, "name", null);
    String creatorName = WebUtil.getString(request, "creator_name", null);
    String minCreateTime = WebUtil.getString(request, "min_create_time", null);
    String maxCreateTime = WebUtil.getString(request, "max_create_time", null);
    boolean isDelete = WebUtil.getBoolean(request, "is_delete", false);

    File entity = new File();
    entity.setDirectory_id(directoryId);
    entity.setModule_type(EnumDirModuleType.总结文档.getValue());
    entity.getMap().put("is_delete", isDelete);
    entity.getMap().put("dept_id", deptId);
    entity.getMap().put("current_user_id", getCurrentUserId());

    if (StringUtils.isNotBlank(name)) {
      entity.getMap().put("name", name);
    }
    if (StringUtils.isNotBlank(creatorName)) {
      entity.getMap().put("creator_name", creatorName);
    }
    if (StringUtils.isNotBlank(minCreateTime)) {
      entity.getMap().put("min_create_time", minCreateTime);
    }
    if (StringUtils.isNotBlank(maxCreateTime)) {
      entity.getMap().put("max_create_time", maxCreateTime);
    }

    model.addAttribute("userId", getCurrentUserId());

    PageInfo<File> pageInfo = fileService.querySummaryPageList(entity, pageIndex, pageSize);
    model.addAttribute("list", pageInfo.getData());
    model.addAttribute("pageInfo", pageInfo);
    model.addAttribute("roleMenuList", super.gainRoleMenu(menu_id));
  }