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();