Package com.gwcworld.core.bean

Examples of com.gwcworld.core.bean.Exhibitor


    ModelAndView mav = new ModelAndView(Constants.EXHIBITORS_VIEW);
   
    int idExhibitor = WebUtil.parameter2int(request.getParameter("idExhibitor"));
    int idProject = (Integer)request.getSession().getAttribute(Constants.PROJECT_ID_FOR_EXHIBITOR_VIEW);
   
    Exhibitor exhibitor = exhibitorService.getById(idExhibitor);
    Project project = projectService.getById(idProject);
       
    if(exhibitor!=null && project!=null){
     
      List<Map[]> allMaps = mapService.getAllByProjectWithUniqueName(project, MAX_RESULT);
      List<Map> maps = new ArrayList<Map>();
      for (Map[] mapsArray : allMaps) {
        maps.add(mapsArray[0]);
      }
     
      List<Stand> stands = standService.getStandListByExhibitor(maps, exhibitor);
      List<com.gwcworld.core.bean.StandStatus> standStatusList = standStatusService.getAll();
     
      mav.addObject("exhibitor", exhibitor);
      mav.addObject("customerId", exhibitor.getCustomer().getId());
      mav.addObject("project", project);
      mav.addObject("stands", stands);
      mav.addObject("standStatusList", standStatusList);
    }
    else
View Full Code Here


      exhibitors = exhibitorService.getExhibitorsByCustomerAndName(project.getCustomer(), name);
   
    List<Exhibitor> exhibitorsList = new ArrayList<Exhibitor>();
    if(exhibitors!=null){
      for (Iterator<Exhibitor> iterator = exhibitors.iterator(); iterator.hasNext();) {
        Exhibitor exhibitor = iterator.next();
        exhibitor.setCustomer(null);
        exhibitorsList.add(exhibitor);
      }
    }
   
    response.addHeader(Constants.CORS_HEADER, "*");
 
View Full Code Here

    Customer customer = customerService.getCustomerByToken(token3rdParty);
   
    int result = 0;
   
    if(customer!=null){
      Exhibitor exhibitor = exhibitorService.getExhibitorsByCustomerAndExactName(customer, name);
      if(exhibitor==null)
        exhibitor = new Exhibitor();
     
      exhibitor.setId3rdParty(id3rdParty);
      exhibitor.setLastId3rdParty(lastId3rdParty);
      exhibitor.setName(name);
      exhibitor.setAddress(address);
      exhibitor.setTel(tel);
      exhibitor.setFax(fax);
      exhibitor.setEmail(email);
      exhibitor.setMqRequested(mqRequested);
      exhibitor.setChangeRequest(changeRequest);
      exhibitor.setCustomer(customer);
     
      exhibitorService.save(exhibitor);
     
      result = 1;
    }
View Full Code Here

      for (Map[] mapsArray : allMaps) {
        maps.add(mapsArray[0]);
      }
     
      for (Exhibitor exhibitor2 : exhibitors) {
        Exhibitor exhibitor = exhibitor2;
        //iddom, mq stand, alert variaz mq (s/n), nome padiglione, codice stand, link1, link 2, link 3
               
        int mq = 0;
        String mapName = " ";
        String standName = " ";
        String variazioneMq = "n";
        List<Stand> stands = standService.getStandListByExhibitor(maps, exhibitor);
        StringBuffer sbOffers = new StringBuffer();
        boolean addLink = true;
        int count = 1;
        for (Iterator<Stand> iterator = stands.iterator(); iterator.hasNext() && count <=MAX_OFFERS;) {
          Stand stand = iterator.next();
          if(addLink)
            sbOffers.append(stand.getLayer().getArea().getMap().getId()+"/"+stand.getId());
          else
            sbOffers.append(" ");
          sbOffers.append(TOKEN);
         
          if(stand.getStatus().getCode().equals(Constants.STAND_STATUS_CONFIRMED)){
            addLink = false;
            mq = stand.getSurfaceTot();
            mapName = stand.getLayer().getArea().getMap().getName();
            standName = stand.getCode();
            variazioneMq = exhibitor.getMqRequested()!=mq?"s":"n";
          }
          count++;
        }
       
        int padding = MAX_OFFERS-stands.size();
        for (int i = 0; i < padding; i++) {
          sbOffers.append(" "+TOKEN);
        }
       
        // ID domanda
        sb.append(exhibitor.getId3rdParty()+TOKEN);
        // Mq totali in caso di stand confermato
        sb.append(mq+TOKEN);
        // Variazione Mq richiesti da Mq totali per stand confermato (s/n)
        sb.append(variazioneMq+TOKEN);
        // Nome mappa per eventuale stand confermato
View Full Code Here

    ModelAndView mav = null;
   
    int customerId = WebUtil.parameter2int(request.getParameter("customerId"));
    int idExhibitor = WebUtil.parameter2int(request.getParameter("idExhibitor"));
   
    Exhibitor exhibitor = exhibitorService.getById(idExhibitor);
       
    if(exhibitor!=null){
      try{
        exhibitorService.delete(exhibitor);
      }
View Full Code Here

             
              Stand stand = new Stand();
              stand.setCode(standJson.getCode());
              stand.setDescription(standJson.getDescription());
              if(standJson.getExhibitorId()!=0){
                Exhibitor exhibitor = exhibitorService.getById(standJson.getExhibitorId());
                stand.setExhibitor(exhibitor);
              }
              stand.setLogo(standJson.getLogo());
              stand.setName(standJson.getName());
              stand.setOpenSides(standJson.getOpenSides());
View Full Code Here

TOP

Related Classes of com.gwcworld.core.bean.Exhibitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.