ChartItemRepository.cs 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using CB.Common;
  5. using CB.Entity;
  6. using CB.Interface;
  7. namespace CB.TrendChart
  8. {
  9. public abstract class ChartItemRepository<TEntity> : IChartItem<TEntity> where TEntity : LotteryOpenCode
  10. {
  11. #region 属性
  12. /// <summary>
  13. /// 最大遗漏
  14. /// </summary>
  15. protected int[] _maxMiss;
  16. /// <summary>
  17. /// 开奖记录
  18. /// </summary>
  19. protected int _recordCount;
  20. /// <summary>
  21. /// 平均遗漏
  22. /// </summary>
  23. protected int[] _avgMiss;
  24. /// <summary>
  25. /// 出现次数
  26. /// </summary>
  27. protected int[] _times;
  28. /// <summary>
  29. /// 上期遗漏
  30. /// </summary>
  31. protected int[] _lastMiss;
  32. /// <summary>
  33. /// 当前遗漏数据
  34. /// </summary>
  35. protected int[] _localMiss;
  36. /// <summary>
  37. /// 项配置
  38. /// </summary>
  39. protected TrendChartItemInfo _itemConfig;
  40. /// <summary>
  41. /// 样式配置
  42. /// </summary>
  43. protected ChartCssConfigInfo _cssConfig;
  44. /// <summary>
  45. /// 是否画线
  46. /// </summary>
  47. protected bool _drawLine { get; set; }
  48. /// <summary>
  49. /// 项值
  50. /// </summary>
  51. public string _itemValue;
  52. /// <summary>
  53. /// 项值索引号
  54. /// </summary>
  55. public int _itemIndex;
  56. /// <summary>
  57. /// 上期项值索引值
  58. /// </summary>
  59. public int[] _lastItemIndex;
  60. /// <summary>
  61. /// 上期期号
  62. /// </summary>
  63. public long _lastTerm;
  64. /// <summary>
  65. /// 本期数据实体
  66. /// </summary>
  67. protected TEntity _LocalEntity;
  68. /// <summary>
  69. /// 上期开奖号码(根据配置取出)
  70. /// </summary>
  71. protected IList<int> _LastOpentCode;
  72. /// <summary>
  73. /// 本期索引值
  74. /// </summary>
  75. public int[] _ItemIndex;
  76. #endregion
  77. #region IChartItem 成员
  78. public abstract void Init(ChartCssConfigInfo cssConfig, TrendChartItemInfo itemConfig);
  79. public abstract void MissDataInit(TrendChartData TrendChartCofig, int i);
  80. public abstract string GetMissData(MissDataType missDataType);
  81. public abstract bool SetItemValue(TEntity entity);
  82. public abstract bool SetItemValue(TEntity entity, TEntity lastentity);
  83. public abstract string GetFomartString(string fomart, ChartCssConfigInfo cssConfig = null);
  84. #endregion
  85. /// <summary>
  86. /// 默认初始化方法
  87. /// </summary>
  88. /// <param name="fomartString"></param>
  89. /// <param name="chartItemConfig"></param>
  90. /// <param name="entity"></param>
  91. protected virtual void DefaultInit(ChartCssConfigInfo cssConfig, TrendChartItemInfo itemConfig)
  92. {
  93. this._itemConfig = itemConfig;
  94. this._localMiss = new int[this._itemConfig.ItemCount];
  95. this._cssConfig = cssConfig;
  96. }
  97. /// <summary>
  98. /// 初使化遗漏
  99. /// </summary>
  100. /// <param name="TrendChartCofig">遗漏数据</param>
  101. /// <param name="i">项索引</param>
  102. protected virtual void DefaultMissDataInit(TrendChartData TrendChartCofig, int i)
  103. {
  104. if (1 >= this._itemConfig.ItemCount)
  105. return;
  106. this._maxMiss = new int[this._itemConfig.ItemCount];
  107. this._avgMiss = new int[this._itemConfig.ItemCount];
  108. this._localMiss = new int[this._itemConfig.ItemCount];
  109. this._lastMiss = new int[this._itemConfig.ItemCount];
  110. this._times = new int[this._itemConfig.ItemCount];
  111. if (null == TrendChartCofig)
  112. return;
  113. this._recordCount = TrendChartCofig.RecordCount;
  114. //初使化上期遗漏
  115. string[] array = TrendChartCofig.LastMiss[i].Split(',');
  116. for (int j = array.Length - 1; j >= 0; j--)
  117. {
  118. this._lastMiss[j] = TypeConverter.StrToInt(array[j]);
  119. }
  120. //初使化本期遗漏
  121. array = TrendChartCofig.LocalMiss[i].Split(',');
  122. for (int j = array.Length - 1; j >= 0; j--)
  123. {
  124. this._localMiss[j] = TypeConverter.StrToInt(array[j]);
  125. }
  126. //初使化出现次数
  127. array = TrendChartCofig.AllTimes[i].Split(',');
  128. for (int j = array.Length - 1; j >= 0; j--)
  129. {
  130. this._times[j] = TypeConverter.StrToInt(array[j]);
  131. }
  132. //初使化最大遗漏
  133. array = TrendChartCofig.AllMaxMiss[i].Split(',');
  134. for (int j = array.Length - 1; j >= 0; j--)
  135. {
  136. this._maxMiss[j] = TypeConverter.StrToInt(array[j]);
  137. }
  138. //初使化平均遗漏
  139. array = TrendChartCofig.AllAvgMiss[i].Split(',');
  140. for (int j = array.Length - 1; j >= 0; j--)
  141. {
  142. this._avgMiss[j] = TypeConverter.StrToInt(array[j]);
  143. }
  144. }
  145. /// <summary>
  146. /// 字符串返回遗漏数据(逗号分隔数组)
  147. /// </summary>
  148. /// <param name="missDataType">遗漏数据类型</param>
  149. /// <returns></returns>
  150. protected virtual string GetDefaultMissData(MissDataType missDataType)
  151. {
  152. if (1 >= this._itemConfig.ItemCount)
  153. return "-1";
  154. switch (missDataType)
  155. {
  156. case MissDataType.AllAvgMiss:
  157. return GetMissDataString(this._avgMiss);
  158. case MissDataType.AllMaxMiss:
  159. return GetMissDataString(this._maxMiss);
  160. case MissDataType.AllTimes:
  161. return GetMissDataString(this._times);
  162. case MissDataType.LastMiss:
  163. return GetMissDataString(this._lastMiss);
  164. case MissDataType.LocalMiss:
  165. return GetMissDataString(this._localMiss);
  166. default:
  167. return "";
  168. }
  169. }
  170. /// <summary>
  171. /// 字符串返回遗漏数据(已逗号分隔)
  172. /// </summary>
  173. /// <param name="missDataArray">遗漏数据</param>
  174. /// <returns></returns>
  175. private string GetMissDataString(int[] missDataArray)
  176. {
  177. StringBuilder sb = new StringBuilder(missDataArray.Length * 5);
  178. for (int i = 0; i < missDataArray.Length; i++)
  179. {
  180. sb.Append(missDataArray[i].ToString() + ",");
  181. }
  182. return sb.ToString().TrimEnd(',');
  183. }
  184. /// <summary>
  185. /// 通用获取HTML部分的结构和样式
  186. /// </summary>
  187. /// <param name="fomart"></param>
  188. /// <param name="cssConfig"></param>
  189. /// <returns></returns>
  190. protected virtual Tuple<string, string, string, string> GetFomartHTML(string fomart, ChartCssConfigInfo cssConfig = null)
  191. {
  192. string _fomart = fomart;
  193. string _cssNumber = "", _cssMiss = "", _lineColor = "";
  194. if (string.IsNullOrEmpty(_fomart))
  195. _fomart = "<td {0}>{1}</td>";
  196. _fomart = string.Format(_fomart, "class=\"{0}\"{1}", "{2}");
  197. var css = this._cssConfig;
  198. if (null != cssConfig)
  199. css = cssConfig;
  200. if (null != css)
  201. {
  202. _cssNumber = css.NumberCssName;
  203. _cssMiss = css.MissCssName;
  204. _lineColor = css.LineColor;
  205. }
  206. return new Tuple<string, string, string, string>(_fomart, _cssNumber, _cssMiss, _lineColor);
  207. }
  208. /// <summary>
  209. /// 单列项返回字符串
  210. /// </summary>
  211. /// <param name="fomart"></param>
  212. /// <param name="cssConfig"></param>
  213. /// <returns></returns>
  214. protected string GetSingleCellItemFomartString(string fomart, ChartCssConfigInfo cssConfig = null)
  215. {
  216. var html = GetFomartHTML(fomart, cssConfig);
  217. return string.Format(html.Item1, html.Item2, this._itemValue);
  218. }
  219. #region 单值项计算项值及遗漏计算
  220. /// <summary>
  221. /// 设置单值项 项的值
  222. /// </summary>
  223. /// <param name="entity"></param>
  224. /// <returns></returns>
  225. protected bool SetSingleValue(TEntity entity, TEntity nextentity)
  226. {
  227. bool yes = false;
  228. yes = !entity.OpenCode.Contains(-1);
  229. if (nextentity != null)
  230. {
  231. IList<int> list = new List<int>(nextentity.OpenCode);
  232. if (-1 != this._itemConfig.IndexEnd)
  233. {
  234. for (int i = list.Count - 1; i >= this._itemConfig.IndexEnd; i--)
  235. { list.RemoveAt(this._itemConfig.IndexEnd); }
  236. }
  237. for (int i = 0; i < this._itemConfig.IndexStart; i++)
  238. { list.RemoveAt(0); }
  239. _lastItemIndex = new int[list.Count];
  240. for (int i = 0; i < list.Count; i++)
  241. {
  242. _lastItemIndex[i] = list[i];
  243. }
  244. }
  245. switch (this._itemConfig.FuntionType)
  246. {
  247. case ChartItemType.Term_TermItem:
  248. if (entity.Term > 0)
  249. { this._itemValue = SingleValueFunction.GetTermItemValue(entity); yes = true; }
  250. break;
  251. case ChartItemType.SingleCell_HeWeiItem:
  252. if (!entity.OpenCode.Contains(-1))
  253. {
  254. this._itemValue = SingleValueFunction.GetHeWeiItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd);
  255. yes = true;
  256. }
  257. break;
  258. case ChartItemType.SingleCell_OpenCodeItem:
  259. if (!entity.OpenCode.Contains(-1))
  260. {
  261. this._itemValue = SingleValueFunction.GetOpenCodeItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  262. yes = true;
  263. }
  264. break;
  265. case ChartItemType.SingleCell_ProportionOf012Item:
  266. if (!entity.OpenCode.Contains(-1))
  267. {
  268. this._itemValue = SingleValueFunction.GetProportionOf012ItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  269. yes = true;
  270. }
  271. break;
  272. case ChartItemType.SingleCell_ProportionOfJoItem:
  273. if (!entity.OpenCode.Contains(-1))
  274. {
  275. this._itemValue = SingleValueFunction.GetProportionOfJoItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  276. yes = true;
  277. }
  278. break;
  279. case ChartItemType.SingleCell_ProportionOfDxItem:
  280. if (!entity.OpenCode.Contains(-1))
  281. {
  282. this._itemValue = SingleValueFunction.GetProportionOfDxItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  283. this._itemConfig.ItemCount, this._itemConfig.SplitNumberOfDX);
  284. yes = true;
  285. }
  286. break;
  287. case ChartItemType.SingleCell_ProportionOfZhItem:
  288. if (!entity.OpenCode.Contains(-1))
  289. {
  290. this._itemValue = SingleValueFunction.GetProportionOfZhItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  291. yes = true;
  292. }
  293. break;
  294. case ChartItemType.SingleCell_SpanItem:
  295. if (!entity.OpenCode.Contains(-1))
  296. {
  297. this._itemValue = SingleValueFunction.GetSpanItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  298. yes = true;
  299. }
  300. break;
  301. case ChartItemType.SingleCell_ZSSpanItem:
  302. if (!entity.OpenCode.Contains(-1))
  303. {
  304. this._itemValue = SingleValueFunction.GetZSSpanItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  305. yes = true;
  306. }
  307. break;
  308. case ChartItemType.SingleCell_SumItem:
  309. if (!entity.OpenCode.Contains(-1))
  310. {
  311. this._itemValue = SingleValueFunction.GetSumItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  312. yes = true;
  313. }
  314. break;
  315. case ChartItemType.SingleValue_HzJoStatusItem:
  316. if (!entity.OpenCode.Contains(-1))
  317. {
  318. this._itemValue = SingleValueFunction.GetHzJoStatusValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  319. yes = true;
  320. }
  321. break;
  322. case ChartItemType.SingleValue_HzDxStatusItem:
  323. if (!entity.OpenCode.Contains(-1))
  324. {
  325. this._itemValue = SingleValueFunction.GetHzDxStatusValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.SplitNumberOfDX, this._itemConfig.ItemCount);
  326. yes = true;
  327. }
  328. break;
  329. case ChartItemType.SingleValue_DxStatusItem:
  330. if (!entity.OpenCode.Contains(-1))
  331. {
  332. this._itemValue = SingleValueFunction.GetDxStatusValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  333. yes = true;
  334. }
  335. break;
  336. case ChartItemType.SingleValue_JoStatusItem:
  337. if (!entity.OpenCode.Contains(-1))
  338. {
  339. this._itemValue = SingleValueFunction.GetJoStatusItem(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  340. yes = true;
  341. }
  342. break;
  343. case ChartItemType.SingleCell_ShiJiHao:
  344. if (entity.ShiJiHao.IndexOf("-1") == -1)
  345. {
  346. this._itemValue = SingleValueFunction.GetShiJiHaoItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  347. yes = true;
  348. }
  349. break;
  350. case ChartItemType.SingleValue_ShiJiHao:
  351. if (entity.ShiJiHao.IndexOf("-1") == -1)
  352. {
  353. this._itemValue = SingleValueFunction.GetShiJiHaoSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  354. yes = true;
  355. }
  356. break;
  357. case ChartItemType.SingleValue_ZsStatusItem:
  358. if (!entity.OpenCode.Contains(-1))
  359. {
  360. this._itemValue = SingleValueFunction.GetZsStatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  361. yes = true;
  362. }
  363. break;
  364. case ChartItemType.SingleValue_ZsJoStatusItem:
  365. if (!entity.OpenCode.Contains(-1))
  366. {
  367. this._itemValue = SingleValueFunction.GetZsJoStatusValue(entity);
  368. yes = true;
  369. }
  370. break;
  371. case ChartItemType.SingleCell_012StatusItem:
  372. if (!entity.OpenCode.Contains(-1))
  373. {
  374. this._itemValue = SingleValueFunction.Get012StatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  375. yes = true;
  376. }
  377. break;
  378. case ChartItemType.SingleValue_HeWeiItem:
  379. if (!entity.OpenCode.Contains(-1))
  380. {
  381. this._itemValue = SingleValueFunction.GetHeWeiSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  382. yes = true;
  383. }
  384. break;
  385. case ChartItemType.SingleValue_Hw012:
  386. if (!entity.OpenCode.Contains(-1))
  387. {
  388. this._itemValue = SingleValueFunction.GetHeWei012SingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  389. yes = true;
  390. }
  391. break;
  392. case ChartItemType.SingleValue_JiOuStatusItem:
  393. if (!entity.OpenCode.Contains(-1))
  394. {
  395. this._itemValue = SingleValueFunction.GetJiOuStatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  396. yes = true;
  397. }
  398. break;
  399. case ChartItemType.SingleValue_DaXiaoStatusItem:
  400. if (!entity.OpenCode.Contains(-1))
  401. {
  402. this._itemValue = SingleValueFunction.GetDaXiaoStatusItemValue(entity,
  403. this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount, this._itemConfig.SplitNumberOfDX);
  404. yes = true;
  405. }
  406. break;
  407. case ChartItemType.SingleValue_Number012StatusItem:
  408. if (!entity.OpenCode.Contains(-1))
  409. {
  410. this._itemValue = SingleValueFunction.GetNumber012StatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  411. yes = true;
  412. }
  413. break;
  414. case ChartItemType.SingleValue_NumberItem:
  415. if (!entity.OpenCode.Contains(-1))
  416. {
  417. this._itemValue = SingleValueFunction.GetNumberItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  418. yes = true;
  419. }
  420. break;
  421. case ChartItemType.SingleValue_SpanItem:
  422. if (!entity.OpenCode.Contains(-1))
  423. {
  424. this._itemValue = SingleValueFunction.GetSpanSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  425. yes = true;
  426. }
  427. break;
  428. case ChartItemType.SingleValue_SpanNumberItem:
  429. if (!entity.OpenCode.Contains(-1))
  430. {
  431. this._itemValue = SingleValueFunction.GetSpanNumberItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  432. yes = true;
  433. }
  434. break;
  435. case ChartItemType.SingleValue_SumItem:
  436. if (!entity.OpenCode.Contains(-1))
  437. {
  438. this._itemValue = SingleValueFunction.GetSumSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  439. yes = true;
  440. }
  441. break;
  442. case ChartItemType.SingleValue_ZhiHeStatusItem:
  443. if (!entity.OpenCode.Contains(-1))
  444. {
  445. this._itemValue = SingleValueFunction.GetZhiHeStatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  446. yes = true;
  447. }
  448. break;
  449. case ChartItemType.SingleCell_ZhiHeStatusItem:
  450. if (!entity.OpenCode.Contains(-1))
  451. {
  452. this._itemValue = SingleValueFunction.GetZhiHeItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  453. yes = true;
  454. }
  455. break;
  456. case ChartItemType.SingleValue_ZuHeStatusItem:
  457. if (!entity.OpenCode.Contains(-1))
  458. {
  459. this._itemValue = SingleValueFunction.GetZuHeStatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  460. yes = true;
  461. }
  462. break;
  463. case ChartItemType.SingleCell_Ac:
  464. if (!entity.OpenCode.Contains(-1))
  465. {
  466. this._itemValue = SingleValueFunction.GetAcValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  467. yes = true;
  468. }
  469. break;
  470. case ChartItemType.SingleCell_SanQu:
  471. if (!entity.OpenCode.Contains(-1))
  472. {
  473. this._itemValue = SingleValueFunction.GetSsqsanqu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  474. yes = true;
  475. }
  476. break;
  477. case ChartItemType.SingleCell_AcJiOu:
  478. if (!entity.OpenCode.Contains(-1))
  479. {
  480. this._itemValue = SingleValueFunction.GetAcJiOu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  481. yes = true;
  482. }
  483. break;
  484. case ChartItemType.SingleCell_AcZhiHe:
  485. if (!entity.OpenCode.Contains(-1))
  486. {
  487. this._itemValue = SingleValueFunction.GetAcZhiHe(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  488. yes = true;
  489. }
  490. break;
  491. case ChartItemType.SingleCell_Ac012Lu:
  492. if (!entity.OpenCode.Contains(-1))
  493. {
  494. this._itemValue = SingleValueFunction.GetAc012Lu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  495. yes = true;
  496. }
  497. break;
  498. case ChartItemType.SingleValue_QuJianFenBu:
  499. if (!entity.OpenCode.Contains(-1))
  500. {
  501. this._itemValue = SingleValueFunction.GetQuJianStatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  502. yes = true;
  503. }
  504. break;
  505. case ChartItemType.SingleValue_HeWeiJiOu:
  506. if (!entity.OpenCode.Contains(-1))
  507. {
  508. this._itemValue = SingleValueFunction.GetHeWeiJiOuFenBu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  509. yes = true;
  510. }
  511. break;
  512. case ChartItemType.SingleValue_HeWeiDx:
  513. if (!entity.OpenCode.Contains(-1))
  514. {
  515. this._itemValue = SingleValueFunction.GetHeWeiDxFenBu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.SplitNumberOfDX, this._itemConfig.ItemCount);
  516. yes = true;
  517. }
  518. break;
  519. case ChartItemType.SingleCell_ShiJiHaoHzItem:
  520. if (entity.ShiJiHao.IndexOf("-1") == -1)
  521. {
  522. this._itemValue = SingleValueFunction.GetShiJiHaoHzValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  523. yes = true;
  524. }
  525. break;
  526. case ChartItemType.SingleCell_ShiJiHaoSpanItem:
  527. if (entity.ShiJiHao.IndexOf("-1") == -1)
  528. {
  529. this._itemValue = SingleValueFunction.GetShiJiHaoSpanValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  530. yes = true;
  531. }
  532. break;
  533. case ChartItemType.SingleCell_ProportionOfShiJiHaoJoItem:
  534. if (entity.ShiJiHao.IndexOf("-1") == -1)
  535. {
  536. this._itemValue = SingleValueFunction.GetProportionOfShiJiHaoJoItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  537. yes = true;
  538. }
  539. break;
  540. case ChartItemType.SingleCell_ProportionOfShiJiHaoDxItem:
  541. if (entity.ShiJiHao.IndexOf("-1") == -1)
  542. {
  543. this._itemValue = SingleValueFunction.GetProportionOfShiJiHaoDxItemValue(entity,
  544. this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount, this._itemConfig.SplitNumberOfDX);
  545. yes = true;
  546. }
  547. break;
  548. case ChartItemType.SingleValue_ShiJiHaoTypeItem:
  549. if (entity.ShiJiHao.IndexOf("-1") == -1)
  550. {
  551. this._itemValue = SingleValueFunction.GetShiJiHaoTyepValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  552. yes = true;
  553. }
  554. break;
  555. case ChartItemType.SingleCell_ZsMissItem:
  556. if (!entity.OpenCode.Contains(-1))
  557. {
  558. this._itemValue = SingleValueFunction.GetZsMissItem(entity, ref _lastTerm);
  559. yes = true;
  560. }
  561. break;
  562. case ChartItemType.SingleCell_ZsHaoMaItem:
  563. if (!entity.OpenCode.Contains(-1))
  564. {
  565. this._itemValue = SingleValueFunction.GetZsHaoMaValue(entity);
  566. yes = true;
  567. }
  568. break;
  569. case ChartItemType.SingleValue_ZsDxStatusItem:
  570. if (!entity.OpenCode.Contains(-1))
  571. {
  572. this._itemValue = SingleValueFunction.GetZsDxStatusValue(entity, this._itemConfig.SplitNumberOfDX);
  573. yes = true;
  574. }
  575. break;
  576. case ChartItemType.SingleValue_Zs012StatusItem:
  577. if (!entity.OpenCode.Contains(-1))
  578. {
  579. this._itemValue = SingleValueFunction.GetZs012StatusValue(entity);
  580. yes = true;
  581. }
  582. break;
  583. case ChartItemType.SingleCell_HqItem:
  584. if (!entity.OpenCode.Contains(-1))
  585. {
  586. this._itemValue = SingleValueFunction.GetHqValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  587. yes = true;
  588. }
  589. break;
  590. case ChartItemType.SingleCell_RepeatedNumber:
  591. if (!entity.OpenCode.Contains(-1))
  592. {
  593. this._itemValue = SingleValueFunction.GetRepeatNumItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref _lastItemIndex, this._itemConfig.ItemCount);
  594. yes = true;
  595. }
  596. break;
  597. case ChartItemType.SingleCell_LinkNumber:
  598. if (!entity.OpenCode.Contains(-1))
  599. {
  600. this._itemValue = SingleValueFunction.GetLinkNumItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  601. yes = true;
  602. }
  603. break;
  604. case ChartItemType.SingleValue_SumItemGroup:
  605. if (!entity.OpenCode.Contains(-1))
  606. {
  607. this._itemValue = SingleValueFunction.GetSumSingleValueGroup(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  608. yes = true;
  609. }
  610. break;
  611. case ChartItemType.SingleValue_SX:
  612. if (!entity.OpenCode.Contains(-1))
  613. {
  614. this._itemValue = SingleValueFunction.GetSXStatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  615. yes = true;
  616. }
  617. break;
  618. case ChartItemType.SingleValue_JJ:
  619. if (!entity.OpenCode.Contains(-1))
  620. {
  621. this._itemValue = SingleValueFunction.GetJJStatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  622. yes = true;
  623. }
  624. break;
  625. case ChartItemType.SingleValue_FW:
  626. if (!entity.OpenCode.Contains(-1))
  627. {
  628. this._itemValue = SingleValueFunction.GetFWStatusItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  629. yes = true;
  630. }
  631. break;
  632. case ChartItemType.SingleValue_HB:
  633. if (!entity.OpenCode.Contains(-1))
  634. {
  635. this._itemValue = SingleValueFunction.HBSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref _lastItemIndex, this._itemConfig.ItemCount);
  636. yes = true;
  637. }
  638. break;
  639. case ChartItemType.SingleCell_ZF:
  640. if (!entity.OpenCode.Contains(-1))
  641. {
  642. this._itemValue = SingleValueFunction.ZFSingleCell(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref _lastItemIndex, this._itemConfig.ItemCount);
  643. yes = true;
  644. }
  645. break;
  646. case ChartItemType.SingleCell_FJ31X7SanQu:
  647. if (!entity.OpenCode.Contains(-1))
  648. {
  649. this._itemValue = SingleValueFunction.GetFj31x7sanqu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  650. yes = true;
  651. }
  652. break;
  653. case ChartItemType.SingleCell_FJ36X7SanQu:
  654. if (!entity.OpenCode.Contains(-1))
  655. {
  656. this._itemValue = SingleValueFunction.GetFj36x7sanqu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  657. yes = true;
  658. }
  659. break;
  660. case ChartItemType.SingleValue_ShengXiao:
  661. if (!entity.OpenCode.Contains(-1))
  662. {
  663. this._itemValue = SingleValueFunction.Getdf6j1sx(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  664. yes = true;
  665. }
  666. break;
  667. case ChartItemType.SingleCell_Hd15x5SanQU:
  668. if (!entity.OpenCode.Contains(-1))
  669. {
  670. this._itemValue = SingleValueFunction.Gethd15x5sanqu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  671. yes = true;
  672. }
  673. break;
  674. case ChartItemType.SingleCell_NY36x7Sanqu:
  675. if (!entity.OpenCode.Contains(-1))
  676. {
  677. this._itemValue = SingleValueFunction.Getny36x7sanqu(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  678. yes = true;
  679. }
  680. break;
  681. case ChartItemType.SingleValue_Hd11x5Yq:
  682. if (!entity.OpenCode.Contains(-1))
  683. {
  684. this._itemValue = SingleValueFunction.Gethd15x5Yq(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount, 1, 5);
  685. yes = true;
  686. }
  687. break;
  688. case ChartItemType.SingleValue_Hd11x5Eq:
  689. if (!entity.OpenCode.Contains(-1))
  690. {
  691. this._itemValue = SingleValueFunction.Gethd15x5Eq(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount, 6, 10);
  692. yes = true;
  693. }
  694. break;
  695. case ChartItemType.SingleValue_Hd11x5Sq:
  696. if (!entity.OpenCode.Contains(-1))
  697. {
  698. this._itemValue = SingleValueFunction.Gethd15x5Sq(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount, 11, 15);
  699. yes = true;
  700. }
  701. break;
  702. case ChartItemType.SingleCell_Hz012:
  703. if (!entity.OpenCode.Contains(-1))
  704. {
  705. this._itemValue = SingleValueFunction.GetHz012Value(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  706. yes = true;
  707. }
  708. break;
  709. case ChartItemType.SingleValue_K3sbt:
  710. if (!entity.OpenCode.Contains(-1))
  711. {
  712. this._itemValue = SingleValueFunction.GetK3sbtValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount, this._itemConfig.ItemString);
  713. yes = true;
  714. }
  715. break;
  716. case ChartItemType.SingleCell_K3ebt:
  717. if (!entity.OpenCode.Contains(-1))
  718. {
  719. this._itemValue = SingleValueFunction.GetEbtValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  720. yes = true;
  721. }
  722. break;
  723. case ChartItemType.SingleValue_JoValue:
  724. if (!entity.OpenCode.Contains(-1))
  725. {
  726. this._itemValue = SingleValueFunction.GetJoValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  727. yes = true;
  728. }
  729. break;
  730. case ChartItemType.SingleValue_DxValue:
  731. if (!entity.OpenCode.Contains(-1))
  732. {
  733. this._itemValue = SingleValueFunction.GetDxValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount, this._itemConfig.SplitNumberOfDX); ;
  734. yes = true;
  735. }
  736. break;
  737. case ChartItemType.SingleValue_ZhValue:
  738. if (!entity.OpenCode.Contains(-1))
  739. {
  740. this._itemValue = SingleValueFunction.GetZhValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  741. yes = true;
  742. }
  743. break;
  744. case ChartItemType.SingleValue_DxjoValue:
  745. if (!entity.OpenCode.Contains(-1))
  746. {
  747. this._itemValue = SingleValueFunction.GetDxjoValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.SplitNumberOfDX, this._itemConfig.ItemCount);
  748. yes = true;
  749. }
  750. break;
  751. case ChartItemType.SingleValue_XsValue://小数个数
  752. if (!entity.OpenCode.Contains(-1))
  753. {
  754. this._itemValue = SingleValueFunction.GetXsValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount, this._itemConfig.SplitNumberOfDX);
  755. yes = true;
  756. }
  757. break;
  758. case ChartItemType.SingleValue_HsValue://合数个数
  759. if (!entity.OpenCode.Contains(-1))
  760. {
  761. this._itemValue = SingleValueFunction.GetHsValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  762. yes = true;
  763. }
  764. break;
  765. case ChartItemType.SingleValue_OsValue://偶数个数
  766. if (!entity.OpenCode.Contains(-1))
  767. {
  768. this._itemValue = SingleValueFunction.GetOsValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  769. yes = true;
  770. }
  771. break;
  772. case ChartItemType.SingleValue_SJP://升降平
  773. if (!entity.OpenCode.Contains(-1))
  774. {
  775. this._itemValue = SingleValueFunction.SJPSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref _lastItemIndex, this._itemConfig.ItemCount);
  776. yes = true;
  777. }
  778. break;
  779. case ChartItemType.SingleValue_HwSjp://升降平
  780. if (!entity.OpenCode.Contains(-1))
  781. {
  782. this._itemValue = SingleValueFunction.HwSjpSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref _lastItemIndex, this._itemConfig.ItemCount);
  783. yes = true;
  784. }
  785. break;
  786. //2016-12-28后新增
  787. //快乐扑克_开奖号
  788. case ChartItemType.SingleValue_KLPKKJValue:
  789. var _klpk_entity1 = entity as CB.Entity.Frequency.KLPK3Info_ShanDong;
  790. if (_klpk_entity1 != null)
  791. {
  792. this._itemValue = SingleValueFunction.GetTCKLPK_KaiJiangHao(_klpk_entity1, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  793. yes = true;
  794. }
  795. break;
  796. case ChartItemType.SingleValue_KLPKXTValue:
  797. var _klpk_entity2 = entity as CB.Entity.Frequency.KLPK3Info_ShanDong;
  798. if (_klpk_entity2 != null)
  799. {
  800. this._itemValue = SingleValueFunction.GetTCKLPK3_XingTai(_klpk_entity2);
  801. yes = true;
  802. }
  803. break;
  804. case ChartItemType.SingleValue_KLPKXTFBValue:
  805. var _klpk_entity3 = entity as CB.Entity.Frequency.KLPK3Info_ShanDong;
  806. if (_klpk_entity3 != null)
  807. {
  808. this._itemValue = SingleValueFunction.GetTCKLPK3_XingTaiFenBu(_klpk_entity3);
  809. yes = true;
  810. }
  811. break;
  812. case ChartItemType.SingleValue_KLPKHZValue:
  813. this._itemValue = SingleValueFunction.GetTCKLPK3_Hz(entity as CB.Entity.Frequency.KLPK3Info_ShanDong);
  814. yes = true;
  815. break;
  816. case ChartItemType.SingleValue_Max:
  817. if (!entity.OpenCode.Contains(-1))
  818. {
  819. this._itemValue = SingleValueFunction.GetMaxSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  820. yes = true;
  821. }
  822. break;
  823. case ChartItemType.SingleValue_Min:
  824. if (!entity.OpenCode.Contains(-1))
  825. {
  826. this._itemValue = SingleValueFunction.GetMinSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  827. yes = true;
  828. }
  829. break;
  830. case ChartItemType.SingleValue_Avg:
  831. if (!entity.OpenCode.Contains(-1))
  832. {
  833. this._itemValue = SingleValueFunction.GetAvgSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  834. yes = true;
  835. }
  836. break;
  837. case ChartItemType.SingleValue_Hkh:
  838. if (!entity.OpenCode.Contains(-1))
  839. {
  840. this._itemValue = SingleValueFunction.GetHkhSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  841. yes = true;
  842. }
  843. break;
  844. case ChartItemType.SingleValue_Hkc:
  845. if (!entity.OpenCode.Contains(-1))
  846. {
  847. this._itemValue = SingleValueFunction.GetHkcSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  848. yes = true;
  849. }
  850. break;
  851. case ChartItemType.SingleValue_Whz:
  852. if (!entity.OpenCode.Contains(-1))
  853. {
  854. this._itemValue = SingleValueFunction.GetWhzSingleValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  855. yes = true;
  856. }
  857. break;
  858. case ChartItemType.SingleValue_KLPKHSValue:
  859. this._itemValue = SingleValueFunction.GetTCKLPK3OpenCodeSuit(entity as CB.Entity.Frequency.KLPK3Info_ShanDong,
  860. this._itemConfig.IndexStart, this._itemConfig.IndexEnd);
  861. yes = true;
  862. break;
  863. case ChartItemType.SingleValue_XYSCColor:
  864. if (!entity.OpenCode.Contains(-1))
  865. {
  866. this._itemValue = SingleValueFunction.GetTCXYSCOpenCodeColor(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  867. yes = true;
  868. }
  869. break;
  870. case ChartItemType.SingleValue_XYSC012:
  871. if (!entity.OpenCode.Contains(-1))
  872. {
  873. this._itemValue = SingleValueFunction.GetTCXYSCOpenCodeDivide(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  874. yes = true;
  875. }
  876. break;
  877. case ChartItemType.SingleValue_YTDJZuXuan:
  878. if (!entity.OpenCode.Contains(-1))
  879. {
  880. this._itemValue = SingleValueFunction.GetTCYTDJOpenCodeZuXuan(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd, this._itemConfig.ItemCount);
  881. yes = true;
  882. }
  883. break;
  884. }
  885. if (yes)
  886. this._LocalEntity = entity;
  887. return yes;
  888. }
  889. /// <summary>
  890. /// 单列项计算项值
  891. /// </summary>
  892. /// <param name="entity"></param>
  893. /// <returns></returns>
  894. protected bool SetSingleValueAndMiss(TEntity entity, TEntity nextentity)
  895. {
  896. if (!SetSingleValue(entity, nextentity))
  897. return false;
  898. //求遗漏
  899. if (1 < this._itemConfig.ItemCount)
  900. switch (this._itemConfig.FuntionType)
  901. {
  902. case ChartItemType.SingleValue_SumItemGroup:
  903. for (var i = this._itemConfig.ItemCount - 1; i >= 0; i--)
  904. {
  905. this._localMiss[i]++;
  906. if (Convert.ToInt32(this._itemValue) >=
  907. Convert.ToInt32(this._itemConfig.ItemString[i].Split('|')[0]) &&
  908. Convert.ToInt32(this._itemValue) <=
  909. Convert.ToInt32(this._itemConfig.ItemString[i].Split('|')[1]))
  910. {
  911. if (null != this._lastMiss)
  912. this._lastMiss[i] = this._localMiss[i];//上期遗漏
  913. this._localMiss[i] = 0;//重置当前遗漏
  914. if (null != this._times)
  915. this._times[i]++;//出现次数加1
  916. this._itemIndex = i;//设置项值索引号
  917. }
  918. //最大遗漏
  919. if (null != this._maxMiss)
  920. if (this._localMiss[i] > this._maxMiss[i])
  921. { this._maxMiss[i] = this._localMiss[i]; }
  922. //this._avgMiss[i] = this._maxMiss[i] / (this._times[i] + 1);//计算平均遗漏
  923. if (null != this._avgMiss && null != this._times)
  924. this._avgMiss[i] = (this._recordCount - this._times[i]) / (this._times[i] + 1);//计算平均遗漏
  925. }
  926. break;
  927. case ChartItemType.SingleValue_QuJianFenBu:
  928. for (var i = this._itemConfig.ItemCount - 1; i >= 0; i--)
  929. {
  930. this._localMiss[i]++;//当前遗漏
  931. if (Convert.ToInt32(this._itemValue) >=
  932. Convert.ToInt32(this._itemConfig.ItemString[i].Split('|')[0]) &&
  933. Convert.ToInt32(this._itemValue) <=
  934. Convert.ToInt32(this._itemConfig.ItemString[i].Split('|')[1]))
  935. {
  936. if (null != this._lastMiss)
  937. this._lastMiss[i] = this._localMiss[i];//上期遗漏
  938. this._localMiss[i] = 0;//重置当前遗漏
  939. if (null != this._times)
  940. this._times[i]++;//出现次数加1
  941. this._itemIndex = i;//设置项值索引号
  942. }
  943. //最大遗漏
  944. if (null != this._maxMiss)
  945. if (this._localMiss[i] > this._maxMiss[i])
  946. { this._maxMiss[i] = this._localMiss[i]; }
  947. //this._avgMiss[i] = this._maxMiss[i] / (this._times[i] + 1);//计算平均遗漏
  948. if (null != this._avgMiss && null != this._times)
  949. this._avgMiss[i] = (this._recordCount - this._times[i]) / (this._times[i] + 1);//计算平均遗漏
  950. }
  951. break;
  952. default:
  953. for (var i = this._itemConfig.ItemCount - 1; i >= 0; i--)
  954. {
  955. this._localMiss[i]++;
  956. if (this._itemValue == this._itemConfig.ItemString[i])
  957. {
  958. if (null != this._lastMiss)
  959. this._lastMiss[i] = this._localMiss[i];//上期遗漏
  960. this._localMiss[i] = 0;//重置当前遗漏
  961. if (null != this._times)
  962. this._times[i]++;//出现次数加1
  963. this._itemIndex = i;//设置项值索引号
  964. }
  965. //最大遗漏
  966. if (null != this._maxMiss)
  967. if (this._localMiss[i] > this._maxMiss[i])
  968. { this._maxMiss[i] = this._localMiss[i]; }
  969. //this._avgMiss[i] = this._maxMiss[i] / (this._times[i] + 1);//计算平均遗漏
  970. if (null != this._avgMiss && null != this._times)
  971. this._avgMiss[i] = (this._recordCount - this._times[i]) / (this._times[i] + 1);//计算平均遗漏
  972. }
  973. break;
  974. }
  975. return true;
  976. }
  977. #endregion
  978. #region 多值项计算项值及遗漏计算
  979. /// <summary>
  980. /// 设置多值项 项的值
  981. /// </summary>
  982. /// <param name="entity"></param>
  983. /// <param name="index">项值索引</param>
  984. /// <param name="missNumber">遗漏</param>
  985. protected bool SetMultiValueAndMiss(TEntity entity, ref int[] index, ref int[] missNumber)
  986. {
  987. bool yes = false;
  988. yes = !entity.OpenCode.Contains(-1);
  989. switch (this._itemConfig.FuntionType)
  990. {
  991. #region 全国性彩种
  992. case ChartItemType.MultiValue_OpenCodeItem:
  993. MultiValueFunction.SetOpenCodeItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  994. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount);
  995. break;
  996. case ChartItemType.MultiValue_LinkNumber:
  997. MultiValueFunction.SetLinkNumberValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  998. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount);
  999. break;
  1000. case ChartItemType.MultiValue_RepeatNumber:
  1001. MultiValueFunction.SetRepeatNumberValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1002. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, ref this._LastOpentCode, ref this._lastItemIndex);
  1003. break;
  1004. case ChartItemType.MultiValue_ZheHaoNumber:
  1005. MultiValueFunction.SetZheHaoHaoNumberValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1006. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, ref this._LastOpentCode, ref this._lastItemIndex);
  1007. break;
  1008. case ChartItemType.MultiValue_XieLianHaoNumber:
  1009. MultiValueFunction.SetXieLianHaoNumberValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1010. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, ref this._LastOpentCode, ref this._lastItemIndex);
  1011. break;
  1012. case ChartItemType.MultiValue_XieTiaoHaoNumber:
  1013. MultiValueFunction.SetTiaoHaoNumberValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1014. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, ref this._LastOpentCode, ref this._lastItemIndex);
  1015. break;
  1016. case ChartItemType.MultiValue_ShuSanLianHaoNumber:
  1017. MultiValueFunction.SetShuSanLianHaoNumberValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1018. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, ref this._LastOpentCode, ref this._lastItemIndex);
  1019. break;
  1020. case ChartItemType.MultiValue_ShuTiaoHaoNumber:
  1021. MultiValueFunction.SetShuTiaoHaoNumberValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1022. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, ref this._LastOpentCode, ref this._lastItemIndex);
  1023. break;
  1024. case ChartItemType.MultiValue_K3ebt:
  1025. MultiValueFunction.SetK3ebtItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1026. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, this._itemConfig.ItemString);
  1027. break;
  1028. case ChartItemType.MultiValue_Sbtxt:
  1029. MultiValueFunction.SetSbtxtItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1030. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, this._itemConfig.ItemString);
  1031. break;
  1032. case ChartItemType.MultiValue_Ebtxt:
  1033. MultiValueFunction.SetEbtxtItemValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1034. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, this._itemConfig.ItemString);
  1035. break;
  1036. #endregion
  1037. #region 高频彩种
  1038. case ChartItemType.MultiValue_KL12:
  1039. MultiValueFunction.SetKL12NumberValue(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1040. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount, ref this._LastOpentCode, ref this._lastItemIndex);
  1041. break;
  1042. //2016-12-28新增
  1043. //快乐扑克3-号码分布
  1044. case ChartItemType.MultiValue_KLPKHMFBValue:
  1045. var _klpk_entity1 = entity as CB.Entity.Frequency.KLPK3Info_ShanDong;
  1046. if (_klpk_entity1 != null)
  1047. MultiValueFunction.GetTCKLPK3_HaoMaFengBu(_klpk_entity1, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1048. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount);
  1049. break;
  1050. case ChartItemType.SingleValue_KLPKHZFBValue:
  1051. SingleValueFunction.GetTCKLPK3_HZFB(entity as CB.Entity.Frequency.KLPK3Info_ShanDong, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1052. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref missNumber, ref this._lastMiss, ref this._maxMiss, ref this._times, ref this._avgMiss, this._recordCount);
  1053. yes = true;
  1054. break;
  1055. #endregion
  1056. }
  1057. if (yes)
  1058. this._LocalEntity = entity;
  1059. return yes;
  1060. }
  1061. #endregion
  1062. #region 特殊项的计算
  1063. protected bool SetSpecialValue(TEntity entity, ref int[] index, ref int[] itemIndex)
  1064. {
  1065. bool yes = false;
  1066. yes = !entity.OpenCode.Contains(-1);
  1067. switch (this._itemConfig.FuntionType)
  1068. {
  1069. case ChartItemType.SpecialValue_FC3D012_4:
  1070. SpecialValueFunction.SpecialValue_FC3D012_4(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1071. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index);
  1072. break;
  1073. case ChartItemType.SpecialValue_TCP3012_4:
  1074. SpecialValueFunction.SpecialValue_FC3D012_4(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1075. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index);
  1076. break;
  1077. case ChartItemType.SpecialValue_FCSSQ_ChuHaoPL:
  1078. SpecialValueFunction.SpecialValue_FCSSQ_ChuHaoPL(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1079. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref itemIndex);
  1080. break;
  1081. case ChartItemType.SpecialValue_TCDLT_ChuHaoPL:
  1082. SpecialValueFunction.SpecialValue_TCDLT_ChuHaoPL(entity, this._itemConfig.IndexStart, this._itemConfig.IndexEnd,
  1083. this._itemConfig.ItemCount, this._itemConfig.ItemMinValue, this._itemConfig.ItemMaxValue, ref index, ref itemIndex);
  1084. break;
  1085. }
  1086. if (yes)
  1087. this._LocalEntity = entity;
  1088. return yes;
  1089. }
  1090. #endregion
  1091. #region 样式设置
  1092. public string GetHtml(bool isValue, string fomart, string attr, string itemValue, int index)
  1093. {
  1094. string value = "";
  1095. switch (this._itemConfig.FuntionType)
  1096. {
  1097. #region 多值
  1098. case ChartItemType.MultiValue_ZheHaoNumber:
  1099. value = CssValueFunction.MultiValue_ZheHaoNumber(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1100. break;
  1101. case ChartItemType.MultiValue_XieLianHaoNumber:
  1102. value = CssValueFunction.MultiValue_XieLianHaoNumber(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1103. break;
  1104. case ChartItemType.MultiValue_XieTiaoHaoNumber:
  1105. value = CssValueFunction.MultiValue_XieTiaoHaoNumber(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1106. break;
  1107. case ChartItemType.MultiValue_ShuSanLianHaoNumber:
  1108. value = CssValueFunction.MultiValue_ShuSanLianHaoNumber(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1109. break;
  1110. case ChartItemType.MultiValue_KLPKHMFBValue:
  1111. case ChartItemType.MultiValue_OpenCodeItem:
  1112. //多值多值开奖号
  1113. value = CssValueFunction.MultiValue_OpenCodeItem(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1114. break;
  1115. case ChartItemType.MultiValue_LinkNumber:
  1116. //多值多列重号
  1117. value = CssValueFunction.MultiValue_LinkNumber(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1118. break;
  1119. case ChartItemType.MultiValue_ShuTiaoHaoNumber:
  1120. //多值多列坚跳号
  1121. value = CssValueFunction.MultiValue_ShuTiaoHaoNumber(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1122. break;
  1123. //多值多列重号分布
  1124. case ChartItemType.MultiValue_RepeatNumber:
  1125. value = CssValueFunction.MultiValue_RepeatNumber(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1126. break;
  1127. case ChartItemType.MultiValue_K3ebt:
  1128. value = CssValueFunction.SetK3ebtItemValue(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1129. break;
  1130. case ChartItemType.MultiValue_Ebtxt:
  1131. value = CssValueFunction.SetEbtxtItemValue(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1132. break;
  1133. case ChartItemType.MultiValue_Sbtxt:
  1134. value = CssValueFunction.SetSbtxtItemValue(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1135. break;
  1136. #endregion
  1137. #region 单值
  1138. //单值单列期号
  1139. case ChartItemType.Term_TermItem:
  1140. value = CssValueFunction.SingleCell_TermItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1141. break;
  1142. //单值单列和尾
  1143. case ChartItemType.SingleCell_HeWeiItem:
  1144. value = CssValueFunction.SingleCell_HeWeiItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1145. break;
  1146. //单值单列开奖号码
  1147. case ChartItemType.SingleCell_OpenCodeItem:
  1148. value = CssValueFunction.SingleCell_OpenCodeItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1149. break;
  1150. //单值单列012比
  1151. case ChartItemType.SingleCell_ProportionOf012Item:
  1152. value = CssValueFunction.SingleCell_ProportionOf012Item(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1153. break;
  1154. //单值单列奇偶比例
  1155. case ChartItemType.SingleCell_ProportionOfJoItem:
  1156. value = CssValueFunction.SingleCell_ProportionOfJoItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1157. break;
  1158. //单值单列大小比例
  1159. case ChartItemType.SingleCell_ProportionOfDxItem:
  1160. value = CssValueFunction.SingleCell_ProportionOfDxItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1161. break;
  1162. //单值单列质合比例
  1163. case ChartItemType.SingleCell_ProportionOfZhItem:
  1164. value = CssValueFunction.SingleCell_ProportionOfZhItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1165. break;
  1166. //单值单列跨度
  1167. case ChartItemType.SingleCell_SpanItem:
  1168. value = CssValueFunction.SingleCell_SpanItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1169. break;
  1170. //单值单列组三跨度
  1171. case ChartItemType.SingleCell_ZSSpanItem:
  1172. value = CssValueFunction.SingleCell_ZSSpanItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1173. break;
  1174. //单值单列和值
  1175. case ChartItemType.SingleCell_SumItem:
  1176. value = CssValueFunction.SingleCell_SumItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1177. break;
  1178. //单值多列开奖号码和值奇偶分布
  1179. case ChartItemType.SingleValue_HzJoStatusItem:
  1180. value = CssValueFunction.SingleValue_HzJoStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1181. break;
  1182. //单值多列开奖号码和值大小分布
  1183. case ChartItemType.SingleValue_HzDxStatusItem:
  1184. value = CssValueFunction.SingleValue_HzDxStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1185. break;
  1186. case ChartItemType.SingleValue_DxStatusItem:
  1187. break;
  1188. case ChartItemType.SingleValue_JoStatusItem:
  1189. break;
  1190. //单值单列期试机号
  1191. case ChartItemType.SingleCell_ShiJiHao:
  1192. value = CssValueFunction.SingleCell_ShiJiHaoItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1193. break;
  1194. //单值多列试机号分布
  1195. case ChartItemType.SingleValue_ShiJiHao:
  1196. value = CssValueFunction.SingleValue_ShiJiHao(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1197. break;
  1198. //单值多列组三形态
  1199. case ChartItemType.SingleValue_ZsStatusItem:
  1200. value = CssValueFunction.SingleValue_ZsStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1201. break;
  1202. //单值多列组三奇偶形态
  1203. case ChartItemType.SingleValue_ZsJoStatusItem:
  1204. value = CssValueFunction.SingleValue_ZsJoStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1205. break;
  1206. //单值单列开奖号012路值
  1207. case ChartItemType.SingleCell_012StatusItem:
  1208. value = CssValueFunction.SingleCell_012StatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1209. break;
  1210. //单值多列和尾分布项
  1211. case ChartItemType.SingleValue_HeWeiItem:
  1212. value = CssValueFunction.SingleValue_HeWeiItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1213. break;
  1214. case ChartItemType.SingleValue_Hw012:
  1215. value = CssValueFunction.SingleValue_HeWei012Item(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1216. break;
  1217. //单值多列奇偶状态项
  1218. case ChartItemType.SingleValue_JiOuStatusItem:
  1219. value = CssValueFunction.SingleValue_JiOuStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1220. break;
  1221. //单值多列大小状态项
  1222. case ChartItemType.SingleValue_DaXiaoStatusItem:
  1223. value = CssValueFunction.SingleValue_DaXiaoStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1224. break;
  1225. //单值多列012分布项
  1226. case ChartItemType.SingleValue_Number012StatusItem:
  1227. value = CssValueFunction.SingleValue_Number012StatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1228. break;
  1229. //单值多列号码项
  1230. case ChartItemType.SingleValue_NumberItem:
  1231. value = CssValueFunction.SingleValue_NumberItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1232. break;
  1233. //单值多列多于两个号码跨度
  1234. case ChartItemType.SingleValue_SpanItem:
  1235. value = CssValueFunction.SingleValue_SpanItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1236. break;
  1237. //单值多列两个号码跨度
  1238. case ChartItemType.SingleValue_SpanNumberItem:
  1239. value = CssValueFunction.SingleValue_SpanNumberItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1240. break;
  1241. //单值多列开奖号码和值分布
  1242. case ChartItemType.SingleValue_SumItem:
  1243. value = CssValueFunction.SingleValue_SumItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1244. break;
  1245. //单值单列开奖号码质合项
  1246. case ChartItemType.SingleCell_ZhiHeStatusItem:
  1247. value = CssValueFunction.SingleCell_ZhiHeStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1248. break;
  1249. //单值多列开奖号码质合分布项
  1250. case ChartItemType.SingleValue_ZhiHeStatusItem:
  1251. value = CssValueFunction.SingleValue_ZhiHeStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1252. break;
  1253. //单值多列组三类型
  1254. case ChartItemType.SingleValue_ZuHeStatusItem:
  1255. value = CssValueFunction.SingleValue_ZuHeStatusItem(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1256. break;
  1257. //单值单列AC值
  1258. case ChartItemType.SingleCell_Ac:
  1259. value = CssValueFunction.SingleCell_Ac(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1260. break;
  1261. //单值单列双色球三区比
  1262. case ChartItemType.SingleCell_SanQu:
  1263. value = CssValueFunction.SingleCell_SanQu(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1264. break;
  1265. //单值单列福建31选7三区比
  1266. case ChartItemType.SingleCell_FJ31X7SanQu:
  1267. value = CssValueFunction.SingleCell_FJ31X7SanQu(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1268. break;
  1269. //单值单列福建36选7三区比
  1270. case ChartItemType.SingleCell_FJ36X7SanQu:
  1271. value = CssValueFunction.SingleCell_FJ36X7SanQu(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1272. break;
  1273. //单值单列华东15选5三区比
  1274. case ChartItemType.SingleCell_Hd15x5SanQU:
  1275. value = CssValueFunction.SingleCell_HD15X5SanQu(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1276. break;
  1277. //单值单列南粤36选7三区比
  1278. case ChartItemType.SingleCell_NY36x7Sanqu:
  1279. value = CssValueFunction.SingleCell_NY36x7SanQu(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1280. break;
  1281. //单值单列AC值奇偶值
  1282. case ChartItemType.SingleCell_AcJiOu:
  1283. value = CssValueFunction.SingleCell_AcJiOu(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1284. break;
  1285. //单值单列AC值质合值
  1286. case ChartItemType.SingleCell_AcZhiHe:
  1287. value = CssValueFunction.SingleCell_AcZhiHe(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1288. break;
  1289. //单值单列AC值012路
  1290. case ChartItemType.SingleCell_Ac012Lu:
  1291. value = CssValueFunction.SingleCell_Ac012Lu(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1292. break;
  1293. case ChartItemType.SingleValue_QuJianFenBu:
  1294. break;
  1295. //和尾奇偶状态
  1296. case ChartItemType.SingleValue_HeWeiJiOu:
  1297. value = CssValueFunction.SingleValue_HeWeiJiOu(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1298. break;
  1299. case ChartItemType.SingleValue_HeWeiDx:
  1300. value = CssValueFunction.SingleValue_HeWeiDx(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1301. break;
  1302. //单值单列试机号和值项
  1303. case ChartItemType.SingleCell_ShiJiHaoHzItem:
  1304. value = CssValueFunction.SingleCell_ShiJiHaoHzItem(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1305. break;
  1306. //单值单列试机号跨度项
  1307. case ChartItemType.SingleCell_ShiJiHaoSpanItem:
  1308. value = CssValueFunction.SingleCell_ShiJiHaoSpanItem(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1309. break;
  1310. //单值单列试机号奇偶比项
  1311. case ChartItemType.SingleCell_ProportionOfShiJiHaoJoItem:
  1312. value = CssValueFunction.SingleCell_ProportionOfShiJiHaoJoItem(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1313. break;
  1314. //单值单列试机号大小比项
  1315. case ChartItemType.SingleCell_ProportionOfShiJiHaoDxItem:
  1316. value = CssValueFunction.SingleCell_ProportionOfShiJiHaoDxItem(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1317. break;
  1318. //单值多列试机号大小比项
  1319. case ChartItemType.SingleValue_ShiJiHaoTypeItem:
  1320. value = CssValueFunction.SingleValue_ShiJiHaoTypeItem(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1321. break;
  1322. //单值单列组三遗漏
  1323. case ChartItemType.SingleCell_ZsMissItem:
  1324. value = CssValueFunction.SingleCell_ZsMissItem(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1325. break;
  1326. //单值单列组三号码
  1327. case ChartItemType.SingleCell_ZsHaoMaItem:
  1328. value = CssValueFunction.SingleCell_ZsHaoMaItem(this._LocalEntity, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1329. break;
  1330. //单值多列组三大小形态
  1331. case ChartItemType.SingleValue_ZsDxStatusItem:
  1332. value = CssValueFunction.SingleValue_ZsDxStatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1333. break;
  1334. //单值多列组三012形态
  1335. case ChartItemType.SingleValue_Zs012StatusItem:
  1336. value = CssValueFunction.SingleValue_Zs012StatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1337. break;
  1338. // 单值单列后区号码
  1339. case ChartItemType.SingleCell_HqItem:
  1340. value = CssValueFunction.SingleCell_HqItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1341. break;
  1342. //单值单列重号
  1343. case ChartItemType.SingleCell_RepeatedNumber:
  1344. value = CssValueFunction.SingleCell_RepeatedNumber(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1345. break;
  1346. //单值单列连号
  1347. case ChartItemType.SingleCell_LinkNumber:
  1348. value = CssValueFunction.SingleCell_LinkNumber(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1349. break;
  1350. //和值(区间)分布
  1351. case ChartItemType.SingleValue_SumItemGroup:
  1352. value = CssValueFunction.SingleValue_SumItemGroup(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1353. break;
  1354. //和值正幅
  1355. case ChartItemType.SingleCell_ZF:
  1356. value = CssValueFunction.SingleCell_ZF(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1357. break;
  1358. //生肖
  1359. case ChartItemType.SingleValue_ShengXiao:
  1360. value = CssValueFunction.SingleValue_ShengXiao(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1361. break;
  1362. case ChartItemType.SingleValue_Hd11x5Yq:
  1363. value = CssValueFunction.SingleValue_Hd11x5Yq(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1364. break;
  1365. case ChartItemType.SingleValue_Hd11x5Eq:
  1366. value = CssValueFunction.SingleValue_Hd11x5Eq(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1367. break;
  1368. case ChartItemType.SingleValue_Hd11x5Sq:
  1369. value = CssValueFunction.SingleValue_Hd11x5Sq(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1370. break;
  1371. case ChartItemType.SingleCell_Hz012:
  1372. value = CssValueFunction.SingleCell_Hz012(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1373. break;
  1374. case ChartItemType.SingleValue_K3sbt:
  1375. value = CssValueFunction.SingleCell_K3sbt(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1376. break;
  1377. case ChartItemType.SingleCell_K3ebt:
  1378. value = CssValueFunction.SingleCell_K3ebt(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1379. break;
  1380. case ChartItemType.SingleValue_JoValue:
  1381. case ChartItemType.SingleValue_OsValue:
  1382. value = CssValueFunction.SingleValue_JoValue(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1383. break;
  1384. case ChartItemType.SingleValue_DxValue:
  1385. value = CssValueFunction.SingleValue_DxValue(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1386. break;
  1387. case ChartItemType.SingleValue_XsValue:
  1388. value = CssValueFunction.SingleValue_DxValue(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1389. break;
  1390. case ChartItemType.SingleValue_ZhValue:
  1391. case ChartItemType.SingleValue_HsValue:
  1392. value = CssValueFunction.SingleValue_ZhValue(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1393. break;
  1394. case ChartItemType.SingleValue_DxjoValue:
  1395. value = CssValueFunction.SingleValue_DxJoValue(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1396. break;
  1397. #endregion
  1398. #region 特殊
  1399. case ChartItemType.SpecialValue_FC3D012_4:
  1400. value = CssValueFunction.SpecialValue_FC3D012_4(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1401. break;
  1402. case ChartItemType.SpecialValue_TCP3012_4:
  1403. value = CssValueFunction.SpecialValue_TCP3012_4(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1404. break;
  1405. case ChartItemType.SpecialValue_FCSSQ_ChuHaoPL:
  1406. value = CssValueFunction.SpecialValue_FCSSQ_ChuHaoPL(this._LocalEntity, this._itemConfig, this._cssConfig, this._ItemIndex, fomart);
  1407. break;
  1408. #endregion
  1409. #region 高频
  1410. case ChartItemType.MultiValue_KL12:
  1411. value = CssValueFunction.MultiValue_KL12(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1412. break;
  1413. //单值多列回摆
  1414. case ChartItemType.SingleValue_HB:
  1415. value = CssValueFunction.SingleValue_HB(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1416. break;
  1417. case ChartItemType.SingleValue_SJP:
  1418. value = CssValueFunction.SingleValue_SJP(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1419. break;
  1420. case ChartItemType.SingleValue_HwSjp:
  1421. value = CssValueFunction.SingleValue_HwSjp(this._LocalEntity, this._itemConfig, isValue, fomart, attr, this._cssConfig, itemValue, index);
  1422. break;
  1423. case ChartItemType.SingleValue_Max:
  1424. value = CssValueFunction.SingleValue_MaxItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1425. break;
  1426. case ChartItemType.SingleValue_Min:
  1427. value = CssValueFunction.SingleValue_MinItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1428. break;
  1429. case ChartItemType.SingleValue_Avg:
  1430. value = CssValueFunction.SingleValue_AvgItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1431. break;
  1432. case ChartItemType.SingleValue_Hkh:
  1433. value = CssValueFunction.SingleValue_HkhItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1434. break;
  1435. case ChartItemType.SingleValue_Hkc:
  1436. value = CssValueFunction.SingleValue_HkcItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1437. break;
  1438. case ChartItemType.SingleValue_Whz:
  1439. value = CssValueFunction.SingleValue_WhzItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1440. break;
  1441. //2016-12-28新增
  1442. //快乐扑克3 开奖号
  1443. case ChartItemType.SingleValue_KLPKKJValue:
  1444. if (!isValue) return "";
  1445. var _kjAttrs = itemValue.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
  1446. value = string.Format(fomart, _kjAttrs[0], "", _kjAttrs[1]);
  1447. break;
  1448. //单值多列大小状态项
  1449. case ChartItemType.SingleValue_KLPKHSValue:
  1450. value = CssValueFunction.SingleValue_KLPKHS_StatusItem(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1451. break;
  1452. #endregion
  1453. default: //没有以默认样式显示
  1454. value = CssValueFunction.GetCssValue(isValue, fomart, attr, this._cssConfig, itemValue, index);
  1455. break;
  1456. }
  1457. return value;
  1458. }
  1459. #endregion
  1460. /// <summary>
  1461. /// 根据是否画线和是否是项值判断画线(只有项值才画线)
  1462. /// </summary>
  1463. /// <param name="isValue">是否是项值</param>
  1464. /// <param name="color">画线颜色(有默认值)</param>
  1465. /// <returns></returns>
  1466. public string GetlgroupAndColor(bool isValue, string color)
  1467. {
  1468. if (this._itemConfig.DrawLine && isValue)
  1469. {
  1470. return " lgroup=\"" + this._cssConfig.Id + "\" lcolor=\"" + color + "\"";
  1471. }
  1472. return "";
  1473. }
  1474. }
  1475. }