public double getPrize() { double totalPrize = 0; int prize = 0; Integer unit = this.getNormalOneWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.NormalOne.getPrize(); totalPrize += unit * prize; } unit = this.getRandomTwoWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.RandomTwo.getPrize(); totalPrize += unit * prize; } unit = this.getForeTwoGroupWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.ForeTwoGroup.getPrize(); totalPrize += unit * prize; } unit = this.getForeTwoDirectWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.ForeTwoDirect.getPrize(); totalPrize += unit * prize; } unit = this.getRandomThreeWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.RandomThree.getPrize(); totalPrize += unit * prize; } unit = this.getForeThreeGroupWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.ForeThreeGroup.getPrize(); totalPrize += unit * prize; } unit = this.getForeThreeDirectWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.ForeThreeDirect.getPrize(); totalPrize += unit * prize; } unit = this.getRandomFourWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.RandomFour.getPrize(); totalPrize += unit * prize; } unit = this.getRandomFiveWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.RandomFive.getPrize(); totalPrize += unit * prize; } unit = this.getRandomSixWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.RandomSix.getPrize(); totalPrize += unit * prize; } unit = this.getRandomSevenWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.RandomSeven.getPrize(); totalPrize += unit * prize; } unit = this.getRandomEightWinUnits(); if (unit != null && unit > 0) { prize = SdEl11to5PlayType.RandomEight.getPrize(); totalPrize += unit * prize; } return totalPrize; }
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; }
/** * 奖金描述 * * @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; }