private void ProcessStockInfo(TengxunStockInfoEntity info) { if (info == null || !info.IsTodayData || info.TradeList.Count <= 0) { return; } if (!LastDayEntities.ContainsKey(info.Code)) { var entity = accessor.RetrieveEntity <DBTStkDailyEntity>(DBTStkDailyEntity.LastDailyEntityCommand(info.Code, accessor)).FirstOrDefault(); if (entity != null) { if (entity.Close != info.YesterdayClose) { entity.Close = info.YesterdayClose; entity.Save(); } LastDayEntities.Add(entity.Code, entity); } } if (!CurrentEntities.ContainsKey(info.Code)) { CurrentEntities.Add(info.Code, info); } else { CurrentEntities[info.Code] = info; } if (!lines.ContainsKey(info.Code)) { lines.Add(info.Code, new TengxunMinuteLine(SaveEntity)); } foreach (ItemInfoEntity item in info.TradeList) { if (!lines[info.Code].IsReady) { lines[info.Code].Initialize(item.Time); } if (filter4stk.Add(item)) { lines[info.Code].Add(item); } } }