/// <summary> ///查询和值走势列表按时间倒叙 /// </summary> public JLK3_HZ_InfoCollection QueryJLK3_HZ_Info(int length) { JLK3_HZ_InfoCollection Collection = new JLK3_HZ_InfoCollection(); var list = this.QueryGameChart <JLK3_HZ_Info>(string.Format("QueryJLK3_HZ_Info_{0}", length), () => { var infoList = new List <JLK3_HZ_Info>(); var entityList = new JLK3_Manager().QueryJLK3_HZ_Info(length); ObjectConvert.ConvertEntityListToInfoList <List <JLK3_HZ>, JLK3_HZ, List <JLK3_HZ_Info>, JLK3_HZ_Info>(entityList, ref infoList, () => { return(new JLK3_HZ_Info()); }); return(infoList); }); Collection.AddRange(list); return(Collection); }
/// <summary> /// 和值走势 /// </summary> private void Import_HZ(string issuseNumber, string winNumber) { var manager = new JLK3_Manager(); var issuse = manager.QueryJLK3_HZIssuseNumber(issuseNumber); if (issuse > 0) { return; } var winRed = winNumber.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); var hz = int.Parse(winRed[0]) + int.Parse(winRed[1]) + int.Parse(winRed[2]); var hw = hz % 10; var last = manager.QueryJLK3_HZ(); var dic = new Dictionary <string, object>(); dic.Add("IssuseNumber", issuseNumber); dic.Add("WinNumber", winNumber); dic.Add("CreateTime", DateTime.Now); var entity = this.CreateNewEntity <JLK3_HZ>(dic, (p) => { //取上一期的数据+1 var lastValue = (last == null ? 1 : int.Parse(p.GetValue(last, null).ToString()) + 1); //判断有没有开出此号 if (p.Name.StartsWith("He_")) { var order = p.Name.Replace("He_", string.Empty); lastValue = hz == int.Parse(order) ? 0 : lastValue; } if (p.Name.StartsWith("HW_")) { var order = p.Name.Replace("HW_", string.Empty); lastValue = hw == int.Parse(order) ? 0 : lastValue; } if (p.Name.StartsWith("Yu_")) { var order = p.Name.Replace("Yu_", string.Empty); lastValue = hz % 3 == int.Parse(order) ? 0 : lastValue; } return(lastValue); }); manager.AddJLK3_HZ(entity); }
/// <summary> /// 综合走势 /// </summary> public void Import_ZHZS(string issuseNumber, string winNumber) { var manager = new JLK3_Manager(); var issuse = manager.QueryJLK3_ZHZSIssuseNumber(issuseNumber); if (issuse > 0) { return; } var winRed = winNumber.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); var hz = int.Parse(winRed[0]) + int.Parse(winRed[1]) + int.Parse(winRed[2]); var temp = winRed.Distinct().ToArray(); var t = string.Empty; string type = string.Empty; if (temp.Count() == 2) { type = "组三"; foreach (var item in winRed) { if (winRed.Count(p => p == item) == 2) { t = item; break; } } } else if (temp.Count() == 3) { type = "组六"; } else { type = "豹子"; } var last = manager.QueryJLK3_ZHZS(); var dic = new Dictionary <string, object>(); dic.Add("IssuseNumber", issuseNumber); dic.Add("WinNumber", winNumber); dic.Add("CreateTime", DateTime.Now); var entity = this.CreateNewEntity <JLK3_ZHZS>(dic, (p) => { //取上一期的数据+1 var lastValue = (last == null ? 1 : int.Parse(p.GetValue(last, null).ToString()) + 1); //判断有没有开出此号 if (p.Name.StartsWith("Red_")) { var order = p.Name.Replace("Red_", string.Empty); lastValue = winRed.Contains(order) ? 0 : lastValue; } if (p.Name.StartsWith("RedCan_")) { var order = p.Name.Replace("RedCan_", string.Empty); if (type == "组三") { lastValue = t == order ? 2 : 1; } else if (type == "组六") { lastValue = 1; } else if (type == "豹子") { lastValue = winRed[0] == order ? 3 : 1; } } if (p.Name.StartsWith("BW_")) { var order = p.Name.Replace("BW_", string.Empty); lastValue = int.Parse(winRed[0]) == int.Parse(order) ? 0 : lastValue; } if (p.Name.StartsWith("SW_")) { var order = p.Name.Replace("SW_", string.Empty); lastValue = int.Parse(winRed[1]) == int.Parse(order) ? 0 : lastValue; } if (p.Name.StartsWith("GW_")) { var order = p.Name.Replace("GW_", string.Empty); lastValue = int.Parse(winRed[2]) == int.Parse(order) ? 0 : lastValue; } return(lastValue); }); manager.AddJLK3_ZHZS(entity); }
/// <summary> /// 基本走势 /// </summary> private void Import_JBZS(string issuseNumber, string winNumber) { var manager = new JLK3_Manager(); var issuse = manager.QueryJLK3_JBZSIssuseNumber(issuseNumber); if (issuse > 0) { return; } var winRed = winNumber.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); var array = new int[] { int.Parse(winRed[0]), int.Parse(winRed[1]), int.Parse(winRed[2]) }; var temp = winRed.Distinct().ToArray(); var t = string.Empty; string type = string.Empty; if (temp.Count() == 2) { type = "组三"; foreach (var item in winRed) { if (winRed.Count(p => p == item) == 2) { t = item; break; } } } else if (temp.Count() == 3) { type = "组六"; } else { type = "豹子"; } #region 奇偶 大小个数 int jCount = 0; int oCount = 0; foreach (var item in array) { if (item % 2 == 1) { jCount++; } else { oCount++; } } int dCount = 0; int xCount = 0; foreach (var item in array) { if (item <= 3) { xCount++; } else { dCount++; } } #endregion var last = manager.QueryJLK3_JBZS(); var dic = new Dictionary <string, object>(); dic.Add("IssuseNumber", issuseNumber); dic.Add("WinNumber", winNumber); dic.Add("CreateTime", DateTime.Now); var entity = this.CreateNewEntity <JLK3_JBZS>(dic, (p) => { //取上一期的数据+1 var lastValue = (last == null ? 1 : int.Parse(p.GetValue(last, null).ToString()) + 1); //判断有没有开出此号 if (p.Name.StartsWith("Red_")) { var order = p.Name.Replace("Red_", string.Empty); lastValue = winRed.Contains(order) ? 0 : lastValue; } if (p.Name.StartsWith("RedCan_")) { var order = p.Name.Replace("RedCan_", string.Empty); if (type == "组三") { lastValue = t == order ? 2 : 1; } else if (type == "组六") { lastValue = 1; } else if (type == "豹子") { lastValue = winRed[0] == order ? 3 : 1; } } if (p.Name.StartsWith("JiCount_")) { var order = p.Name.Replace("JiCount_", string.Empty); lastValue = jCount == int.Parse(order) ? 0 : lastValue; } if (p.Name.StartsWith("XiaoCount_")) { var order = p.Name.Replace("XiaoCount_", string.Empty); lastValue = xCount == int.Parse(order) ? 0 : lastValue; } if (p.Name.StartsWith("He_")) { var order = p.Name.Replace("He_", string.Empty); lastValue = array[0] + array[1] + array[2] == int.Parse(order) ? 0 : lastValue; } return(lastValue); }); manager.AddJLK3_JBZS(entity); }