Package org.zeroexchange.model.user.assessment

Examples of org.zeroexchange.model.user.assessment.BusinessQuality


            }
        }

        //Update the assessment
        if(allowReputationUpdate) {
            BusinessQuality assessment = new BusinessQuality();
            assessment.setAssessDate(date.getTime());
            assessment.setCommentary(businessQualityComment);
            assessment.setEvaluable(supplier);
            assessment.setValuer(evaluator);
           
            BigDecimal partnersDealsNumber = BigDecimal.valueOf(bqDAO.getPartnersDealsNumber(
                    supplier.getId(), evaluator.getId()) + 1);
            BigDecimal prevQuality = bqDAO.getAvarageAssessment(supplier.getId());
            BigDecimal effectiveBusinessQuality =
                    businessQuality.divide(partnersDealsNumber, RoundingMode.HALF_UP).add(
                            prevQuality.multiply(BigDecimal.ONE.subtract(BigDecimal.ONE.divide(partnersDealsNumber, RoundingMode.HALF_UP))));
            assessment.setValue(effectiveBusinessQuality);
            assessment.setInitialValue(businessQuality);
           
            bqDAO.save(assessment);
        }
       
View Full Code Here

TOP

Related Classes of org.zeroexchange.model.user.assessment.BusinessQuality

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.