Examples of Warehouse


Examples of org.hoteia.qalingo.core.domain.Warehouse

     */
    public List<WarehouseViewBean> buildListViewBeanWarehouse(final RequestData requestData, final List<Warehouse> warehouses) throws Exception {
        final List<WarehouseViewBean> warehouseViewBeans = new ArrayList<WarehouseViewBean>();
        if (warehouses != null) {
            for (Iterator<Warehouse> iterator = warehouses.iterator(); iterator.hasNext();) {
                Warehouse warehouse = (Warehouse) iterator.next();
                warehouseViewBeans.add(buildViewBeanWarehouse(requestData, warehouse));
            }
        }
        return warehouseViewBeans;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

        return retailerService.saveOrUpdateRetailer(retailer);
  }

    public Warehouse createOrUpdateWarehouse(final RequestData requestData, Warehouse warehouse, final WarehouseForm warehouseForm) {
        if (warehouse == null) {
            warehouse = new Warehouse();
            Set<WarehouseMarketAreaRel> warehouseMarketAreas = new HashSet<WarehouseMarketAreaRel>();
            WarehouseMarketAreaRel warehouseMarketArea = new WarehouseMarketAreaRel();
            warehouseMarketArea.setMarketArea(requestData.getMarketArea());
            warehouseMarketAreas.add(warehouseMarketArea);
            warehouse.setWarehouseMarketAreaRels(warehouseMarketAreas);
        }
        if (StringUtils.isNotEmpty(warehouseForm.getCode())) {
            warehouse.setCode(warehouseForm.getCode());
        }
        if (StringUtils.isNotEmpty(warehouseForm.getName())) {
            warehouse.setName(warehouseForm.getName());
        }
        warehouse.setDescription(warehouseForm.getDescription());

        warehouse.setAddress1(warehouseForm.getAddress1());
        warehouse.setAddress2(warehouseForm.getAddress2());
        warehouse.setAddressAdditionalInformation(warehouseForm.getAddressAdditionalInformation());
        warehouse.setPostalCode(warehouseForm.getPostalCode());
        warehouse.setCity(warehouseForm.getCity());
        warehouse.setStateCode(warehouseForm.getStateCode());
        warehouse.setCountryCode(warehouseForm.getCountryCode());

        warehouse.setLatitude(warehouseForm.getLatitude());
        warehouse.setLongitude(warehouseForm.getLongitude());
       
        Warehouse savedWarehouse = warehouseService.saveOrUpdateWarehouse(warehouse);
        return savedWarehouse;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

                    } else if (param instanceof AbstractRuleReferential) {
                        AbstractRuleReferential rule = (AbstractRuleReferential) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_RULE_CODE, handleParamValue(rule.getCode().toString()));
                        break;
                    } else if (param instanceof Warehouse) {
                        Warehouse warehouse = (Warehouse) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_WAREHOUSE_CODE, handleParamValue(warehouse.getCode().toString()));
                        break;
                    } else if (param instanceof DeliveryMethod) {
                        DeliveryMethod deliveryMethod = (DeliveryMethod) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_DELIVERY_METHOD_CODE, handleParamValue(deliveryMethod.getCode().toString()));
                        break;
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

      List<ValueBean> warehousesValues = new ArrayList<ValueBean>();
    try {
          List<Warehouse> warehouses = warehouseService.findWarehouses();
          if(warehouses != null){
            for (Iterator<Warehouse> iterator = warehouses.iterator(); iterator.hasNext();) {
                Warehouse warehouseIt = (Warehouse) iterator.next();
                final String warehouseId = warehouseIt.getId().toString();
          warehousesValues.add(new ValueBean(warehouseId, warehouseIt.getName()));
            }
            Collections.sort(warehousesValues, new Comparator<ValueBean>() {
          @Override
          public int compare(ValueBean o1, ValueBean o2) {
            return o1.getValue().compareTo(o2.getValue());
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

        if(StringUtils.isEmpty(warehouseCode)){
            final String urlRedirect = backofficeUrlService.generateUrl(BoUrls.WAREHOUSE_LIST, requestData);
            return new ModelAndView(new RedirectView(urlRedirect));
        }
       
        final Warehouse warehouse = warehouseService.getWarehouseByCode(warehouseCode);

        // SANITY CHECK
        if(warehouse != null){
            modelAndView.addObject(ModelConstants.WAREHOUSE_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanWarehouse(requestData, warehouse));
        } else {
            final String url = requestUtil.getLastRequestUrl(request);
            return new ModelAndView(new RedirectView(url));
        }
       
        model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.WAREHOUSE_LIST, requestData));
       
        final List<DeliveryMethodViewBean> deliveryMethodViewBeans = new ArrayList<DeliveryMethodViewBean>();
        final List<DeliveryMethod> deliveryMethods = deliveryMethodService.findDeliveryMethodsByWarehouseId(warehouse.getId());
        for (Iterator<DeliveryMethod> iterator = deliveryMethods.iterator(); iterator.hasNext();) {
            DeliveryMethod deliveryMethod = (DeliveryMethod) iterator.next();
            deliveryMethodViewBeans.add(backofficeViewBeanFactory.buildViewBeanDeliveryMethod(requestUtil.getRequestData(request), deliveryMethod));
        }
        request.setAttribute(ModelConstants.DELIVERY_METHODS_VIEW_BEAN, deliveryMethodViewBeans);

        Object[] params = {warehouse.getName() + " (" + warehouse.getCode() + ")"};
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.WAREHOUSE_DETAILS.getKey(), params);

        return modelAndView;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Warehouse

        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String warehouseCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_WAREHOUSE_CODE);
        if(StringUtils.isNotEmpty(warehouseCode)){
            // EDIT MODE
            final Warehouse warehouse = warehouseService.getWarehouseByCode(warehouseCode);

            WarehouseViewBean warehouseViewBean = backofficeViewBeanFactory.buildViewBeanWarehouse(requestData, warehouse);
            request.setAttribute(ModelConstants.WAREHOUSE_VIEW_BEAN, warehouseViewBean);

            Object[] params = {warehouse.getName() + " (" + warehouse.getCode() + ")"};
            overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.WAREHOUSE_EDIT.getKey(), params);

            model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.WAREHOUSE_DETAILS, requestData, warehouse));
        } else {
            // ADD MODE
View Full Code Here

Examples of org.openbravo.model.common.enterprise.Warehouse

        org.setName(getNewName() + "_" + org.getName());
      } else {
        org.setName(replace(org.getName(), originalName));
      }
    } else if (bob instanceof Warehouse) {
      final Warehouse wh = (Warehouse) bob;
      if (wh.getName().indexOf(originalName) == -1) {
        wh.setName(getNewName() + "_" + wh.getName());
      } else {
        wh.setName(replace(wh.getName(), originalName));
      }
      // } else if (bob instanceof GLCategory) {
      // final GLCategory glCategory = (GLCategory) bob;
      // glCategory.setName(replace(glCategory.getName(), originalName));
      // } else if (bob instanceof DocumentType) {
View Full Code Here

Examples of org.radargun.stages.tpcc.domain.Warehouse

      String d_name;
      long namecnt;
      String new_c_last;
      String c_data = null, c_new_data, h_data;

      Warehouse w = new Warehouse();
      w.setW_id(w_id);

      boolean found = w.load(basicCache);
      if (!found) throw new ElementNotFoundException("W_ID=" + w_id + " not found!");
      w.setW_ytd(h_amount);
      w.store(basicCache);

      District d = new District();
      d.setD_id(d_id);
      d.setD_w_id(w_id);
      found = d.load(basicCache);
      if (!found) throw new ElementNotFoundException("D_ID=" + d_id + " D_W_ID=" + w_id + " not found!");

      d.setD_ytd(h_amount);
      d.store(basicCache);

      Customer c = null;

      if (c_by_name) {
         new_c_last = c_last;
         List cList = null;
         cList = CustomerDAC.loadByCLast(basicCache, c_w_id, c_d_id, new_c_last);

         if (cList == null || cList.isEmpty())
            throw new ElementNotFoundException("C_LAST=" + c_last + " C_D_ID=" + c_d_id + " C_W_ID=" + c_w_id + " not found!");

         Collections.sort(cList);

         namecnt = cList.size();

         if (namecnt % 2 == 1) namecnt++;
         Iterator<Customer> itr = cList.iterator();

         for (int i = 1; i <= namecnt / 2; i++) {
            c = itr.next();
         }
      } else {
         c = new Customer();
         c.setC_id(c_id);
         c.setC_d_id(c_d_id);
         c.setC_w_id(c_w_id);
         found = c.load(basicCache);
         if (!found)
            throw new ElementNotFoundException("C_ID=" + c_id + " C_D_ID=" + c_d_id + " C_W_ID=" + c_w_id + " not found!");
      }

      c.setC_balance(c.getC_balance() + h_amount);
      if (c.getC_credit().equals("BC")) {

         c_data = c.getC_data();

         c_new_data = c.getC_id() + " " + c_d_id + " " + c_w_id + " " + d_id + " " + w_id + " " + h_amount + " |";
         if (c_data.length() > c_new_data.length()) {
            c_new_data += c_data.substring(0, c_data.length() - c_new_data.length());
         } else {
            c_new_data += c_data;
         }

         if (c_new_data.length() > 500) c_new_data = c_new_data.substring(0, 500);

         c.setC_data(c_new_data);
         c.store(basicCache);
      } else {
         c.store(basicCache);
      }

      w_name = w.getW_name();
      d_name = d.getD_name();

      if (w_name.length() > 10) w_name = w_name.substring(0, 10);
      if (d_name.length() > 10) d_name = d_name.substring(0, 10);
      h_data = w_name + "    " + d_name;
View Full Code Here

Examples of supplychain.warehouse.Warehouse

    public void purchaseGoods() {
       
        Retailer retailerImpl = new JavaRetailerComponentImpl();
        System.out.println("Created a retailer from Customer " + retailerImpl);
       
        Warehouse warehouseImpl = new JavaWarehouseComponentImpl();
        System.out.println("Created a warehouse from Customer " + warehouseImpl);

        outstandingOrderCount++;
        retailer.submitOrder("Order");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.