ChartItemRepository.cs 85 KB

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