GetLatestDate uses cache

This commit is contained in:
2025-04-08 07:18:13 -04:00
parent 4c4a9b5cf9
commit 7dafbc3af1

View File

@@ -77,7 +77,8 @@ namespace MarketData.Generator.GainLoss
if (null == portfolioTrades || 0 == portfolioTrades.Count) return null;
LocalPriceCache.GetInstance().Add(portfolioTrades);
DateTime minTradeDate = portfolioTrades.GetMinTradeDate();
DateTime maxDate = PricingDA.GetLatestDate();
// DateTime maxDate = PricingDA.GetLatestDate();
DateTime maxDate=LocalPriceCache.GetInstance().GetLatestDate();
if(null!=maxDateRef)maxDate=maxDateRef.Value;
Dictionary<DateTime,TotalGainLossItem> gainLossCollection = new Dictionary<DateTime, TotalGainLossItem>();
DateGenerator dateGenerator = new DateGenerator();