1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Web;
- using CP.Cache;
- using CP.Common;
- using CP.Model;
- namespace CP.Business
- {
-
-
-
-
- public class Fchd15x5
- {
-
-
-
- static WMCache cache = WMCache.GetCacheService();
- #region 所有15x5数据
-
-
-
-
- public static List<Fchd15x5Info> GetFchd15x5List()
- {
- string key = string.Format(CacheKeys.FCHD15X5_DATALIST);
- List<Fchd15x5Info> list = cache.GetObject<List<Fchd15x5Info>>(key) as List<Fchd15x5Info>;
- if (list == null)
- {
- list = Fchd15x5Data.GetFchd15x5List();
- cache.AddObject(key, list, (int)CacheTime.Data);
- }
- return list;
- }
-
-
-
-
-
-
-
-
-
-
- public static List<Fchd15x5Info> GetFchd15x5List(ref List<Fchd15x5Info> list, int pagesize, int year, int sqi, int eqi, int week = 0, int ds = 0)
- {
- List<Fchd15x5Info> rlist = new List<Fchd15x5Info>();
- if (list == null || list.Count == 0)
- return rlist;
- int size = list.Count;
- if (pagesize > 0)
- {
- for (int i = (size - pagesize); i < size; i++)
- {
- rlist.Add(list[i]);
- }
- return rlist;
- }
- if (year > 0)
- {
- rlist.Clear();
- for (int i = 0; i < size; i++)
- {
- if (TypeConverter.StrToInt(list[i].qi.ToString().Substring(0, 4), 0) == year)
- rlist.Add(list[i]);
- }
- return rlist;
- }
- if (week > 0)
- {
- rlist.Clear();
- List<Fchd15x5Info> temp = new List<Fchd15x5Info>();
- for (int i = 0; i < size; i++)
- {
- if (list[i].week == week)
- temp.Add(list[i]);
- }
-
-
-
-
-
- return temp;
- }
- if (ds > 0)
- {
- rlist.Clear();
- List<Fchd15x5Info> temp = new List<Fchd15x5Info>();
- for (int i = 0; i < size; i++)
- {
- if (ds == 1)
- {
- if (list[i].qi % 2 != 0)
- temp.Add(list[i]);
- }
- else if (ds == 2)
- {
- if (list[i].qi % 2 == 0)
- temp.Add(list[i]);
- }
- }
- for (int i = (temp.Count - 120); i < temp.Count; i++)
- {
- rlist.Add(temp[i]);
- }
- return rlist;
- }
- if (sqi > 0 && eqi > 0)
- {
- rlist.Clear();
- int srank = GetFchd15x5Info(ref list, sqi).rank;
- int erank = GetFchd15x5Info(ref list, eqi).rank;
- if (erank != 0 && srank != 0 && erank > srank)
- {
- for (int i = srank - 1; i < erank && i < size; i++)
- {
- rlist.Add(list[i]);
- }
- }
- return rlist;
- }
-
- if (pagesize == 0 && year == 0 && sqi == 0 && eqi == 0 && week == 0)
- return list;
- return rlist;
- }
-
-
-
-
-
- public static Fchd15x5Info GetFchd15x5Info(ref List<Fchd15x5Info> list, int qi)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- int size = list.Count;
- for (int i = 0; i < size; i++)
- {
- if (list[i].qi == qi)
- {
- info = list[i];
- break;
- }
- }
- return info;
- }
- #endregion
- #region 某个排名的上一次数据
-
-
-
-
-
- public static Fchd15x5Info GetLastFchd15x5Info(ref List<Fchd15x5Info> list, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (list[i].rank == rank - 1)
- {
- info = list[i];
- return info;
- }
- }
- }
- return info;
- }
- #endregion
- #region 某个排名的下一次数据
-
-
-
-
-
- public static Fchd15x5Info GetNextFchd15x5Info(ref List<Fchd15x5Info> list, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 1; i < list.Count; i++)
- {
- if (list[i].rank == rank + 1)
- {
- info = list[i];
- return info;
- }
- }
- }
- return info;
- }
- #endregion
-
-
-
-
-
-
- public static int GetFchd15x5QjCount(Fchd15x5Info info, int qj)
- {
- List<int> kjh = new List<int> { info.n1, info.n2, info.n3, info.n4, info.n5 };
- int[] sqb = { 0, 0, 0 };
- for (int j = 1; j < 6; j++)
- {
- if (kjh.Contains(j))
- sqb[0]++;
- }
- for (int j = 6; j < 11; j++)
- {
- if (kjh.Contains(j))
- sqb[1]++;
- }
- for (int j = 11; j < 16; j++)
- {
- if (kjh.Contains(j))
- sqb[2]++;
- }
- if (qj == 1)
- return sqb[0];
- if (qj == 2)
- return sqb[1];
- if (qj == 3)
- return sqb[2];
- return 0;
- }
- #region 某个数据/形态上一次出现的数据
-
-
-
-
-
-
- public static Fchd15x5Info GetLastNumFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- int size = list.Count;
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- if (kjh.Contains(val))
- {
- info = list[i];
- return info;
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
-
- public static Fchd15x5Info GetLastQjCountFchd15x5Info(ref List<Fchd15x5Info> list, int qj, int count, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- int size = list.Count;
- for (int i = rank - 2; i >= 0; i--)
- {
- int[] sqb = { 0, 0, 0 };
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- for (int j = 1; j < 6; j++)
- {
- if (kjh.Contains(j))
- sqb[0]++;
- }
- for (int j = 6; j < 11; j++)
- {
- if (kjh.Contains(j))
- sqb[1]++;
- }
- for (int j = 11; j < 16; j++)
- {
- if (kjh.Contains(j))
- sqb[2]++;
- }
- if (qj == 1 && sqb[0] == count)
- {
- return list[i];
- }
- if (qj == 2 && sqb[1] == count)
- {
- return list[i];
- }
- if (qj == 3 && sqb[2] == count)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLast4lhFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- int size = list.Count;
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- if (ZstUtils.GetHd15x5_4lh(kjh) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastAcDxFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- int size = list.Count;
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.GetDxBymiddle(list[i].ac, 4) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastAcJoFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- int size = list.Count;
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.GetJo(list[i].ac) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastAcZhFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- int size = list.Count;
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.GetZh(list[i].ac) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastAc012Fchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- int size = list.Count;
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.Get012(list[i].ac) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastAcFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (list[i].ac == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastAczfFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (i > 0)
- {
- if (Math.Abs(list[i].ac - list[i - 1].ac) == val)
- {
- info = list[i];
- return info;
- }
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
-
- public static Fchd15x5Info GetLastNumDxFchd15x5Info(ref List<Fchd15x5Info> list, int val, int site, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (site == 1)
- {
- if (ZstUtils.Get15x5Dx(list[i].n1) == val)
- {
- return list[i];
- }
- }
- if (site == 2)
- {
- if (ZstUtils.Get15x5Dx(list[i].n2) == val)
- {
- return list[i];
- }
- }
- if (site == 3)
- {
- if (ZstUtils.Get15x5Dx(list[i].n3) == val)
- {
- return list[i];
- }
- }
- if (site == 4)
- {
- if (ZstUtils.Get15x5Dx(list[i].n4) == val)
- {
- return list[i];
- }
- }
- if (site == 5)
- {
- if (ZstUtils.Get15x5Dx(list[i].n5) == val)
- {
- return list[i];
- }
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastDxbFchd15x5Info(ref List<Fchd15x5Info> list, string val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- if (ZstUtils.GetHd15x5Dxb(kjh).Equals(val))
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastDxgsFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank, int type)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- string dxb = ZstUtils.GetHd15x5Dxb(kjh);
- string[] dxs = dxb.Split(':');
- int d = 0;
- int x = 0;
- if (dxs != null && dxs.Length > 0)
- {
- d = TypeConverter.ObjectToInt(dxs[0], 0);
- x = TypeConverter.ObjectToInt(dxs[1], 0);
- }
- if (type == 1)
- {
- if (d == val)
- return list[i];
- }
- if (type == 2)
- {
- if (x == val)
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
-
- public static Fchd15x5Info GetLastNumJoFchd15x5Info(ref List<Fchd15x5Info> list, int val, int site, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (site == 1)
- {
- if (ZstUtils.GetJo(list[i].n1) == val)
- {
- return list[i];
- }
- }
- if (site == 2)
- {
- if (ZstUtils.GetJo(list[i].n2) == val)
- {
- return list[i];
- }
- }
- if (site == 3)
- {
- if (ZstUtils.GetJo(list[i].n3) == val)
- {
- return list[i];
- }
- }
- if (site == 4)
- {
- if (ZstUtils.GetJo(list[i].n4) == val)
- {
- return list[i];
- }
- }
- if (site == 5)
- {
- if (ZstUtils.GetJo(list[i].n5) == val)
- {
- return list[i];
- }
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastJobFchd15x5Info(ref List<Fchd15x5Info> list, string val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- if (ZstUtils.GetJob(kjh).Equals(val))
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastJogsFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank, int type)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- string dxb = ZstUtils.GetJob(kjh);
- string[] dxs = dxb.Split(':');
- int d = 0;
- int x = 0;
- if (dxs != null && dxs.Length > 0)
- {
- d = TypeConverter.ObjectToInt(dxs[0], 0);
- x = TypeConverter.ObjectToInt(dxs[1], 0);
- }
- if (type == 1)
- {
- if (d == val)
- return list[i];
- }
- if (type == 2)
- {
- if (x == val)
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
-
- public static Fchd15x5Info GetLastNumZhFchd15x5Info(ref List<Fchd15x5Info> list, int val, int site, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (site == 1)
- {
- if (ZstUtils.GetZh(list[i].n1) == val)
- {
- return list[i];
- }
- }
- if (site == 2)
- {
- if (ZstUtils.GetZh(list[i].n2) == val)
- {
- return list[i];
- }
- }
- if (site == 3)
- {
- if (ZstUtils.GetZh(list[i].n3) == val)
- {
- return list[i];
- }
- }
- if (site == 4)
- {
- if (ZstUtils.GetZh(list[i].n4) == val)
- {
- return list[i];
- }
- }
- if (site == 5)
- {
- if (ZstUtils.GetZh(list[i].n5) == val)
- {
- return list[i];
- }
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastZhbFchd15x5Info(ref List<Fchd15x5Info> list, string val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- if (ZstUtils.GetZhb(kjh).Equals(val))
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastZhgsFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank, int type)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- string dxb = ZstUtils.GetZhb(kjh);
- string[] dxs = dxb.Split(':');
- int d = 0;
- int x = 0;
- if (dxs != null && dxs.Length > 0)
- {
- d = TypeConverter.ObjectToInt(dxs[0], 0);
- x = TypeConverter.ObjectToInt(dxs[1], 0);
- }
- if (type == 1)
- {
- if (d == val)
- return list[i];
- }
- if (type == 2)
- {
- if (x == val)
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
-
- public static Fchd15x5Info GetLastNum012Fchd15x5Info(ref List<Fchd15x5Info> list, int val, int site, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (site == 1)
- {
- if (ZstUtils.Get012(list[i].n1) == val)
- {
- return list[i];
- }
- }
- if (site == 2)
- {
- if (ZstUtils.Get012(list[i].n2) == val)
- {
- return list[i];
- }
- }
- if (site == 3)
- {
- if (ZstUtils.Get012(list[i].n3) == val)
- {
- return list[i];
- }
- }
- if (site == 4)
- {
- if (ZstUtils.Get012(list[i].n4) == val)
- {
- return list[i];
- }
- }
- if (site == 5)
- {
- if (ZstUtils.Get012(list[i].n5) == val)
- {
- return list[i];
- }
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLast012gsFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank, int type)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- List<int> kjh = new List<int> { list[i].n1, list[i].n2, list[i].n3, list[i].n4, list[i].n5 };
- int c1 = ZstUtils.Get012Count(0, kjh);
- int c2 = ZstUtils.Get012Count(1, kjh);
- int c3 = ZstUtils.Get012Count(2, kjh);
- if (type == 0)
- {
- if (c1 == val)
- return list[i];
- }
- if (type == 1)
- {
- if (c2 == val)
- return list[i];
- }
- if (type == 2)
- {
- if (c3 == val)
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
-
- public static Fchd15x5Info GetLastHzFchd15x5Info(ref List<Fchd15x5Info> list, int shz, int ehz, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (list[i].hz >= shz && list[i].hz <= ehz)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastHzJoFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.GetJo(list[i].hz) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastHz012Fchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.Get012(list[i].hz) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastHwFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.GetHw(list[i].hz) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastHwDxFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.GetDx(ZstUtils.GetHw(list[i].hz)) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastHwJoFchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.GetJo(ZstUtils.GetHw(list[i].hz)) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
-
-
-
-
-
-
- public static Fchd15x5Info GetLastHw012Fchd15x5Info(ref List<Fchd15x5Info> list, int val, int rank)
- {
- Fchd15x5Info info = new Fchd15x5Info();
- if (list != null && list.Count > 0)
- {
- for (int i = rank - 2; i >= 0; i--)
- {
- if (ZstUtils.Get012(ZstUtils.GetHw(list[i].hz)) == val)
- {
- return list[i];
- }
- }
- }
- return info;
- }
- #endregion
- #region 开奖公告相关方法
-
-
-
-
- public static List<Fchd15x5LongInfo> GetFchd15x5ListTop30()
- {
- string key = string.Format(CacheKeys.FCHD15X5_KJH_DATA);
- List<Fchd15x5LongInfo> list = cache.GetObject<List<Fchd15x5LongInfo>>(key) as List<Fchd15x5LongInfo>;
- if (list == null)
- {
- list = Fchd15x5Data.GetFchd15x5Top30();
- cache.AddObject(key, list, (int)CacheTime.Kjh);
- }
- return list;
- }
-
-
-
-
- public static Fchd15x5LongInfo GetFchd15x5InfoTop1(ref List<Fchd15x5LongInfo> list)
- {
- Fchd15x5LongInfo info = new Fchd15x5LongInfo();
- if (list.Count > 0)
- {
- info = list[0];
- }
- return info;
- }
-
-
-
-
-
- public static Fchd15x5LongInfo GetFchd15x5InfoByqi(int qi)
- {
- return Fchd15x5Data.GetFchd15x5InfoByQi(qi);
- }
-
-
-
-
-
- public static List<int> GetFchd15x5QiListByYear(int year)
- {
- string key = string.Format(CacheKeys.FCHD15X5_KJH_DATA + "/qilistbyyear/{0}", year);
- List<int> list = cache.GetObject<List<int>>(key) as List<int>;
- if (list == null)
- {
- list = Fchd15x5Data.GetFchd15x5QiListByYear(year);
- cache.AddObject(key, list, (int)CacheTime.System);
- }
- return list;
- }
- #endregion
- }
- }
|