145 lines
4.4 KiB
C#
145 lines
4.4 KiB
C#
namespace YLErp.Web.App_Start.AppConfig
|
|
{
|
|
/// <summary>
|
|
/// OTC WEB项目本地配置
|
|
/// </summary>
|
|
public class OtcAppConfig
|
|
{
|
|
private bool _readonly;
|
|
private bool stockFirst;
|
|
private bool clientUsedForCalc;
|
|
private bool quotationCycleOption;
|
|
private string tradeRiskCalcV2;
|
|
private string futureVersion;
|
|
private int hedgingOrder;
|
|
private int hedgingSource;
|
|
private int htUpdate;
|
|
|
|
public void SetReadOnly()
|
|
{
|
|
_readonly = true;
|
|
}
|
|
|
|
private void CheckReadOnly()
|
|
{
|
|
if (_readonly)
|
|
{
|
|
throw new System.NotSupportedException();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 标的优先使用股票,默认false
|
|
/// </summary>
|
|
[ConfigField(Description = "标的是否优先使用股票")]
|
|
public bool StockFirst
|
|
{
|
|
get => stockFirst;
|
|
set
|
|
{
|
|
CheckReadOnly();
|
|
stockFirst = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 组合报价中客户参与定价计算,默认false
|
|
/// </summary>
|
|
[ConfigField(Description = "组合报价中客户参与定价计算")]
|
|
public bool ClientUsedForCalc
|
|
{
|
|
get => clientUsedForCalc; set
|
|
{
|
|
CheckReadOnly();
|
|
clientUsedForCalc = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 对冲下单(组合报价:1,风险对冲:2)
|
|
/// </summary>
|
|
[ConfigField(Description = "对冲下单", DataMapString = "&组合报价=1&风险对冲=2", IsFlags = true)]
|
|
public int HedgingOrder
|
|
{
|
|
get => hedgingOrder; set
|
|
{
|
|
CheckReadOnly();
|
|
hedgingOrder = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 对冲交易数据源(衡泰对冲:1,TRS对冲:2);两者都有:3
|
|
/// </summary>
|
|
[ConfigField(Description = "对冲交易数据源", DataMapString = "&衡泰对冲=1&TRS对冲=2", IsFlags = true)]
|
|
public int HedgingSource
|
|
{
|
|
get => hedgingSource; set
|
|
{
|
|
CheckReadOnly();
|
|
hedgingSource = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 接衡泰修改回执
|
|
/// </summary>
|
|
[ConfigField(Description = "接衡泰修改回执", DataMapString = "&接衡泰修改回执=1", IsFlags = true)]
|
|
public int HTUpdate
|
|
{
|
|
get => htUpdate; set
|
|
{
|
|
CheckReadOnly();
|
|
htUpdate = value;
|
|
}
|
|
}
|
|
[ConfigField(Description = "报价周期选项设置(交易参数设置)")]
|
|
public bool QuotationCycleOption
|
|
{
|
|
get => quotationCycleOption; set
|
|
{
|
|
CheckReadOnly();
|
|
quotationCycleOption = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 当前系统中运行实时风险计算V2版配置
|
|
/// </summary>
|
|
[ConfigField(Description = "实时风险计算配置",
|
|
DataMapString = @"
|
|
&run=内部直接运算(true:是)
|
|
&对冲=对冲波动率运算支持(true:是)
|
|
&持仓=持仓波动率运算支持(true:是)
|
|
&交易曲面=交易波动率曲面运算支持(true:是)
|
|
&view=前端显示模式(0:默认,1:国君)
|
|
&voladjust=波动率调整(1:支持)
|
|
&deltarisk=Delta风险敞口(1:支持),
|
|
&stock=是否Index2显示股票(1:支持),
|
|
&场内实时持仓API=场内实时持仓运算支持(true:是)")]
|
|
public string TradeRiskCalcV2
|
|
{
|
|
get => tradeRiskCalcV2; set
|
|
{
|
|
CheckReadOnly();
|
|
tradeRiskCalcV2 = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 功能版本配置
|
|
/// </summary>
|
|
[ConfigField(Description = "功能版本配置",
|
|
DataMapString = @"
|
|
&交易编辑=V1或V2
|
|
&销售提成=V2(等于V2时启用)
|
|
&客户列表导出=(V1:页面导出,默认,V2:后台模板导出)")]
|
|
public string FutureVersion
|
|
{
|
|
get => futureVersion;
|
|
set
|
|
{
|
|
CheckReadOnly();
|
|
futureVersion = value;
|
|
}
|
|
}
|
|
}
|
|
} |