Ejemplo n.º 1
0
  public List<WinItem> getWinItemList() {
    List<WinItem> list = new ArrayList<WinItem>();

    Integer unit = this.getNormalOneWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.NormalOne.getTypeName(), unit));
    }

    unit = this.getRandomTwoWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.RandomTwo.getTypeName(), unit));
    }

    unit = this.getForeTwoGroupWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.ForeTwoGroup.getTypeName(), unit));
    }
    unit = this.getForeTwoDirectWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.ForeTwoDirect.getTypeName(), unit));
    }
    unit = this.getRandomThreeWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.RandomThree.getTypeName(), unit));
    }

    unit = this.getForeThreeGroupWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.ForeThreeGroup.getTypeName(), unit));
    }

    unit = this.getForeThreeDirectWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.ForeThreeDirect.getTypeName(), unit));
    }

    unit = this.getRandomFourWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.RandomFour.getTypeName(), unit));
    }

    unit = this.getRandomFiveWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.RandomFive.getTypeName(), unit));
    }

    unit = this.getRandomSixWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.RandomSix.getTypeName(), unit));
    }

    unit = this.getRandomSevenWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.RandomSeven.getTypeName(), unit));
    }

    unit = this.getRandomEightWinUnits();
    if (unit != null && unit > 0) {
      list.add(new WinItem(SdEl11to5PlayType.RandomEight.getTypeName(), unit));
    }

    return list;
  }
Ejemplo n.º 2
0
  /**
   * 奖金描述
   *
   * @return
   */
  public String getPrizeDetail() {
    VariableString varWonLineText = new VariableString(prizeTemplate, null);
    String prizeDesc = "";
    int prize = 0;
    Integer unit = this.getNormalOneWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.NormalOne.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.NormalOne.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    unit = this.getRandomTwoWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.RandomTwo.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.RandomTwo.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    unit = this.getForeTwoGroupWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.ForeTwoGroup.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.ForeTwoGroup.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    unit = this.getForeTwoDirectWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.ForeTwoDirect.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.ForeTwoDirect.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    unit = this.getRandomThreeWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.RandomThree.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.RandomThree.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    unit = this.getForeThreeGroupWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.ForeThreeGroup.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.ForeThreeGroup.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    unit = this.getForeThreeDirectWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.ForeThreeDirect.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.ForeThreeDirect.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    unit = this.getRandomFourWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.RandomFour.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.RandomFour.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    unit = this.getRandomFiveWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.RandomFive.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.RandomFive.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }

    unit = this.getRandomSixWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.RandomSix.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.RandomSix.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }

    unit = this.getRandomSevenWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.RandomSeven.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.RandomSeven.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }

    unit = this.getRandomEightWinUnits();
    if (unit != null && unit > 0) {
      prize = SdEl11to5PlayType.RandomEight.getPrize();
      varWonLineText.setVar("PRIZEITEM", SdEl11to5PlayType.RandomEight.getTypeName());
      varWonLineText.setVar("WINUNITS", unit);
      varWonLineText.setVar("PRIZE", prize >= 10000.0d ? unit * prize * 0.8d : unit * prize);
      prizeDesc += varWonLineText.toString();
    }
    return prizeDesc;
  }