/// <summary> /// 计算中奖情况 /// </summary> /// <param name="issueCode"></param> /// <param name="openResult"></param> /// <param name="item"></param> protected override void IssueCalculate(string issueCode, string openResult, BasicModel.LotteryBasic.BetDetail item) { //大小单双6,8,0,1,5 单双单 var res = openResult.Remove(0, 4).Split(',').Select(m => Convert.ToInt32(m)).ToList(); var temp = item.BetContent.Split(','); var bd = res[0] >= 5 ? Da.ToString() : Xiao.ToString(); var bds = res[0] % 2 == 0 ? Shuang.ToString() : Dan.ToString(); var sd = res[1] >= 5 ? Da.ToString() : Xiao.ToString(); var sds = res[1] % 2 == 0 ? Shuang.ToString(): Dan.ToString(); var gd = res[2] >= 5 ? Da.ToString(): Xiao.ToString(); var gds = res[2] % 2 == 0 ? Shuang.ToString() : Dan.ToString(); var count = 0; count = temp[0].Split('-').Count(m => "-" + m.ToString() == bd || "-" + m.ToString() == bds) * temp[1].Split('-').Count(m => "-" + m.ToString() == sd || "-" + m.ToString() == sds) * temp[2].Split('-').Count(m => "-" + m.ToString() == gd || "-" + m.ToString() == gds); if (count > 0) { item.IsMatch = true; var stepAmt = 0m; item.WinMoney = TotalWinMoney(item, GetBaseAmt(item, ref stepAmt), stepAmt, count); } }
/// <summary> /// 计算中奖情况 /// </summary> /// <param name="issueCode"></param> /// <param name="openResult"></param> /// <param name="item"></param> protected override void IssueCalculate(string issueCode, string openResult, BasicModel.LotteryBasic.BetDetail item) { //大小单双1,2,3,4,5 openResult = openResult.Replace(",", ""); if (openResult.Length == 5) { openResult = openResult.Remove(0, 3); } else { openResult = openResult.Remove(0, 1); } var res = openResult.Select(m => Convert.ToInt32(m.ToString())); var temp = item.BetContent.Split(','); var wd = res.First() >= 5 ? Da.ToString() : Xiao.ToString(); var wds = res.First() % 2 == 0 ? Shuang.ToString() : Dan.ToString(); var qd = res.Last() >= 5 ?Da.ToString(): Xiao.ToString(); var qds = res.Last() % 2 == 0 ? Shuang.ToString() : Dan.ToString(); var count = 0; count = temp[0].Split('-').Count(m => "-" + m.ToString() == wd || "-" + m.ToString() == wds) * temp[1].Split('-').Count(m => "-" + m.ToString() == qd || "-" + m.ToString() == qds); if (count > 0) { item.IsMatch = true; var stepAmt = 0m; item.WinMoney = TotalWinMoney(item, GetBaseAmt(item, ref stepAmt), stepAmt, count); } }