コード例 #1
0
  @RequestMapping("party-entity-list")
  public String list(
      @ModelAttribute Page page, @RequestParam Map<String, Object> parameterMap, Model model) {
    String tenantId = tenantHolder.getTenantId();
    List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap);
    propertyFilters.add(new PropertyFilter("EQS_tenantId", tenantId));
    page = partyEntityManager.pagedQuery(page, propertyFilters);
    model.addAttribute("page", page);

    return "party/party-entity-list";
  }
コード例 #2
0
  @RequestMapping("party-entity-export")
  public void export(
      @ModelAttribute Page page,
      @RequestParam Map<String, Object> parameterMap,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    List<PropertyFilter> propertyFilters = PropertyFilter.buildFromMap(parameterMap);
    page = partyEntityManager.pagedQuery(page, propertyFilters);

    List<PartyEntity> partyEntities = (List<PartyEntity>) page.getResult();
    List<PartyEntityDTO> partyDtos = partyEntityConverter.createPartyEntityDtos(partyEntities);
    TableModel tableModel = new TableModel();
    tableModel.setName("party entity");
    tableModel.addHeaders("id", "type", "code", "name");
    tableModel.setData(partyDtos);
    exportor.export(request, response, tableModel);
  }