public static List <CTZQ_MatchInfo_WEB> MatchList_WEB(string issuse, string gameType) { BusinessHelper bizHelper = new BusinessHelper(); var match = bizHelper.GetMatchInfoList <CTZQ_MatchInfo>(MatchFile(gameType, issuse)); var odds = bizHelper.GetMatchInfoList <CTZQ_OddInfo>(OddFiles(gameType, issuse)); var list = new List <CTZQ_MatchInfo_WEB>(); foreach (var item in match) { var res = odds.FirstOrDefault(p => p.Id == item.Id); #region 队伍基础信息 var info = new CTZQ_MatchInfo_WEB() { GameCode = item.GameCode, Color = item.Color, GameType = item.GameType, OrderNumber = item.OrderNumber, Id = item.Id, //UpdateTime = item.UpdateTime.ToString("yyyyMMddHHmmss"), //MatchId = item.MatchId, MatchName = item.MatchName, //MatchResult = item.MatchResult, MatchStartTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.MatchStartTime)).ToString(), //MatchStartTime = item.MatchStartTime.ToString("yyyyMMddHHmmss"), MatchState = item.MatchState, //HomeTeamHalfScore = item.HomeTeamHalfScore, //HomeTeamId = item.HomeTeamId, HomeTeamName = item.HomeTeamName.Replace(" ", ""), //HomeTeamScore = item.HomeTeamScore, HomeTeamStanding = item.HomeTeamStanding, //GuestTeamHalfScore = item.GuestTeamHalfScore, //GuestTeamId = item.GuestTeamId, GuestTeamName = item.GuestTeamName.Replace(" ", ""), //GuestTeamScore = item.GuestTeamScore, GuestTeamStanding = item.GuestTeamStanding, IssuseNumber = item.IssuseNumber, //Mid = item.Mid, FXId = item.FXId, }; #endregion #region 附加平均赔率数据 if (res != null) { info.AverageOdds = res.AverageOdds; if (gameType == "T6BQC") { info.AverageOdds = res.FullAverageOdds + ":" + res.HalfAverageOdds; } //info.KLFlat = res.KLFlat; //info.KLLose = res.KLLose; //info.KLWin = res.KLWin; //info.LSFlat = res.LSFlat; //info.LSLose = res.LSLose; //info.LSWin = res.LSWin; //info.YPSW = res.YPSW; } #endregion list.Add(info); } return(list); }
public static List <CTZQ_MatchList_AnteCode> GetMatchListToOrderDetail(string issuse, string gameType, string anteCode) { List <CTZQ_MatchList_AnteCode> ctzqList = new List <CTZQ_MatchList_AnteCode>(); BusinessHelper bizHelper = new BusinessHelper(); var match = bizHelper.GetMatchInfoList <CTZQ_MatchInfo>(MatchFile(gameType, issuse)); if (match != null && match.Count > 0 && !string.IsNullOrEmpty(anteCode)) { var arr = anteCode.Split('|'); var anteCodeArr = anteCode.Split('|')[0].Split(','); match = match.OrderBy(s => s.OrderNumber).ToList(); foreach (var item in match) { CTZQ_MatchList_AnteCode info = new CTZQ_MatchList_AnteCode(); info.AnteCode = anteCodeArr[item.OrderNumber - 1]; info.CurrentSp = string.Empty; info.Detail_RF = string.Empty; info.Detail_YSZF = string.Empty; if (item.HomeTeamScore != -1) { info.FullResult = item.HomeTeamScore + "-" + item.GuestTeamScore; } else { info.FullResult = string.Empty; } info.GuestTeamId = item.GuestTeamId; info.GuestTeamName = item.GuestTeamName; if (item.HomeTeamHalfScore != -1) { info.HalfResult = item.HomeTeamHalfScore + "-" + item.GuestTeamHalfScore; } else { info.HalfResult = string.Empty; } info.HomeTeamId = item.HomeTeamId; info.HomeTeamName = item.HomeTeamName; if (arr.Length > 1) { info.IsDan = arr[1].Split(',').Contains((item.OrderNumber - 1).ToString()); } else { info.IsDan = false; } info.IssuseNumber = item.IssuseNumber; info.LeagueColor = item.Color; info.LeagueName = item.MatchName; info.LetBall = 0; info.MatchId = item.MatchId.ToString(); info.MatchResult = item.MatchResult; info.MatchResultSp = 0M; info.MatchState = item.MatchState.ToString(); info.StartTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.MatchStartTime)).ToString(); info.OrderNumber = item.OrderNumber; ctzqList.Add(info); } } return(ctzqList); }
/// <summary> /// 查询队伍信息与队伍比赛结果信息 - WEB页面使用 /// - 合并队伍基础信息与队伍结果信息 /// - 合并各玩法SP数据 /// </summary> /// <param name="service">HttpServerUtilityBase对象</param> /// <param name="matchDate">查询日期</param> /// <param name="isLeftJoin">是否查询没有结果的队伍比赛信息</param> /// <returns>队伍信息及比赛结果信息</returns> public static List <JCZQ_MatchInfo_WEB> MatchList_WEB(string gameType, string newVerType, string matchDate = null, bool isLeftJoin = true) { BusinessHelper bizHelper = new BusinessHelper(); var match = bizHelper.GetMatchInfoList <JCZQ_MatchInfo>(MatchFile(newVerType, matchDate)); var matchresult = bizHelper.GetMatchInfoList <JCZQ_MatchResultInfo>(MatchResultFile(matchDate)); //var sp_spf = bizHelper.GetMatchInfoList<JCZQ_SPF_SPInfo>(SPFile("SPF",matchDate)); //让球胜平负sp数据 //var sp_brqspf = bizHelper.GetMatchInfoList<JCZQ_SPF_SPInfo>(SPFile("BRQSPF", matchDate)); //胜平负sp数据 //var sp_zjq = bizHelper.GetMatchInfoList<JCZQ_ZJQ_SPInfo>(SPFile("ZJQ", matchDate)); //总进球sp数据 //var sp_bf = bizHelper.GetMatchInfoList<JCZQ_BF_SPInfo>(SPFile("BF", matchDate)); //比分sp数据 //var sp_bqc = bizHelper.GetMatchInfoList<JCZQ_BQC_SPInfo>(SPFile("BQC", matchDate)); //半全场sp数据 var sp_spf = bizHelper.GetMatchInfoList <JCZQ_SPF_SPInfo>(SPFile(gameType, matchDate)); //让球胜平负sp数据 var sp_brqspf = bizHelper.GetMatchInfoList <JCZQ_SPF_SPInfo>(SPFile(gameType, matchDate)); //胜平负sp数据 var sp_zjq = bizHelper.GetMatchInfoList <JCZQ_ZJQ_SPInfo>(SPFile(gameType, matchDate)); //总进球sp数据 var sp_bf = bizHelper.GetMatchInfoList <JCZQ_BF_SPInfo>(SPFile(gameType, matchDate)); //比分sp数据 var sp_bqc = bizHelper.GetMatchInfoList <JCZQ_BQC_SPInfo>(SPFile(gameType, matchDate)); //半全场sp数据 var list = new List <JCZQ_MatchInfo_WEB>(); match = match.Where(t => long.Parse(Convert.ToDateTime(t.FSStopBettingTime).ToString("yyyyMMddHHmmss")) > long.Parse(DateTime.Now.ToString("yyyyMMddHHmmss")) && t.MatchStopDesc != "2").ToList(); foreach (var item in match) { #region 队伍基础信息 //var startTime=Convert.ToDateTime(item.StartDateTime); //if (startTime.Date == DateTime.Now.AddDays(1).Date) // startTime = startTime.AddHours(-9); var matchDataTime = bizHelper.ConvertDateTimeInt(bizHelper.ConvertStrToDateTime("20" + item.MatchData)); //var matchDataTime = bizHelper.ConvertDateTimeInt(bizHelper.ConvertStrToDateTime("20150623")); var info = new JCZQ_MatchInfo_WEB() { //CreateTime = item.CreateTime.ToString("yyyyMMddHHmmss"), //DSStopBettingTime = item.DSStopBettingTime.ToString("yyyyMMddHHmmss"), MatcheDateTime = matchDataTime, //FSStopBettingTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.FSStopBettingTime)).ToString(), FSStopBettingTime = item.FSStopBettingTime, //FSStopBettingTime = item.FSStopBettingTime.ToString("yyyyMMddHHmmss"), //GuestTeamId = item.GuestTeamId, GuestTeamName = item.GuestTeamName, //HomeTeamId = item.HomeTeamId, HomeTeamName = item.HomeTeamName, LeagueColor = item.LeagueColor, //LeagueId = item.LeagueId, LeagueName = item.LeagueName, LetBall = item.LetBall, //LoseOdds = item.LoseOdds, MatchIdName = item.MatchIdName, StartDateTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.StartDateTime)).ToString(), //StartDateTime = item.StartDateTime.ToString("yyyyMMddHHmmss"), //WinOdds = item.WinOdds, //FlatOdds = item.FlatOdds, MatchData = item.MatchData, MatchId = item.MatchId, MatchNumber = item.MatchNumber, //Mid = item.Mid, FXId = item.FXId, State = item.State, PrivilegesType = item.PrivilegesType == null ? string.Empty : item.PrivilegesType, }; #endregion #region 附加队伍结果信息 var res = matchresult.FirstOrDefault(p => p.MatchId == item.MatchId); if (res != null) { //info.ZJQ_Result = res.ZJQ_Result; //info.ZJQ_SP = res.ZJQ_SP; //info.SPF_SP = res.SPF_SP; //info.SPF_Result = res.SPF_Result; //info.BQC_SP = res.BQC_SP; //info.BQC_Result = res.BQC_Result; //info.BF_SP = res.BF_SP; //info.BF_Result = res.BF_Result; //info.FullGuestTeamScore = res.FullGuestTeamScore; //info.FullHomeTeamScore = res.FullHomeTeamScore; //info.HalfGuestTeamScore = res.HalfGuestTeamScore; //info.HalfHomeTeamScore = res.HalfHomeTeamScore; //info.MatchState = res.MatchState; } else if (!isLeftJoin) { continue; } #endregion #region 附加让球胜平负sp数据 var sp_spf_item = sp_spf.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_spf_item != null && sp_spf_item.SPF != null) { var json = JsonHelper.Deserialize <JCZQ_SPF_SPInfo>(sp_spf_item.SPF); info.SP_Win_Odds = json.WinOdds; info.SP_Lose_Odds = json.LoseOdds; info.SP_Flat_Odds = json.FlatOdds; //info.PrivilegesType = json.PrivilegesType==null?string.Empty:json.PrivilegesType; } } else if (sp_spf_item != null) { info.SP_Win_Odds = sp_spf_item.WinOdds; info.SP_Lose_Odds = sp_spf_item.LoseOdds; info.SP_Flat_Odds = sp_spf_item.FlatOdds; //info.PrivilegesType = sp_spf_item.PrivilegesType; } #endregion #region 附加胜平负sp数据 var sp_brqspf_item = sp_brqspf.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_brqspf_item != null && sp_brqspf_item.BRQSPF != null) { var json = JsonHelper.Deserialize <JCZQ_SPF_SPInfo>(sp_brqspf_item.BRQSPF); info.SP_Win_Odds_BRQ = json.WinOdds; info.SP_Lose_Odds_BRQ = json.LoseOdds; info.SP_Flat_Odds_BRQ = json.FlatOdds; //info.PrivilegesType = json.PrivilegesType==null?string.Empty:json.PrivilegesType; } } else if (sp_brqspf_item != null) { info.SP_Win_Odds_BRQ = sp_brqspf_item.WinOdds; info.SP_Lose_Odds_BRQ = sp_brqspf_item.LoseOdds; info.SP_Flat_Odds_BRQ = sp_brqspf_item.FlatOdds; //info.PrivilegesType = sp_brqspf_item.PrivilegesType==null?string.Empty:sp_brqspf_item.PrivilegesType; } #endregion #region 附加总进球sp数据 var sp_zjq_item = sp_zjq.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_zjq_item != null && sp_zjq_item.ZJQ != null) { var json = JsonHelper.Deserialize <JCZQ_ZJQ_SPInfo>(sp_zjq_item.ZJQ); info.JinQiu_0_Odds = json.JinQiu_0_Odds; info.JinQiu_1_Odds = json.JinQiu_1_Odds; info.JinQiu_2_Odds = json.JinQiu_2_Odds; info.JinQiu_3_Odds = json.JinQiu_3_Odds; info.JinQiu_4_Odds = json.JinQiu_4_Odds; info.JinQiu_5_Odds = json.JinQiu_5_Odds; info.JinQiu_6_Odds = json.JinQiu_6_Odds; info.JinQiu_7_Odds = json.JinQiu_7_Odds; //info.PrivilegesType = json.PrivilegesType==null?string.Empty:json.PrivilegesType; } } else if (sp_zjq_item != null) { info.JinQiu_0_Odds = sp_zjq_item.JinQiu_0_Odds; info.JinQiu_1_Odds = sp_zjq_item.JinQiu_1_Odds; info.JinQiu_2_Odds = sp_zjq_item.JinQiu_2_Odds; info.JinQiu_3_Odds = sp_zjq_item.JinQiu_3_Odds; info.JinQiu_4_Odds = sp_zjq_item.JinQiu_4_Odds; info.JinQiu_5_Odds = sp_zjq_item.JinQiu_5_Odds; info.JinQiu_6_Odds = sp_zjq_item.JinQiu_6_Odds; info.JinQiu_7_Odds = sp_zjq_item.JinQiu_7_Odds; //info.PrivilegesType = sp_zjq_item.PrivilegesType==null?string.Empty:sp_zjq_item.PrivilegesType; } #endregion #region 附加比分sp数据 var sp_bf_item = sp_bf.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_bf_item != null && sp_bf_item.BF != null) { var json = JsonHelper.Deserialize <JCZQ_BF_SPInfo>(sp_bf_item.BF); info.F_01 = json.F_01; info.F_02 = json.F_02; info.F_03 = json.F_03; info.F_04 = json.F_04; info.F_05 = json.F_05; info.F_12 = json.F_12; info.F_13 = json.F_13; info.F_14 = json.F_14; info.F_15 = json.F_15; info.F_23 = json.F_23; info.F_24 = json.F_24; info.F_25 = json.F_25; info.F_QT = json.F_QT; info.P_00 = json.P_00; info.P_11 = json.P_11; info.P_22 = json.P_22; info.P_33 = json.P_33; info.P_QT = json.P_QT; info.S_10 = json.S_10; info.S_20 = json.S_20; info.S_21 = json.S_21; info.S_30 = json.S_30; info.S_31 = json.S_31; info.S_32 = json.S_32; info.S_40 = json.S_40; info.S_41 = json.S_41; info.S_42 = json.S_42; info.S_50 = json.S_50; info.S_51 = json.S_51; info.S_52 = json.S_52; info.S_QT = json.S_QT; //info.PrivilegesType = json.PrivilegesType==null?string.Empty:json.PrivilegesType; } } else if (sp_bf_item != null) { info.F_01 = sp_bf_item.F_01; info.F_02 = sp_bf_item.F_02; info.F_03 = sp_bf_item.F_03; info.F_04 = sp_bf_item.F_04; info.F_05 = sp_bf_item.F_05; info.F_12 = sp_bf_item.F_12; info.F_13 = sp_bf_item.F_13; info.F_14 = sp_bf_item.F_14; info.F_15 = sp_bf_item.F_15; info.F_23 = sp_bf_item.F_23; info.F_24 = sp_bf_item.F_24; info.F_25 = sp_bf_item.F_25; info.F_QT = sp_bf_item.F_QT; info.P_00 = sp_bf_item.P_00; info.P_11 = sp_bf_item.P_11; info.P_22 = sp_bf_item.P_22; info.P_33 = sp_bf_item.P_33; info.P_QT = sp_bf_item.P_QT; info.S_10 = sp_bf_item.S_10; info.S_20 = sp_bf_item.S_20; info.S_21 = sp_bf_item.S_21; info.S_30 = sp_bf_item.S_30; info.S_31 = sp_bf_item.S_31; info.S_32 = sp_bf_item.S_32; info.S_40 = sp_bf_item.S_40; info.S_41 = sp_bf_item.S_41; info.S_42 = sp_bf_item.S_42; info.S_50 = sp_bf_item.S_50; info.S_51 = sp_bf_item.S_51; info.S_52 = sp_bf_item.S_52; info.S_QT = sp_bf_item.S_QT; //info.PrivilegesType = sp_bf_item.PrivilegesType==null?string.Empty:sp_bf_item.PrivilegesType; } #endregion #region 附加半全场sp数据 var sp_bqc_item = sp_bqc.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_bqc_item != null && sp_bqc_item.BQC != null) { var json = JsonHelper.Deserialize <JCZQ_BQC_SPInfo>(sp_bqc_item.BQC); info.F_F_Odds = json.F_F_Odds; info.F_P_Odds = json.F_P_Odds; info.F_SH_Odds = json.F_SH_Odds; info.P_F_Odds = json.P_F_Odds; info.P_P_Odds = json.P_P_Odds; info.P_SH_Odds = json.P_SH_Odds; info.SH_F_Odds = json.SH_F_Odds; info.SH_P_Odds = json.SH_P_Odds; info.SH_SH_Odds = json.SH_SH_Odds; //info.PrivilegesType = json.PrivilegesType==null?string.Empty:json.PrivilegesType; } } else if (sp_bqc_item != null) { info.F_F_Odds = sp_bqc_item.F_F_Odds; info.F_P_Odds = sp_bqc_item.F_P_Odds; info.F_SH_Odds = sp_bqc_item.F_SH_Odds; info.P_F_Odds = sp_bqc_item.P_F_Odds; info.P_P_Odds = sp_bqc_item.P_P_Odds; info.P_SH_Odds = sp_bqc_item.P_SH_Odds; info.SH_F_Odds = sp_bqc_item.SH_F_Odds; info.SH_P_Odds = sp_bqc_item.SH_P_Odds; info.SH_SH_Odds = sp_bqc_item.SH_SH_Odds; //info.PrivilegesType = sp_bqc_item.PrivilegesType==null?string.Empty:sp_bqc_item.PrivilegesType; } #endregion list.Add(info); } return(list); }
public static List <JCZQ_MatchInfo_WEB> GetJCZQHHDGList() { List <JCZQ_MatchInfo_WEB> jczqMatchList = new List <JCZQ_MatchInfo_WEB>(); BusinessHelper bizHelper = new BusinessHelper(); var matchList = bizHelper.GetMatchInfoList <JCZQHHDGBase>(GetFilePath("Match_List_HH")); matchList = matchList.Where(s => long.Parse(Convert.ToDateTime(s.FSStopBettingTime).ToString("yyyyMMddHHmmss")) > long.Parse(DateTime.Now.ToString("yyyyMMddHHmmss")) && s.MatchStopDesc != "2").ToList(); if (matchList != null && matchList.Count > 0) { foreach (var item in matchList) { JCZQ_MatchInfo_WEB info = new JCZQ_MatchInfo_WEB(); info.MatcheDateTime = bizHelper.ConvertDateTimeInt(bizHelper.ConvertStrToDateTime("20" + item.MatchData)); //info.FSStopBettingTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.FSStopBettingTime)).ToString(); info.FSStopBettingTime = item.FSStopBettingTime; //info.//FSStopBettingTime = item.FSStopBettingTime.ToString("yyyyMMddHHmmss"), //info.//GuestTeamId = item.GuestTeamId, info.GuestTeamName = item.GuestTeamName; //info.//HomeTeamId = item.HomeTeamId, info.HomeTeamName = item.HomeTeamName; info.LeagueColor = item.LeagueColor; //info.//LeagueId = item.LeagueId, info.LeagueName = item.LeagueName; info.LetBall = item.LetBall; //info.//LoseOdds = item.LoseOdds, info.MatchIdName = item.MatchIdName; //info.StartDateTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.StartDateTime)).ToString(); info.StartDateTime = item.StartDateTime; //info.//StartDateTime = item.StartDateTime.ToString("yyyyMMddHHmmss"), //info.//WinOdds = item.WinOdds, //info.//FlatOdds = item.FlatOdds, info.MatchData = item.MatchData; info.MatchId = item.MatchId; info.MatchNumber = item.MatchNumber; //info.//Mid = item.Mid, info.FXId = item.FXId; info.State_HHDG = item.State; info.PrivilegesType = item.PrivilegesType == null ? string.Empty : item.PrivilegesType; //info.State = item.State; #region 附加让球胜平负sp数据 if (item.SPF != null) { var json_spf = JsonHelper.Deserialize <JCZQ_SPF_SPInfo>(item.SPF); info.SP_Win_Odds = json_spf.WinOdds; info.SP_Lose_Odds = json_spf.LoseOdds; info.SP_Flat_Odds = json_spf.FlatOdds; info.NoSaleState_SPF = json_spf.NoSaleState; //info.PrivilegesType = json_spf.PrivilegesType==null?string.Empty:json_spf.PrivilegesType; } else { info.SP_Win_Odds = 0; info.SP_Lose_Odds = 0; info.SP_Flat_Odds = 0; info.NoSaleState_SPF = "0"; //info.PrivilegesType = string.Empty; } #endregion #region 附加胜平负sp数据 if (item.BRQSPF != null) { var json_brqspf = JsonHelper.Deserialize <JCZQ_SPF_SPInfo>(item.BRQSPF); info.SP_Win_Odds_BRQ = json_brqspf.WinOdds; info.SP_Lose_Odds_BRQ = json_brqspf.LoseOdds; info.SP_Flat_Odds_BRQ = json_brqspf.FlatOdds; info.NoSaleState_BRQSPF = json_brqspf.NoSaleState; //info.PrivilegesType = json_brqspf.PrivilegesType==null?string.Empty:json_brqspf.PrivilegesType; } else { info.SP_Win_Odds_BRQ = 0; info.SP_Lose_Odds_BRQ = 0; info.SP_Flat_Odds_BRQ = 0; info.NoSaleState_BRQSPF = "0"; //info.PrivilegesType = string.Empty; } #endregion #region 附加总进球sp数据 if (item.ZJQ != null) { var json_zjq = JsonHelper.Deserialize <JCZQ_ZJQ_SPInfo>(item.ZJQ); info.JinQiu_0_Odds = json_zjq.JinQiu_0_Odds; info.JinQiu_1_Odds = json_zjq.JinQiu_1_Odds; info.JinQiu_2_Odds = json_zjq.JinQiu_2_Odds; info.JinQiu_3_Odds = json_zjq.JinQiu_3_Odds; info.JinQiu_4_Odds = json_zjq.JinQiu_4_Odds; info.JinQiu_5_Odds = json_zjq.JinQiu_5_Odds; info.JinQiu_6_Odds = json_zjq.JinQiu_6_Odds; info.JinQiu_7_Odds = json_zjq.JinQiu_7_Odds; info.NoSaleState_ZJQ = json_zjq.NoSaleState; //info.PrivilegesType = json_zjq.PrivilegesType==null?string.Empty:json_zjq.PrivilegesType; } else { info.JinQiu_0_Odds = 0; info.JinQiu_1_Odds = 0; info.JinQiu_2_Odds = 0; info.JinQiu_3_Odds = 0; info.JinQiu_4_Odds = 0; info.JinQiu_5_Odds = 0; info.JinQiu_6_Odds = 0; info.JinQiu_7_Odds = 0; info.NoSaleState_ZJQ = "0"; //info.PrivilegesType = string.Empty; } #endregion #region 附加比分sp数据 if (item.BF != null) { var json_bf = JsonHelper.Deserialize <JCZQ_BF_SPInfo>(item.BF); info.F_01 = json_bf.F_01; info.F_02 = json_bf.F_02; info.F_03 = json_bf.F_03; info.F_04 = json_bf.F_04; info.F_05 = json_bf.F_05; info.F_12 = json_bf.F_12; info.F_13 = json_bf.F_13; info.F_14 = json_bf.F_14; info.F_15 = json_bf.F_15; info.F_23 = json_bf.F_23; info.F_24 = json_bf.F_24; info.F_25 = json_bf.F_25; info.F_QT = json_bf.F_QT; info.P_00 = json_bf.P_00; info.P_11 = json_bf.P_11; info.P_22 = json_bf.P_22; info.P_33 = json_bf.P_33; info.P_QT = json_bf.P_QT; info.S_10 = json_bf.S_10; info.S_20 = json_bf.S_20; info.S_21 = json_bf.S_21; info.S_30 = json_bf.S_30; info.S_31 = json_bf.S_31; info.S_32 = json_bf.S_32; info.S_40 = json_bf.S_40; info.S_41 = json_bf.S_41; info.S_42 = json_bf.S_42; info.S_50 = json_bf.S_50; info.S_51 = json_bf.S_51; info.S_52 = json_bf.S_52; info.S_QT = json_bf.S_QT; info.NoSaleState_BF = json_bf.NoSaleState; //info.PrivilegesType = json_bf.PrivilegesType==null?string.Empty:json_bf.PrivilegesType; } else { info.F_01 = 0; info.F_02 = 0; info.F_03 = 0; info.F_04 = 0; info.F_05 = 0; info.F_12 = 0; info.F_13 = 0; info.F_14 = 0; info.F_15 = 0; info.F_23 = 0; info.F_24 = 0; info.F_25 = 0; info.F_QT = 0; info.P_00 = 0; info.P_11 = 0; info.P_22 = 0; info.P_33 = 0; info.P_QT = 0; info.S_10 = 0; info.S_20 = 0; info.S_21 = 0; info.S_30 = 0; info.S_31 = 0; info.S_32 = 0; info.S_40 = 0; info.S_41 = 0; info.S_42 = 0; info.S_50 = 0; info.S_51 = 0; info.S_52 = 0; info.S_QT = 0; info.NoSaleState_BF = "0"; //info.PrivilegesType = string.Empty; } #endregion #region 附加半全场sp数据 if (item.BQC != null) { var json_bqc = JsonHelper.Deserialize <JCZQ_BQC_SPInfo>(item.BQC); info.F_F_Odds = json_bqc.F_F_Odds; info.F_P_Odds = json_bqc.F_P_Odds; info.F_SH_Odds = json_bqc.F_SH_Odds; info.P_F_Odds = json_bqc.P_F_Odds; info.P_P_Odds = json_bqc.P_P_Odds; info.P_SH_Odds = json_bqc.P_SH_Odds; info.SH_F_Odds = json_bqc.SH_F_Odds; info.SH_P_Odds = json_bqc.SH_P_Odds; info.SH_SH_Odds = json_bqc.SH_SH_Odds; info.NoSaleState_BQC = json_bqc.NoSaleState; //info.PrivilegesType = json_bqc.PrivilegesType==null?string.Empty:json_bqc.PrivilegesType; } else { info.F_F_Odds = 0; info.F_P_Odds = 0; info.F_SH_Odds = 0; info.P_F_Odds = 0; info.P_P_Odds = 0; info.P_SH_Odds = 0; info.SH_F_Odds = 0; info.SH_P_Odds = 0; info.SH_SH_Odds = 0; info.NoSaleState_BQC = "0"; //info.PrivilegesType = string.Empty; } #endregion jczqMatchList.Add(info); } } return(jczqMatchList); }
/// <summary> /// 获取混合单关数据 /// </summary> /// <param name="gameType"></param> /// <param name="matchDate"></param> /// <param name="isLeftJoin"></param> /// <returns></returns> public static List <JCLQ_MatchInfo_WEB> GetJCLQHHDGList() { BusinessHelper bizHelper = new BusinessHelper(); var match = bizHelper.GetMatchInfoList <JCLQHHDGBase>(GetFilePath("New/Match_HHDG_List")); var list = new List <JCLQ_MatchInfo_WEB>(); match = match.Where(t => long.Parse(Convert.ToDateTime(t.FSStopBettingTime).ToString("yyyyMMddHHmmss")) > long.Parse(DateTime.Now.ToString("yyyyMMddHHmmss"))).ToList(); if (match != null && match.Count > 0) { foreach (var item in match) { var matchDataTime = bizHelper.ConvertDateTimeInt(bizHelper.ConvertStrToDateTime("20" + item.MatchData)); var info = new JCLQ_MatchInfo_WEB() { //CreateTime = item.CreateTime.ToString("yyyyMMddHHmmss"), //DSStopBettingTime = item.DSStopBettingTime.ToString("yyyyMMddHHmmss"), MatcheDateTime = matchDataTime, //FSStopBettingTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.FSStopBettingTime)).ToString(), FSStopBettingTime = item.FSStopBettingTime, //FSStopBettingTime = item.FSStopBettingTime.ToString("yyyyMMddHHmmss"), //GuestTeamId = item.GuestTeamId, GuestTeamName = item.GuestTeamName, HomeTeamName = item.HomeTeamName, //HomeTeamId = item.HomeTeamId, LeagueColor = item.LeagueColor.Contains("#") ? item.LeagueColor : "#" + "DB7917", //LeagueId = item.LeagueId, LeagueName = item.LeagueName, MatchIdName = item.MatchIdName, //StartDateTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.StartDateTime)).ToString(), StartDateTime = item.StartDateTime, //StartDateTime = item.StartDateTime.ToString("yyyyMMddHHmmss"), MatchData = item.MatchData, MatchId = item.MatchId, MatchNumber = item.MatchNumber, //AverageLose = item.AverageLose, //AverageWin = item.AverageWin, //Mid = item.Mid, FXId = item.FXId, State_HHDG = item.State, PrivilegesType = item.PrivilegesType == null ? string.Empty : item.PrivilegesType, }; #region 附加胜负sp数据 if (item.SF != null) { var sfcjson = JsonHelper.Deserialize <JCLQ_SF_SPInfo>(item.SF); if (sfcjson != null) { info.SF_WinSP = sfcjson.WinSP; info.SF_LoseSP = sfcjson.LoseSP; } } #endregion #region 附加让分胜负sp数据 if (item.RFSF != null) { var json = JsonHelper.Deserialize <JCLQ_RFSF_SPInfo>(item.RFSF); if (json != null) { info.RF = json.RF; info.RF_LoseSP = json.LoseSP; info.RF_WinSP = json.WinSP; } } #endregion #region 附加胜分差sp数据 if (item.SFC != null) { var json = JsonHelper.Deserialize <JCLQ_SFC_SPInfo>(item.SFC); if (json != null) { info.GuestWin1_5 = json.GuestWin1_5; info.GuestWin11_15 = json.GuestWin11_15; info.GuestWin16_20 = json.GuestWin16_20; info.GuestWin21_25 = json.GuestWin21_25; info.GuestWin26 = json.GuestWin26; info.GuestWin6_10 = json.GuestWin6_10; info.HomeWin1_5 = json.HomeWin1_5; info.HomeWin11_15 = json.HomeWin11_15; info.HomeWin16_20 = json.HomeWin16_20; info.HomeWin21_25 = json.HomeWin21_25; info.HomeWin26 = json.HomeWin26; info.HomeWin6_10 = json.HomeWin6_10; } } #endregion #region 附加大小分sp数据 if (item.DXF != null) { var json = JsonHelper.Deserialize <JCLQ_DXF_SPInfo>(item.DXF); if (json != null) { info.DF = json.DF; info.XF = json.XF; info.YSZF = json.YSZF; } } #endregion list.Add(info); } } return(list); }
/// <summary> /// 查询队伍信息与队伍比赛结果信息 - WEB页面使用 /// - 合并队伍基础信息与队伍结果信息 /// - 合并各玩法SP数据 /// </summary> /// <param name="service">HttpServerUtilityBase对象</param> /// <param name="type">玩法类型</param> /// <param name="matchDate">查询日期</param> /// <param name="isLeftJoin">是否查询没有结果的队伍比赛信息</param> /// <returns>队伍信息及比赛结果信息</returns> public static List <JCLQ_MatchInfo_WEB> MatchList_WEB(string gameType, string matchDate = null, bool isLeftJoin = true) { BusinessHelper bizHelper = new BusinessHelper(); var match = bizHelper.GetMatchInfoList <JCLQ_MatchInfo>(MatchFile(gameType, matchDate)); var matchresult = bizHelper.GetMatchInfoList <JCLQ_MatchResultInfo>(MatchResultFile(matchDate)); //var sp_sf =bizHelper.GetMatchInfoList<JCLQ_SF_SPInfo>(SPFile("SF", matchDate)); //胜负sp数据 //var sp_rfsf = bizHelper.GetMatchInfoList<JCLQ_RFSF_SPInfo>(SPFile("RFSF", matchDate)); //让分胜负sp数据 //var sp_sfc = bizHelper.GetMatchInfoList<JCLQ_SFC_SPInfo>(SPFile("SFC", matchDate)); //胜分差sp数据 //var sp_dxf = bizHelper.GetMatchInfoList<JCLQ_DXF_SPInfo>(SPFile("DXF", matchDate)); //大小分sp数据 var sp_sf = bizHelper.GetMatchInfoList <JCLQ_SF_SPInfo>(SPFile(gameType, matchDate)); //胜负sp数据 var sp_rfsf = bizHelper.GetMatchInfoList <JCLQ_RFSF_SPInfo>(SPFile(gameType, matchDate)); //让分胜负sp数据 var sp_sfc = bizHelper.GetMatchInfoList <JCLQ_SFC_SPInfo>(SPFile(gameType, matchDate)); //胜分差sp数据 var sp_dxf = bizHelper.GetMatchInfoList <JCLQ_DXF_SPInfo>(SPFile(gameType, matchDate)); //大小分sp数据 var list = new List <JCLQ_MatchInfo_WEB>(); match = match.Where(t => long.Parse(Convert.ToDateTime(t.FSStopBettingTime).ToString("yyyyMMddHHmmss")) > long.Parse(DateTime.Now.ToString("yyyyMMddHHmmss"))).ToList(); foreach (var item in match) { #region 队伍基础信息 var matchDataTime = bizHelper.ConvertDateTimeInt(bizHelper.ConvertStrToDateTime("20" + item.MatchData)); var info = new JCLQ_MatchInfo_WEB() { //CreateTime = item.CreateTime.ToString("yyyyMMddHHmmss"), //DSStopBettingTime = item.DSStopBettingTime.ToString("yyyyMMddHHmmss"), MatcheDateTime = matchDataTime, //FSStopBettingTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.FSStopBettingTime)).ToString(), FSStopBettingTime = item.FSStopBettingTime, //FSStopBettingTime = item.FSStopBettingTime.ToString("yyyyMMddHHmmss"), //GuestTeamId = item.GuestTeamId, GuestTeamName = item.GuestTeamName, HomeTeamName = item.HomeTeamName, //HomeTeamId = item.HomeTeamId, LeagueColor = item.LeagueColor.Contains("#") ? item.LeagueColor : "#" + "DB7917", //LeagueId = item.LeagueId, LeagueName = item.LeagueName, MatchIdName = item.MatchIdName, StartDateTime = bizHelper.ConvertDateTimeInt(Convert.ToDateTime(item.StartDateTime)).ToString(), //StartDateTime = item.StartDateTime.ToString("yyyyMMddHHmmss"), MatchData = item.MatchData, MatchId = item.MatchId, MatchNumber = item.MatchNumber, //AverageLose = item.AverageLose, //AverageWin = item.AverageWin, //Mid = item.Mid, FXId = item.FXId, PrivilegesType = item.PrivilegesType == null ? string.Empty : item.PrivilegesType, State_HHDG = item.State }; #endregion #region 附加队伍结果信息 var res = matchresult.FirstOrDefault(p => p.MatchId == item.MatchId); if (res != null) { //info.DXF_Result = res.DXF_Result; //info.DXF_SP = res.DXF_SP; //info.DXF_Trend = res.DXF_Trend; //info.GuestScore = res.GuestScore; //info.HomeScore = res.HomeScore; //info.RFSF_Result = res.RFSF_Result; //info.RFSF_SP = res.RFSF_SP; //info.RFSF_Trend = res.RFSF_Trend; //info.SF_Result = res.SF_Result; //info.SF_SP = res.SF_SP; //info.SFC_Result = res.SFC_Result; //info.SFC_SP = res.SFC_SP; //info.MatchState = res.MatchState; } else if (!isLeftJoin) { continue; } #endregion #region 附加胜负sp数据 var sp_sf_item = sp_sf.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_sf_item != null && sp_sf_item.SF != null) { var json = JsonHelper.Deserialize <JCLQ_SF_SPInfo>(sp_sf_item.SF); info.SF_WinSP = json.WinSP; info.SF_LoseSP = json.LoseSP; //info.PrivilegesType = json.PrivilegesType == null ? string.Empty : json.PrivilegesType; } } else { if (sp_sf_item != null) { info.SF_WinSP = sp_sf_item.WinSP; info.SF_LoseSP = sp_sf_item.LoseSP; //info.PrivilegesType = sp_sf_item.PrivilegesType == null ? string.Empty : sp_sf_item.PrivilegesType; } } #endregion #region 附加让分胜负sp数据 var sp_rfsf_item = sp_rfsf.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_rfsf_item != null && sp_rfsf_item.RFSF != null) { var json = JsonHelper.Deserialize <JCLQ_RFSF_SPInfo>(sp_rfsf_item.RFSF); info.RF = json.RF; info.RF_LoseSP = json.LoseSP; info.RF_WinSP = json.WinSP; //info.PrivilegesType = json.PrivilegesType == null ? string.Empty : json.PrivilegesType; } } else { if (sp_rfsf_item != null) { info.RF = sp_rfsf_item.RF; info.RF_LoseSP = sp_rfsf_item.LoseSP; info.RF_WinSP = sp_rfsf_item.WinSP; //info.PrivilegesType = sp_rfsf_item.PrivilegesType == null ? string.Empty : sp_rfsf_item.PrivilegesType; } } #endregion #region 附加胜分差sp数据 var sp_sfc_item = sp_sfc.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_sfc_item != null && sp_sfc_item.SFC != null) { var json = JsonHelper.Deserialize <JCLQ_SFC_SPInfo>(sp_sfc_item.SFC); info.GuestWin1_5 = json.GuestWin1_5; info.GuestWin11_15 = json.GuestWin11_15; info.GuestWin16_20 = json.GuestWin16_20; info.GuestWin21_25 = json.GuestWin21_25; info.GuestWin26 = json.GuestWin26; info.GuestWin6_10 = json.GuestWin6_10; info.HomeWin1_5 = json.HomeWin1_5; info.HomeWin11_15 = json.HomeWin11_15; info.HomeWin16_20 = json.HomeWin16_20; info.HomeWin21_25 = json.HomeWin21_25; info.HomeWin26 = json.HomeWin26; info.HomeWin6_10 = json.HomeWin6_10; //info.PrivilegesType = json.PrivilegesType == null ? string.Empty : json.PrivilegesType; } } else { if (sp_sfc_item != null) { info.GuestWin1_5 = sp_sfc_item.GuestWin1_5; info.GuestWin11_15 = sp_sfc_item.GuestWin11_15; info.GuestWin16_20 = sp_sfc_item.GuestWin16_20; info.GuestWin21_25 = sp_sfc_item.GuestWin21_25; info.GuestWin26 = sp_sfc_item.GuestWin26; info.GuestWin6_10 = sp_sfc_item.GuestWin6_10; info.HomeWin1_5 = sp_sfc_item.HomeWin1_5; info.HomeWin11_15 = sp_sfc_item.HomeWin11_15; info.HomeWin16_20 = sp_sfc_item.HomeWin16_20; info.HomeWin21_25 = sp_sfc_item.HomeWin21_25; info.HomeWin26 = sp_sfc_item.HomeWin26; info.HomeWin6_10 = sp_sfc_item.HomeWin6_10; //info.PrivilegesType = sp_sfc_item.PrivilegesType == null ? string.Empty : sp_sfc_item.PrivilegesType; } } #endregion #region 附加大小分sp数据 var sp_dxf_item = sp_dxf.FirstOrDefault(p => p.MatchId == item.MatchId); if (gameType.ToLower() == "hh") { if (sp_dxf_item != null && sp_dxf_item.DXF != null) { var json = JsonHelper.Deserialize <JCLQ_DXF_SPInfo>(sp_dxf_item.DXF); info.DF = json.DF; info.XF = json.XF; info.YSZF = json.YSZF; //info.PrivilegesType = json.PrivilegesType == null ? string.Empty : json.PrivilegesType; } } else { if (sp_dxf_item != null) { info.DF = sp_dxf_item.DF; info.XF = sp_dxf_item.XF; info.YSZF = sp_dxf_item.YSZF; //info.PrivilegesType = sp_dxf_item.PrivilegesType == null ? string.Empty : sp_dxf_item.PrivilegesType; } } #endregion list.Add(info); } return(list); }