feat(swap): 统一【期初、期末交割价格】精度处理
- 在ConsGlobal中新增SwapDeliveryPriceRound常量定义为9位小数 - 更新incomeSwapTrade.js中交割价格计算逻辑,添加getStorageDeliveryPrice方法 - 修改SwapConsumerService中TradingAmountAvg字段的精度处理 - 添加ValidateDeliveryPrices和NormalizeDeliveryPrices方法进行交割价格验证和标准化 - 在SwapEodPositionService中对PosiGrossPrice和UnderlyingPrice进行精度处理 - 更新SwapFlowEventService中TradingAmountAvg字段的精度处理 - 在SwapFlowImportService中添加交割价格精度处理 - 更新前端界面中的输入格式配置,使用新的交割价格精度设置 - 修改SwapflowList.js中交割价格精度处理逻辑 - 在SwapFlowService中添加交割价格验证和精度处理 - 更新SwapTradeAutoService中交割价格精度处理 - 修改SwapTradeService中PosiGrossPrice字段的精度处理 - 更新unwindSwapTrade.js中交割价格计算逻辑
This commit is contained in:
@@ -129,6 +129,7 @@ namespace YLErp.Modules.SwapModule
|
||||
if (swap_flow.TradingAmountNetFee.HasValue)
|
||||
swap_flow.TradingAmountNetFee = BondPriceConverter.ToStorage(swap_flow.TradingAmountNetFee.Value);
|
||||
}
|
||||
swap_flow.TradingAmountAvg = Math.Round(swap_flow.TradingAmountAvg, ConsGlobal.SwapDeliveryPriceRound, MidpointRounding.AwayFromZero);
|
||||
if (!string.IsNullOrEmpty(clientName))
|
||||
{
|
||||
var client = DataCacheProvider.GetClientDataSource().AsQueryable(x=>x.Name== clientName).FirstOrDefault();
|
||||
|
||||
Reference in New Issue
Block a user