Package org.hoteia.qalingo.core.domain

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


        retailerCustomerRate.setDateUpdate(new Date());
        if (retailerCustomerRate.getId() != null) {
            if(em.contains(retailerCustomerRate)){
                em.refresh(retailerCustomerRate);
            }
            RetailerCustomerRate mergedRetailerCustomerRate = em.merge(retailerCustomerRate);
            em.flush();
            return mergedRetailerCustomerRate;
        } else {
            em.persist(retailerCustomerRate);
            return retailerCustomerRate;
View Full Code Here


   
    final Retailer retailer = retailerService.getRetailerByCode(currentMarketArea.getId(), currentRetailer.getId(), retailerCode);
    final Customer customer = requestData.getCustomer();
   
    if (qualityOfService != 0) {
      RetailerCustomerRate retailerCustomerRate = new RetailerCustomerRate();
      retailerCustomerRate.setRate(qualityOfService);
      retailerCustomerRate.setRetailerId(retailer.getId());
      retailerCustomerRate.setCustomerId(customer.getId());
      retailerCustomerRate.setType("QUALITY_OF_SERVICE");
      retailerService.saveOrUpdateRetailerCustomerRate(retailerCustomerRate);
    }
   
    if (ratioQualityPrice != 0) {
      RetailerCustomerRate retailerCustomerRate = new RetailerCustomerRate();
      retailerCustomerRate.setRate(ratioQualityPrice);
      retailerCustomerRate.setRetailerId(retailer.getId());
      retailerCustomerRate.setCustomerId(customer.getId());
      retailerCustomerRate.setType("RATIO_QUALITY_PRICE");
      retailerService.saveOrUpdateRetailerCustomerRate(retailerCustomerRate);
    }
   
    if (priceScore != 0) {
      RetailerCustomerRate retailerCustomerRate = new RetailerCustomerRate();
      retailerCustomerRate.setRate(priceScore);
      retailerCustomerRate.setRetailerId(retailer.getId());
      retailerCustomerRate.setCustomerId(customer.getId());
      retailerCustomerRate.setType("PRICE_SCORE");
      retailerService.saveOrUpdateRetailerCustomerRate(retailerCustomerRate);
    }
   
    if (StringUtils.isNotEmpty(retailerCommentForm.getComment())) {
      RetailerCustomerComment retailerCustomerComment = new RetailerCustomerComment();
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.RetailerCustomerRate

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.