public static decimal GetAward(string PrizeContent, Operation_Record record, List <Animal_Info> Animal_Info_List, ref List <string> AwardList) { decimal getdecimal = 0; try { List <Animal_Info_S> Detail_Ss = Animal_Info_S.GetBase(record.Buy_Content, Animal_Info_List, record.BuyPayReturn); var cont7 = PrizeContent.Length >= 7 ? Split_Hepler.str_to_stringss(PrizeContent)[6] : "0"; //特奖 int conti7 = Convert.ToInt32(cont7); foreach (var item in Detail_Ss) { if (item.GlobeCodeList.Contains(conti7)) { getdecimal += (decimal)(item.PayReturn * record.UnitPrice); AwardList.Add(item.Name); } } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }
public static decimal GetAward(string PrizeContent, Operation_Record record, List <Globe> Globe_List, ref List <string> AwardList) { decimal getdecimal = 0; try { List <Globe_S> globes = Globe_S.GetBase(record.Buy_Content, Globe_List, record.BuyPayReturn); var contList6 = Split_Hepler.str_to_ints(PrizeContent).ToList(); contList6.RemoveAt(contList6.Count - 1); List <int> contents = Split_Hepler.str_to_ints(record.Buy_Content).ToList(); foreach (var item in contList6) { if (contents.Contains(item)) { Globe_S globe_ss = globes.FirstOrDefault(i => i.Code == item); if (globe_ss != null) { getdecimal += (decimal)(globe_ss.PayReturn * record.UnitPrice); AwardList.Add(globe_ss.Name); } } } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }
public static decimal GetAward(string PrizeContent, Operation_Record record) { decimal getdecimal = 0; try { List <int> contents = Split_Hepler.str_to_ints(record.Buy_Content).ToList(); List <int> contListall = Split_Hepler.str_to_ints(PrizeContent).ToList(); int count = 0; foreach (var content in contents) { if (!contListall.Contains(content)) { count++; } } if (count >= contents.Count) { getdecimal += (decimal)(record.MinPayReturn * record.UnitPrice); } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }
public static decimal GetAward(Globe_Clue clue, string PrizeContent, Operation_Record record, List <Globe> Globe_List, List <Size_SpecialNormal> Size_Special_List, ref List <Araw_Return_S> Araw_Return_Ss, ref List <string> NoAwardList, ref List <string> AwardList, ref int paytype) { decimal getdecimal = 0; try { List <Globe_S> globes = Globe_S.GetBase(record.Buy_Content, Globe_List, record.BuyPayReturn); List <Size_NormalS> Size_Normals = Size_NormalS.GetBase(record.Buy_Content2, Size_Special_List, record.BuyPayReturn2); var cont1_6 = PrizeContent.Length >= 7 ? Split_Hepler.str_to_stringss(PrizeContent)[(int)clue.Second_Type - 1] : "0"; //特奖 int conti1_6 = Convert.ToInt32(cont1_6); if (!string.IsNullOrEmpty(record.Buy_Content)) { paytype = 0; List <int> contents = Split_Hepler.str_to_ints(record.Buy_Content).ToList(); if (contents.Contains(conti1_6)) { Globe_S globe_ss = globes.FirstOrDefault(i => i.Code == conti1_6); if (globe_ss != null) { getdecimal += (decimal)(globe_ss.PayReturn * record.UnitPrice); AwardList.Add(globe_ss.Name); } } } else if (!string.IsNullOrEmpty(record.Buy_Content2)) { paytype = 1; List <int> contents2 = Split_Hepler.str_to_ints(record.Buy_Content2).ToList(); foreach (var buycontent in contents2) { Size_NormalS size_NormalS = Size_Normals.FirstOrDefault(i => i.Code == buycontent); if (size_NormalS.GlobeCodeList.Contains(conti1_6)) { //if (conti1_6 == 49 && size_NormalS.IsEnable == (int)IsEnable.Enable) //{ // //使用和局 // Araw_Return_Ss.Add(new Araw_Return_S() { Name = size_NormalS.Name, Araw_Money = (decimal)record.UnitPrice }); //} //else //{ getdecimal += (decimal)(size_NormalS.PayReturn * record.UnitPrice); AwardList.Add(size_NormalS.Name); //} } else { NoAwardList.Add(size_NormalS.Name); } } } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }
public static decimal GetAward(string PrizeContent, Operation_Record record, List <Animal_Info> Animal_Info_List, List <Detail> Detail_List, ref List <string> AwardList) { decimal getdecimal = 0; try { List <Animal_Info_S> Animal_Info_Ss = Animal_Info_S.GetBase(record.Buy_Content, Animal_Info_List, record.BuyPayReturn); List <Detail_S> Detail_Ss = Detail_S.GetBase(record.Buy_Content2, Detail_List, record.BuyPayReturn2); var contList7 = Split_Hepler.str_to_ints(PrizeContent).ToList(); foreach (var content in Animal_Info_Ss) { foreach (var item in contList7) { //Animal_Info_S animal_Info_S = Animal_Info_Ss.FirstOrDefault(i => i.Code == content); if (content.GlobeCodeList.Contains(item)) { getdecimal += (decimal)(content.PayReturn * record.UnitPrice); AwardList.Add(content.Name); break; } } } foreach (var content in Detail_Ss) { foreach (var item in contList7) { //Detail_S detail_S = Detail_Ss.FirstOrDefault(i => i.Code == content); if (content.GlobeCodeList.Contains(item)) { getdecimal += (decimal)(content.PayReturn * record.UnitPrice); AwardList.Add(content.Name); break; } } } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }
public static Operation_Record_S Get_Operation_Record_S(Operation_Record record, Award_Public award, Globe_Clue clue, UserInfo user, List <Globe> Globe_List) { Operation_Record_S Operation_Record_S = new Operation_Record_S(); try { Operation_Record_S = new Operation_Record_S() { Id = (int)record.Id, AwardCode = (int)record.AwardCode, ClueCode = (int)record.ClueCode, Buy_Content = record.Buy_Content, Buy_Content2 = record.Buy_Content2, BuyPayReturn = record.BuyPayReturn, BuyPayReturn2 = record.BuyPayReturn2, UnitPrice = (int)record.UnitPrice, CreateTime = (DateTime)record.CreateTime, Operation_Time = (DateTime)record.Operation_Time, IsWin = (int)record.IsWin, UserID = record.UserID, Get_Money = (decimal)record.Get_Money, Araw_ReturnMoney = (decimal)record.Araw_ReturnMoney, Araw_RetrunContent = record.Araw_RetrunContent, Using_Money = (decimal)record.Using_Money, Return_Money = (decimal)record.Return_Money, Win_Money = (decimal)(record.Get_Money + record.Araw_ReturnMoney + record.Return_Money - record.Using_Money), Year = award.Year, award_Name = award.Name, PrizeContent = award.PrizeContent, First_Name = clue.First_Name, Second_Name = clue.Second_Name, user_Name = user.Name, GlobeList = Globe_S.GetBase(award.PrizeContent, Globe_List), }; } catch (Exception ex) { LogHelper.Error(ex); } return(Operation_Record_S); }
public static decimal GetAward(string PrizeContent, Operation_Record record, List <Size_Six> Size_Six_List, ref List <Araw_Return_S> Araw_Return_Ss, ref List <string> NoAwardList, ref List <string> AwardList) { decimal getdecimal = 0; try { //获取1-6买码对应数据 List <Size_Six_S> Size_Six_Ss = Size_Six_S.GetBase(record.Buy_Content, Size_Six_List, record.BuyPayReturn); //获取开奖六位数 List <int> contList6 = Split_Hepler.str_to_ints(PrizeContent).ToList(); contList6.RemoveAt(contList6.Count - 1); //对应指定的码特 int count = 1; foreach (var item in contList6) { foreach (var buyItem in Size_Six_Ss.Where(i => i.Award_Globe == count)) { if (buyItem.GlobeCodeList.Contains(item)) { //if (item == 49 && buyItem.IsEnable == (int)IsEnable.Enable) //{ // //使用和局 // Araw_Return_Ss.Add(new Araw_Return_S() { Name = buyItem.Name, Araw_Money = (decimal)record.UnitPrice }); //} //else //{ getdecimal += (decimal)(buyItem.PayReturn * record.UnitPrice); AwardList.Add(buyItem.Name); //} } else { NoAwardList.Add(buyItem.Name); } } count++; } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }
public static decimal GetAward(string PrizeContent, Operation_Record record, List <Wave> Wave_List, ref List <Araw_Return_S> Araw_Return_Ss, ref List <string> NoAwardList, ref List <string> AwardList) { decimal getdecimal = 0; try { List <Wave_S> Wave_Ss = Wave_S.GetBase(record.Buy_Content, Wave_List, record.BuyPayReturn); string cont7 = PrizeContent.Length >= 7 ? Split_Hepler.str_to_stringss(PrizeContent)[6] : "0"; //特奖 int conti7 = Convert.ToInt32(cont7); List <int> contents = Split_Hepler.str_to_ints(record.Buy_Content).ToList(); foreach (var wav_select in contents) { Wave_S wave_S = Wave_Ss.FirstOrDefault(i => i.Code == wav_select); if (wave_S != null) { if (wave_S.GlobeCodeList.Contains(conti7)) { //if (conti7 == 49) //{ // //使用和局 // Araw_Return_Ss.Add(new Araw_Return_S() { Name = wave_S.Name, Araw_Money = (decimal)record.UnitPrice }); //} //else //{ getdecimal += (decimal)(wave_S.PayReturn * record.UnitPrice); AwardList.Add(wave_S.Name); //} } else { NoAwardList.Add(wave_S.Name); } } } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }
public static JsonModel BuyGlobe_Group_Helper(string UserID, int AwardCode, int ClueCode, string Buy_Content, string Buy_Content2, int UnitPrice, decimal Using_Money, string BuyPayReturn, string BuyPayReturn2, float MinPayReturn, float MaxPayReturn) { JsonModel jsm = null; try { List <Operation_Record> Operation_Record_List = Constant.Operation_Record_List; List <UserInfo> UserInfo_List = Constant.UserInfo_List; UserInfo userInfo = UserInfo_List.FirstOrDefault(user => user.LoginName == Convert.ToString(UserID)); if (userInfo != null) { string pass = DESEncrypt.Decrypt(userInfo.Password, userInfo.Salt); if (userInfo.Money >= Using_Money) { Operation_Record Operation_Record = new Operation_Record() { Buy_Content = Buy_Content, Buy_Content2 = Buy_Content2, CreateUID = userInfo.LoginName, UnitPrice = UnitPrice, AwardCode = AwardCode, ClueCode = ClueCode, BuyPayReturn = BuyPayReturn, BuyPayReturn2 = BuyPayReturn2, UserID = UserID, Using_Money = Using_Money, MinPayReturn = (decimal)MinPayReturn, MaxPayReturn = (decimal)MaxPayReturn, Type = (int)DebtType.Group, Operation_Time = DateTime.Now, CreateTime = DateTime.Now, Get_Money = 0, Araw_ReturnMoney = 0, Return_Money = 0, EditUID = "", IsDelete = 0, IsEnable = (int)IsEnable.Enable, IsWin = (int)IsWinType.未开奖, PayUID = "", }; JsonModel jsmo = Constant.Operation_Record_S.Add(Operation_Record); if (jsmo.errNum == 0) { Operation_Record.Id = Convert.ToInt32(jsmo.retData); UserInfo userInfo_Clone = Constant.Clone <UserInfo>(userInfo); userInfo_Clone.Money -= Using_Money; jsm = Constant.UserInfo_S.Update(userInfo_Clone); if (jsm.errNum == 0) { userInfo.Money -= Using_Money; Constant.Operation_Record_List.Add(Operation_Record); //支出支入 //支出支入 Constant.MoneyAnsys(Operation_Record, Using_Money, userInfo, MoneyType.注, ""); } else { jsm = JsonModel.GetJsonModel(500, "下注失败"); } } else { jsm = JsonModel.GetJsonModel(500, "下注失败"); } } else { jsm = JsonModel.GetJsonModel(400, "您当前的余额不足"); } } else { jsm = JsonModel.GetJsonModel(300, "未经授权"); } } catch (Exception ex) { LogHelper.Error(ex); } return(jsm); }
public static void MoneyAnsys(Operation_Record Operation_Record , decimal Using_Money, UserInfo userInfo, MoneyType MoneyType, string Araw_RetrunContent) { try { List <Award_Public> Award_Public_List = Constant.Award_Public_List; List <Operation_Record> Operation_Record_List = Constant.Operation_Record_List; List <Globe_Clue> Globe_Clue_List = Constant.Globe_Clue_List; List <UserInfo> UserInfo_List = Constant.userInfo_List; List <Globe> Globe_List = Constant.Globe_List; List <MoneyLog> MoneyLog_List = Constant.MoneyLog_List; MoneyLog MoneyLog = MoneyLog = new MoneyLog() { UserID = userInfo.LoginName, UserName = userInfo.Name, O_Money = Using_Money, CreateTime = DateTime.Now, OperationType = (int)MoneyType, CreateUID = userInfo.LoginName, IsDelete = 0, IsEnable = (int)IsEnable.Enable, }; if (MoneyType == TLC_Model.Enums.MoneyType.充值) { MoneyLog.Type = (int)MoneyLogType.Add; MoneyLog.O_Content = "操作内容:" + "充值" + ";金额:" + Using_Money; } else if (MoneyType == TLC_Model.Enums.MoneyType.提现) { MoneyLog.Type = (int)MoneyLogType.Reduce; MoneyLog.O_Content = "操作内容:" + "提现" + ";金额:" + Using_Money; } else { //为了做支出支入做统计 Globe_Clue clue = Globe_Clue_List.FirstOrDefault(i => i.Code == Operation_Record.ClueCode); Award_Public Award_Public = Award_Public_List.FirstOrDefault(i => i.Code == Operation_Record.AwardCode); Operation_Record_S os = OperationManage.Get_Operation_Record_S(Operation_Record, Award_Public, clue, userInfo, Globe_List); OperationManage.SetContent(clue, os); switch (MoneyType) { case MoneyType.注: MoneyLog.Type = (int)MoneyLogType.Reduce; MoneyLog.O_Content = "操作内容:" + "下注->" + "年号->" + Award_Public.Year + "期号->" + Award_Public.Name + clue.First_Name + "->" + clue.Second_Name + "->下注内容(" + os.BuyDisplay + os.BuyDisplay2 + ")->下注单价(" + Operation_Record.UnitPrice + ")" + ";金额:" + Using_Money; break; case MoneyType.返还奖金: MoneyLog.Type = (int)MoneyLogType.Add; MoneyLog.O_Content = "操作内容:" + "返水->" + "年号->" + Award_Public.Year + "期号->" + Award_Public.Name + clue.First_Name + "->" + clue.Second_Name + "->下注内容(" + os.BuyDisplay + os.BuyDisplay2 + ")->下注单价(" + Operation_Record.UnitPrice + ")" + ";金额:" + Using_Money; break; case MoneyType.中奖: MoneyLog.Type = (int)MoneyLogType.Add; MoneyLog.O_Content = "操作内容:" + "中奖->" + "年号->" + Award_Public.Year + "期号->" + Award_Public.Name + clue.First_Name + "->" + clue.Second_Name + "->下注内容(" + os.BuyDisplay + os.BuyDisplay2 + ")->下注单价(" + Operation_Record.UnitPrice + ")" + ")->派奖内容【" + Araw_RetrunContent + "】" + ";金额:" + Using_Money; break; case MoneyType.综合: MoneyLog.Type = (int)MoneyLogType.Add; MoneyLog.O_Content = "操作内容:" + "和局->" + "年号->" + Award_Public.Year + "期号->" + Award_Public.Name + clue.First_Name + "->" + clue.Second_Name + "->下注内容(" + os.BuyDisplay + os.BuyDisplay2 + ")->下注单价(" + Operation_Record.UnitPrice + ")" + ")->派奖内容【" + Araw_RetrunContent + "】" + ";金额:" + Using_Money; break; case MoneyType.充值: default: break; } } var jsm = Constant.MoneyLog_S.Add(MoneyLog); if (jsm.errNum == 0) { MoneyLog.Id = Convert.ToInt32(jsm.retData); MoneyLog_List.Add(MoneyLog); } } catch (Exception ex) { LogHelper.Error(ex); } }
/// <summary> /// 结果处理 /// </summary> /// <param name="Award_Public"></param> /// <param name="record"></param> public static void AwardDealWidth(Award_Public Award_Public, Operation_Record record, string PrizeContent) { try { List <UserInfo> UserInfo_List = Constant.UserInfo_List; Globe_Clue clue = Constant.Globe_Clue_List.FirstOrDefault(i => i.Code == record.ClueCode); decimal getMoney = 0; List <Araw_Return_S> Araw_Return_Ss = new List <Araw_Return_S>(); List <string> NoAwardList = new List <string>(); List <string> AwardList = new List <string>(); int paytype = 0; if (!string.IsNullOrEmpty(PrizeContent)) { if (clue != null) { switch ((GlobeClueType)clue.First_Type) { case GlobeClueType.Special: getMoney = SpecialModel.GetAward(PrizeContent, record, Constant.Globe_List, Constant.Size_Special_List, ref Araw_Return_Ss, ref NoAwardList, ref AwardList, ref paytype); break; case GlobeClueType.Normal: getMoney = NormalModel.GetAward(PrizeContent, record, Constant.Globe_List, ref AwardList); break; case GlobeClueType.SpecialNormal: getMoney = SpecialNormalModel.GetAward(clue, PrizeContent, record, Constant.Globe_List, Constant.Size_SpecialNormal_List, ref Araw_Return_Ss, ref NoAwardList, ref AwardList, ref paytype); break; case GlobeClueType.NormalSix: getMoney = NormalSixModel.GetAward(PrizeContent, record, Constant.Size_Six_List, ref Araw_Return_Ss, ref NoAwardList, ref AwardList); break; case GlobeClueType.Line: getMoney = LineModel.GetAward(clue, PrizeContent, record, ref AwardList); break; case GlobeClueType.Wave: getMoney = WaveModel.GetAward(PrizeContent, record, Constant.Wave_List, ref Araw_Return_Ss, ref NoAwardList, ref AwardList); break; case GlobeClueType.Detail: getMoney = Globe_ClueDetail.GetAward(PrizeContent, record, Constant.Animal_Info_List, Constant.Detail_List, ref AwardList); break; case GlobeClueType.SpecialAnimal: getMoney = SpecialAnimalModel.GetAward(PrizeContent, record, Constant.Animal_Info_List, ref AwardList); break; case GlobeClueType.CombineAnimal: getMoney = Globe_ClueCombineAnimal.GetAward(PrizeContent, record, Constant.Animal_Info_List, ref Araw_Return_Ss, ref NoAwardList, ref AwardList); break; case GlobeClueType.LineAnimal: getMoney = LineAnimalModel.GetAward(clue, PrizeContent, record, Constant.Animal_Info_List, ref AwardList); break; case GlobeClueType.LineDetail: getMoney = LineDetaillModel.GetAward(clue, PrizeContent, record, Constant.Detail_List, ref AwardList); break; case GlobeClueType.NotAll: getMoney = NotAllModel.GetAward(PrizeContent, record); break; default: break; } } } //最终完成【结束】 Operation_Record record_Clone = Constant.Clone <Operation_Record>(record); if (paytype == 1) { //返率的钱 record_Clone.Return_Money = (decimal)(clue.Return_Pay2 * record_Clone.Using_Money); } else { //返率的钱 record_Clone.Return_Money = (decimal)(clue.Return_Pay * record_Clone.Using_Money); } //获奖的钱 record_Clone.Get_Money = (decimal)getMoney; if (Araw_Return_Ss.Count > 0) { #region 和局的情况下 //record_Clone.IsWin = (int)IsWinType.综合; //record_Clone.Araw_ReturnMoney = 0; //record_Clone.Araw_RetrunContent = "和局:("; //for (int i = 0; i < Araw_Return_Ss.Count ; i++) //{ // //和局返的钱 // record_Clone.Araw_ReturnMoney += Araw_Return_Ss[i].Araw_Money; // if (i != Araw_Return_Ss.Count - 1) // { // record_Clone.Araw_RetrunContent += Araw_Return_Ss[i].Name += ","; // } // else // { // record_Clone.Araw_RetrunContent += Araw_Return_Ss[i].Name += ")"; // } //} //if (NoAwardList.Count > 0) //{ // record_Clone.Araw_RetrunContent += "、不中奖:("; // for (int i = 0; i < NoAwardList.Count; i++) // { // if (i != NoAwardList.Count - 1) // { // record_Clone.Araw_RetrunContent += NoAwardList[i] += ","; // } // else // { // record_Clone.Araw_RetrunContent += NoAwardList[i] += ")"; // } // } //} //if (AwardList.Count > 0) //{ // record_Clone.Araw_RetrunContent += "、中奖:("; // for (int i = 0; i < AwardList.Count; i++) // { // if (i != AwardList.Count - 1) // { // record_Clone.Araw_RetrunContent += AwardList[i] += ","; // } // else // { // record_Clone.Araw_RetrunContent += AwardList[i] += ")"; // } // } //} #endregion } else if (record_Clone.Get_Money > 0) { record_Clone.IsWin = (int)IsWinType.获奖; if (AwardList.Count > 0) { record_Clone.Araw_RetrunContent += "中奖:("; for (int i = 0; i < AwardList.Count; i++) { if (i != AwardList.Count - 1) { record_Clone.Araw_RetrunContent += AwardList[i] += ","; } else { record_Clone.Araw_RetrunContent += AwardList[i] += ")"; } } } } else { record_Clone.IsWin = (int)IsWinType.未获奖; } var jsm = Constant.Operation_Record_S.Update(record_Clone); if (jsm.errNum == 0) { record.Get_Money = record_Clone.Get_Money; record.Return_Money = record_Clone.Return_Money; record.Araw_ReturnMoney = record_Clone.Araw_ReturnMoney; record.Araw_RetrunContent = record_Clone.Araw_RetrunContent; record.IsWin = record_Clone.IsWin; UserInfo user = UserInfo_List.FirstOrDefault(u => u.LoginName == record.UserID); if (user != null) { UserInfo userinfo_Clone = Constant.Clone <UserInfo>(user); userinfo_Clone.Money += record_Clone.Get_Money; userinfo_Clone.Money += record.Araw_ReturnMoney; userinfo_Clone.Money += record.Return_Money; var jsm2 = Constant.UserInfo_S.Update(userinfo_Clone); if (jsm2.errNum == 0) { user.Money += record_Clone.Get_Money; user.Money += record.Araw_ReturnMoney; user.Money += record.Return_Money; if (record.Get_Money > 0) { //支出支入 Constant.MoneyAnsys(record, (decimal)record.Get_Money, user, MoneyType.中奖, record.Araw_RetrunContent); } if (record.Araw_ReturnMoney > 0) { //支出支入 //Constant.MoneyAnsys(record, (decimal)record.Araw_ReturnMoney, user, MoneyType.综合, record.Araw_RetrunContent); } if (record.Return_Money > 0) { //支出支入 Constant.MoneyAnsys(record, (decimal)record.Return_Money, user, MoneyType.返还奖金, ""); } } else { jsm = JsonModel.GetJsonModel(300, "操作失败"); } } else { jsm = JsonModel.GetJsonModel(300, "操作失败"); } } else { jsm = JsonModel.GetJsonModel(300, "操作失败"); } } catch (Exception ex) { LogHelper.Error(ex); } }
public static decimal GetAward(Globe_Clue Globe_Clue, string PrizeContent, Operation_Record record, List <Animal_Info> Animal_Info_List, ref List <string> AwardList) { decimal getdecimal = 0; string animals = string.Empty; try { List <Animal_Info_S> Animal_Info_Ss = Animal_Info_S.GetBase(record.Buy_Content, Animal_Info_List, record.BuyPayReturn); List <int> contListall = Split_Hepler.str_to_ints(PrizeContent).ToList(); int count = 0; LineAnimalType LineType = (LineAnimalType)Globe_Clue.Second_Type; if (LineType == LineAnimalType.二肖连中 || LineType == LineAnimalType.肖连中 || LineType == LineAnimalType.四肖连中 || LineType == LineAnimalType.五肖连中) { foreach (var animal in Animal_Info_Ss) { foreach (var awardGlobe in contListall) { if (animal.GlobeCodeList.Contains(awardGlobe)) { count++; animals += animal.Name + ","; break; } } } if (count >= Animal_Info_Ss.Count) { getdecimal += (decimal)(record.MinPayReturn * record.UnitPrice); AwardList.Add(animals); } } else if (LineType == LineAnimalType.二肖连不中 || LineType == LineAnimalType.肖连不中 || LineType == LineAnimalType.四肖连不中) { foreach (var animal in Animal_Info_Ss) { bool NoAdd = false; foreach (var awardGlobe in contListall) { if (animal.GlobeCodeList.Contains(awardGlobe)) { NoAdd = true; break; } } if (!NoAdd) { count++; } } if (count >= Animal_Info_Ss.Count) { getdecimal += (decimal)(record.MinPayReturn * record.UnitPrice); } } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }
public static decimal GetAward(Globe_Clue Globe_Clue, string PrizeContent, Operation_Record record, ref List <string> AwardList) { decimal getdecimal = 0; string awardCollect = string.Empty; try { List <int> contList6 = Split_Hepler.str_to_ints(PrizeContent).ToList(); contList6.RemoveAt(contList6.Count - 1); List <int> buyList = Split_Hepler.str_to_ints(record.Buy_Content).ToList(); var cont7 = PrizeContent.Length >= 7 ? Split_Hepler.str_to_stringss(PrizeContent)[6] : "0"; //特奖 int conti7 = Convert.ToInt32(cont7); int count = 0; LineType LineType = (LineType)Globe_Clue.Second_Type; if (LineType == LineType.全中) { foreach (var wawardClobe in contList6) { if (buyList.Contains(wawardClobe)) { count++; awardCollect += Convert.ToString(wawardClobe) + ","; } } if (count >= 3) { getdecimal += (decimal)(record.MinPayReturn * record.UnitPrice); AwardList.Add(Convert.ToString(awardCollect)); } } else if (LineType == LineType.二全中 || LineType == LineType.中二之中二) { foreach (var wawardClobe in contList6) { if (buyList.Contains(wawardClobe)) { count++; awardCollect += Convert.ToString(wawardClobe) + ","; } } if (count >= 2) { getdecimal += (decimal)(record.MinPayReturn * record.UnitPrice); AwardList.Add(Convert.ToString(awardCollect)); } } else if (LineType == LineType.二中特之中二) { foreach (var wawardClobe in contList6) { if (buyList.Contains(wawardClobe)) { count++; awardCollect += Convert.ToString(wawardClobe) + ","; } } if (count >= 2) { getdecimal += (decimal)(record.MaxPayReturn * record.UnitPrice); AwardList.Add(Convert.ToString(awardCollect)); } } else if (LineType == TLC_Model.Enums.LineType.二中特之中特 || LineType == TLC_Model.Enums.LineType.特串) { foreach (var wawardClobe in contList6) { if (buyList.Contains(wawardClobe)) { count++; awardCollect += Convert.ToString(wawardClobe) + ","; break; } } if (buyList.Contains(conti7)) { count++; awardCollect += Convert.ToString(conti7) + ","; } if (count >= 2) { getdecimal += (decimal)(record.MinPayReturn * record.UnitPrice); AwardList.Add(Convert.ToString(awardCollect)); } } else if (LineType == TLC_Model.Enums.LineType.四中一) { foreach (var wawardClobe in contList6) { if (buyList.Contains(wawardClobe)) { count++; awardCollect += Convert.ToString(wawardClobe) + ","; break; } } if (count >= 1) { getdecimal += (decimal)(record.MinPayReturn * record.UnitPrice); AwardList.Add(Convert.ToString(awardCollect)); } } } catch (Exception ex) { LogHelper.Error(ex); } return(getdecimal); }