Examples of SalesStatistic


Examples of no.ugland.utransprod.model.SalesStatistic

  @Test
  public void skal() throws Exception {
    Integer year = 2011;
    Integer week = 6;
    String productAreaName = "Garasje villa";
    SalesStatistic statistic = salesWebManager.generateSalesStatistics(
        year, week, productAreaName);
    assertNotNull(statistic);
  }
View Full Code Here

Examples of no.ugland.utransprod.model.SalesStatistic

  public void getSalesdataForGarasjeVilla2010_08() throws ProTransException {

    Integer year = 2010;
    Integer week = 16;
    String productAreaName = "Garasje villa";
    SalesStatistic statistic = salesWebManager.generateSalesStatistics(
        year, week, productAreaName);
    assertNotNull(statistic);
    assertEquals("Garasje villa", statistic.getProductAreaName());
    assertEquals(Integer.valueOf(107), statistic.getNumberOfOffer());
    assertEquals(Integer.valueOf(37), statistic.getNumberOfOrder());
    assertEquals(Integer.valueOf(20), statistic.getNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(3119424), statistic.getSumOwnProuction());
    assertEquals(BigDecimal.valueOf(0.3231), statistic.getSumDG());
    // assertEquals(BigDecimal.valueOf(0).setScale(2),
    // statistic.getSumDGProcent());
    assertEquals(BigDecimal.valueOf(32.31), statistic.getSumDGProcent());
    assertEquals(BigDecimal.valueOf(0), statistic.getSaleBudget());
    assertEquals(SalesGoal.GOAL_0, statistic.getSalesGoalWeek());
    assertEquals(BigDecimal.valueOf(12465248), statistic.getOrderReserve());

    assertEquals(BigDecimal.valueOf(22369809), statistic
        .getAccumulatedSumOwnProduction());
    assertEquals(BigDecimal.valueOf(0.3329), statistic
        .getAccumulatedSumDG());
    assertEquals(BigDecimal.valueOf(33.29).setScale(2), statistic
        .getAccumulatedSumDGProcent());
    assertEquals(Integer.valueOf(1303), statistic
        .getAccumulatedNumberOfOffer());
    assertEquals(Integer.valueOf(257), statistic
        .getAccumulatedNumberOfOrder());
    assertEquals(Integer.valueOf(97), statistic
        .getAccumulatedNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(0), statistic
        .getAccumulatedSaleBudget());
    assertEquals(SalesGoal.GOAL_0, statistic.getSalesGoalYear());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.SalesStatistic

  public void getSalesdataForGarasjeVilla2010_01() throws ProTransException {

    Integer year = 2010;
    Integer week = 1;
    String productAreaName = "Garasje villa";
    SalesStatistic statistic = salesWebManager.generateSalesStatistics(
        year, week, productAreaName);
    assertNotNull(statistic);
    assertEquals("Garasje villa", statistic.getProductAreaName());
    assertEquals(Integer.valueOf(50), statistic.getNumberOfOffer());
    assertEquals(Integer.valueOf(32), statistic.getNumberOfOrder());
    assertEquals(Integer.valueOf(5), statistic.getNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(3011288), statistic
        .getSumOwnProuction());
    assertEquals(BigDecimal.valueOf(0.3290).setScale(4), statistic.getSumDG());
    assertEquals(BigDecimal.valueOf(32.90).setScale(2), statistic
        .getSumDGProcent());

    assertEquals(BigDecimal.valueOf(3011288), statistic
        .getAccumulatedSumOwnProduction());
    assertEquals(BigDecimal.valueOf(0.3290).setScale(4), statistic
        .getAccumulatedSumDG());
    assertEquals(BigDecimal.valueOf(32.90).setScale(2), statistic
        .getAccumulatedSumDGProcent());
    assertEquals(Integer.valueOf(50), statistic
        .getAccumulatedNumberOfOffer());
    assertEquals(Integer.valueOf(32), statistic
        .getAccumulatedNumberOfOrder());
    assertEquals(Integer.valueOf(5), statistic
        .getAccumulatedNumberOfConfirmedOrder());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.SalesStatistic

    Integer year = 2010;
    ;
    Integer week = 8;
    String productAreaName = "Garasje villa";
    SalesStatistic statistic = salesWebManager.generateSalesStatistics(
        year, week, productAreaName);
    assertNotNull(statistic);
    assertEquals("Garasje villa", statistic.getProductAreaName());
    assertEquals(Integer.valueOf(56), statistic.getNumberOfOffer());
    assertEquals(Integer.valueOf(6), statistic.getNumberOfOrder());
    assertEquals(Integer.valueOf(3), statistic.getNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(484730), statistic.getSumOwnProuction());
    assertEquals(BigDecimal.valueOf(0.3178), statistic.getSumDG());
    // assertEquals(BigDecimal.valueOf(0).setScale(2),
    // statistic.getSumDGProcent());
    assertEquals(BigDecimal.valueOf(31.78), statistic.getSumDGProcent());
    assertEquals(BigDecimal.valueOf(0), statistic.getSaleBudget());
    assertEquals(SalesGoal.GOAL_0, statistic.getSalesGoalWeek());
    assertEquals(BigDecimal.valueOf(12465248), statistic.getOrderReserve());

    assertEquals(BigDecimal.valueOf(7479218), statistic
        .getAccumulatedSumOwnProduction());
    assertEquals(BigDecimal.valueOf(0.3364), statistic
        .getAccumulatedSumDG());
    assertEquals(BigDecimal.valueOf(33.64).setScale(2), statistic
        .getAccumulatedSumDGProcent());
    assertEquals(Integer.valueOf(505), statistic
        .getAccumulatedNumberOfOffer());
    assertEquals(Integer.valueOf(85), statistic
        .getAccumulatedNumberOfOrder());
    assertEquals(Integer.valueOf(26), statistic
        .getAccumulatedNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(0), statistic
        .getAccumulatedSaleBudget());
    assertEquals(SalesGoal.GOAL_0, statistic.getSalesGoalYear());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.SalesStatistic

   
   
    Integer year=2010;;
    Integer week=16;
    String productAreaName="Garasje villa";
    SalesStatistic statistic = salesWebManager.generateSalesStatistics(year,week,productAreaName);
    assertNotNull(statistic);
    assertEquals("Garasje villa", statistic.getProductAreaName());
    assertEquals(Integer.valueOf(107), statistic.getNumberOfOffer());
    assertEquals(Integer.valueOf(37), statistic.getNumberOfOrder());
    assertEquals(Integer.valueOf(20), statistic.getNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(3119424), statistic.getSumOwnProuction());
    assertEquals(BigDecimal.valueOf(0.3231), statistic.getSumDG());
    //assertEquals(BigDecimal.valueOf(0).setScale(2), statistic.getSumDGProcent());
    assertEquals(BigDecimal.valueOf(32.31), statistic.getSumDGProcent());
    assertEquals(BigDecimal.valueOf(1000000), statistic.getSaleBudget());
    assertEquals(SalesGoal.GOAL_100, statistic.getSalesGoalWeek());
    assertEquals(BigDecimal.valueOf(12465248), statistic.getOrderReserve());
   
   
    assertEquals(BigDecimal.valueOf(22369809), statistic.getAccumulatedSumOwnProduction());
    assertEquals(BigDecimal.valueOf(0.3329), statistic.getAccumulatedSumDG());
    assertEquals(BigDecimal.valueOf(33.29).setScale(2), statistic.getAccumulatedSumDGProcent());
    assertEquals(Integer.valueOf(1303), statistic.getAccumulatedNumberOfOffer());
    assertEquals(Integer.valueOf(257), statistic.getAccumulatedNumberOfOrder());
    assertEquals(Integer.valueOf(97), statistic.getAccumulatedNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(15030000), statistic.getAccumulatedSaleBudget());
    assertEquals(SalesGoal.GOAL_100, statistic.getSalesGoalYear());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.SalesStatistic

  public void getSalesdataForGarasjeVilla2010_01() throws ProTransException{
   
    Integer year=2010;;
    Integer week=1;
    String productAreaName="Garasje villa";
    SalesStatistic statistic = salesWebManager.generateSalesStatistics(year,week,productAreaName);
    assertNotNull(statistic);
    assertEquals("Garasje villa", statistic.getProductAreaName());
    assertEquals(Integer.valueOf(50), statistic.getNumberOfOffer());
    assertEquals(Integer.valueOf(32), statistic.getNumberOfOrder());
    assertEquals(Integer.valueOf(5), statistic.getNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(3011288), statistic.getSumOwnProuction());
    assertEquals(BigDecimal.valueOf(0.3290).setScale(4), statistic.getSumDG());
    assertEquals(BigDecimal.valueOf(32.90).setScale(2), statistic.getSumDGProcent());
   
    assertEquals(BigDecimal.valueOf(3011288), statistic.getAccumulatedSumOwnProduction());
    assertEquals(BigDecimal.valueOf(0.3290).setScale(4), statistic.getAccumulatedSumDG());
    assertEquals(BigDecimal.valueOf(32.90).setScale(2), statistic.getAccumulatedSumDGProcent());
    assertEquals(Integer.valueOf(50), statistic.getAccumulatedNumberOfOffer());
    assertEquals(Integer.valueOf(32), statistic.getAccumulatedNumberOfOrder());
    assertEquals(Integer.valueOf(5), statistic.getAccumulatedNumberOfConfirmedOrder());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.SalesStatistic

   
   
    Integer year=2010;;
    Integer week=8;
    String productAreaName="Garasje villa";
    SalesStatistic statistic = salesWebManager.generateSalesStatistics(year,week,productAreaName);
    assertNotNull(statistic);
    assertEquals("Garasje villa", statistic.getProductAreaName());
    assertEquals(Integer.valueOf(56), statistic.getNumberOfOffer());
    assertEquals(Integer.valueOf(6), statistic.getNumberOfOrder());
    assertEquals(Integer.valueOf(3), statistic.getNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(484730), statistic.getSumOwnProuction());
    assertEquals(BigDecimal.valueOf(0.3178), statistic.getSumDG());
    //assertEquals(BigDecimal.valueOf(0).setScale(2), statistic.getSumDGProcent());
    assertEquals(BigDecimal.valueOf(31.78), statistic.getSumDGProcent());
    assertEquals(BigDecimal.valueOf(30000), statistic.getSaleBudget());
    assertEquals(SalesGoal.GOAL_100, statistic.getSalesGoalWeek());
    assertEquals(BigDecimal.valueOf(12465248), statistic.getOrderReserve());
   
   
    assertEquals(BigDecimal.valueOf(7479218), statistic.getAccumulatedSumOwnProduction());
    assertEquals(BigDecimal.valueOf(0.3364), statistic.getAccumulatedSumDG());
    assertEquals(BigDecimal.valueOf(33.64).setScale(2), statistic.getAccumulatedSumDGProcent());
    assertEquals(Integer.valueOf(505), statistic.getAccumulatedNumberOfOffer());
    assertEquals(Integer.valueOf(85), statistic.getAccumulatedNumberOfOrder());
    assertEquals(Integer.valueOf(26), statistic.getAccumulatedNumberOfConfirmedOrder());
    assertEquals(BigDecimal.valueOf(7030000), statistic.getAccumulatedSaleBudget());
    assertEquals(SalesGoal.GOAL_100, statistic.getSalesGoalYear());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.SalesStatistic

        .findByName(productAreaName);
    Periode periode = new Periode(year, week, week);
    // henter for gjeldende uke
    Multimap<ProbabilityEnum, SaleReportSum> salesMap = salesVManager
        .getAllReportData(productArea, periode);
    SalesStatistic salesStatistic = new SalesStatistic();
    salesStatistic.setProductAreaName(productAreaName);
    salesStatistic = setNumberOfAndSumOrder(salesMap, salesStatistic);

    debugSalesStatistic(salesStatistic, productAreaName, week);

    // henter for hele �ret dersom etter uke 1
    if (week > 1) {
      periode = new Periode(year, 1, week - 1);
      LOGGER
          .debug("Periode: "
              + periode.getFormattetYearFromWeekToWeek());
      salesMap = salesVManager.getAllReportData(productArea, periode);
      salesStatistic = setAccumulatedNumberOfAndSumOrder(salesMap,
          salesStatistic);
    } else {// setter akkumulert til uke dersmo uke 1
      salesStatistic.setAccumulatedLikeWeekSum();
    }

    salesStatistic = setSalesBudget(year, week, productArea, salesStatistic);
    salesStatistic = setOrderReserve(salesStatistic, productArea);
    return salesStatistic;
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.