From 1f0b3878372cc806e94aea28cacf267004702291 Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 29 Oct 2023 20:24:28 +0100 Subject: [PATCH] #850 found a bug with basket constituents, not resolved as of this commit. --- .../org/finos/vuu/core/module/basket/BasketModule.scala | 9 ++++----- .../basket/provider/BasketConstituentProvider.scala | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vuu/src/main/scala/org/finos/vuu/core/module/basket/BasketModule.scala b/vuu/src/main/scala/org/finos/vuu/core/module/basket/BasketModule.scala index 966e628fd..3046c8d44 100644 --- a/vuu/src/main/scala/org/finos/vuu/core/module/basket/BasketModule.scala +++ b/vuu/src/main/scala/org/finos/vuu/core/module/basket/BasketModule.scala @@ -71,7 +71,6 @@ object BasketModule extends DefaultModule { BTC.InstanceIdRic.string(), BTC.InstanceId.string(), BTC.Ric.string(), BTC.BasketId.string(), BTC.PriceStrategyId.int(), BTC.Description.string(), - BTC.Bid.double(), BTC.Offer.double(), BTC.Last.double(), BTC.NotionalUsd.double(), BTC.NotionalLocal.double(), BTC.Venue.string(), BTC.Algo.string(), BTC.AlgoParams.string(), @@ -82,7 +81,7 @@ object BasketModule extends DefaultModule { VisualLinks( Link(BTC.InstanceId, BasketTradingTable, BT.InstanceId), ), - joinFields = BTC.InstanceIdRic + joinFields = BTC.InstanceIdRic, BTC.Ric ), (table, vs) => new NullProvider(table), (table, _, _, tableContainer) => ViewPortDef( @@ -114,9 +113,9 @@ object BasketModule extends DefaultModule { ) .addJoinTable(tableDefs => JoinTableDef( - name = "basketConsPrices", - baseTable = tableDefs.get(NAME, BasketConstituentTable), - joinColumns = Columns.allFrom(tableDefs.get(NAME, BasketConstituentTable)) ++ Columns.allFromExcept(tableDefs.get(PriceModule.NAME, "prices"), "ric"), + name = "basketTrdConsPrices", + baseTable = tableDefs.get(NAME, BasketTradingConstituent), + joinColumns = Columns.allFrom(tableDefs.get(NAME, BasketTradingConstituent)) ++ Columns.allFromExcept(tableDefs.get(PriceModule.NAME, "prices"), "ric"), joins = JoinTo( table = tableDefs.get(PriceModule.NAME, "prices"), diff --git a/vuu/src/main/scala/org/finos/vuu/core/module/basket/provider/BasketConstituentProvider.scala b/vuu/src/main/scala/org/finos/vuu/core/module/basket/provider/BasketConstituentProvider.scala index 4dc7f2371..182cfe867 100644 --- a/vuu/src/main/scala/org/finos/vuu/core/module/basket/provider/BasketConstituentProvider.scala +++ b/vuu/src/main/scala/org/finos/vuu/core/module/basket/provider/BasketConstituentProvider.scala @@ -33,10 +33,11 @@ class BasketConstituentProvider(val table: DataTable)(implicit lifecycle: Lifecy val volume = row("Volume") val weighting = row("Weight") val side = BasketConstants.Side.Buy - table.processUpdate(symbol, RowWithData(symbol, Map( + val ricBasketId = symbol + "." + basketId + table.processUpdate(ricBasketId, RowWithData(symbol, Map( Ric -> symbol, BasketId -> basketId, - RicBasketId -> (symbol + "." + basketId), + RicBasketId -> ricBasketId, LastTrade -> lastTrade, Change -> change, Weighting -> weighting,