#EQD-6425 国联民生-衍生品系统移动审批(提交OA流程) - 审批节点支持配置“关联OA移动审批” - 创建OA流程并记录请求、requestId、状态及异常备注 - 支持OA轮询同步审批通过、退回和归档状态 - 本地通过、拒绝、撤回时同步强制归档未结束OA流程 - 增加审批列表OA备注展示及本地Mock联调接口 - 新增OA审批记录表和数据库升级脚本 - OA移动审批使用独立查询地址及isnextflow配置,不影响交易确认书OA
419 lines
19 KiB
C#
419 lines
19 KiB
C#
using BaseOUDAL;
|
|
using YLErp.Core.DBModels;
|
|
using YLErp.Model;
|
|
|
|
namespace YLErp.BLL
|
|
{
|
|
public class YLContext : DBContextBase
|
|
{
|
|
public YLContext()
|
|
{
|
|
}
|
|
|
|
protected override string GetConnectionString() => AppManager.GetConnectionString("ylcms");
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<AppConfig>().HasKey(c => new { c.PGroup, c.PName });
|
|
modelBuilder.Entity<ExchangeOptionVol>().HasKey(c => new { c.ValueDate, c.OptionCode });
|
|
modelBuilder.Entity<dicForTranslation>().HasKey(c => new { c.From, c.Key });
|
|
modelBuilder.Entity<eod_exchange_account>().HasKey(c => new { c.ValueDate, c.AccountId });
|
|
modelBuilder.Entity<TradeMeta>().HasKey(c => new { c.TradeId, c.MetaKey });
|
|
modelBuilder.Entity<trade>().Property(t => t.TradeType).IsRequired();
|
|
/*modelBuilder.Entity<trade_cashflow>().Property<string>("ProfitDayCount").HasField("_profitDayCount").UsePropertyAccessMode(PropertyAccessMode.Property);*/ //
|
|
}
|
|
|
|
public DbSet<TradePosition> TradePosition { get; set; }
|
|
|
|
public DbSet<TradeAuditLog> TradeAuditLog { get; set; }
|
|
|
|
public DbSet<AppConfig> AppConfig { get; set; }
|
|
|
|
public DbSet<files_template> files_template { get; set; }
|
|
|
|
public DbSet<TradeAutoRule> trade_autorule { get; set; }
|
|
|
|
public DbSet<ClientPricingParam> client_pricing_param { get; set; }
|
|
|
|
public DbSet<SyntheticUnderlying> synthetic_underlying { get; set; }
|
|
|
|
public DbSet<TradeVolatility> TradeVolatility { get; set; }
|
|
|
|
public DbSet<ExchangeTrade> ExchangeTrade { get; set; }
|
|
|
|
public DbSet<ExchangeListOption> exchange_list_option { get; set; }
|
|
|
|
public DbSet<underlying_main_contract_history> underlying_main_contract_history { get; set; }
|
|
|
|
public DbSet<configcolumn> configcolumn { get; set; }
|
|
|
|
public DbSet<trade_spread_option> trade_spread_option { get; set; }
|
|
|
|
/// <summary>
|
|
/// 现在专用于客户授信流程
|
|
/// </summary>
|
|
public DbSet<Processlog> CreditProcessLog { get; set; }
|
|
|
|
public DbSet<flat_price_quotation> flat_price_quotation { get; set; }
|
|
|
|
public DbSet<eod_trade_vol_override> eod_trade_vol_override { get; set; }
|
|
|
|
public DbSet<TradeGroup> trade_group { get; set; }
|
|
|
|
public DbSet<sales_department> sales_department { get; set; }
|
|
public DbSet<eod_trade> eod_trade { get; set; }
|
|
public DbSet<approvalprocess> approvalprocess { get; set; }
|
|
public DbSet<rpt_contract_no_gen_rule> rpt_contract_no_gen_rule { get; set; }
|
|
|
|
public DbSet<eod_stock_price> eod_stock_price { get; set; }
|
|
|
|
public DbSet<eod_forward_margin> eod_forward_margin { get; set; }
|
|
|
|
public DbSet<ex_dividend_info> ex_dividend_info { get; set; }
|
|
public DbSet<trade_span> trade_span { get; set; }
|
|
public DbSet<ClientSpan> client_span { get; set; }
|
|
|
|
public DbSet<ExchangeAccount> exchange_account { get; set; }
|
|
|
|
public DbSet<eod_pnl> eod_pnl { get; set; }
|
|
|
|
public DbSet<valuedate_history> valuedate_history { get; set; }
|
|
|
|
public DbSet<CorrelationTable> correlation { get; set; }
|
|
|
|
public DbSet<realtime_trade_risk> realtime_trade_risk { get; set; }
|
|
|
|
public DbSet<valuedate> valuedate { get; set; }
|
|
public DbSet<eod_trade_risk> eod_trade_risk { get; set; }
|
|
public DbSet<trade_asian_option> trade_asian_option { get; set; }
|
|
public DbSet<trade_forward> trade_forward { get; set; }
|
|
public DbSet<trade_rainbow_option> trade_rainbow_option { get; set; }
|
|
public DbSet<trade_cash> trade_cash { get; set; }
|
|
public DbSet<trade_cash_pre> trade_cash_pre { get; set; }
|
|
public DbSet<trade_cash_detail> trade_cash_detail { get; set; }
|
|
public DbSet<trade_cash_swap> trade_cash_swap { get; set; }
|
|
public DbSet<trade_cash_group_action> trade_cash_group_action { get; set; }
|
|
|
|
//public DbSet<trade_operation_history> trade_operation_history { get; set; }
|
|
|
|
public DbSet<Market> market { get; set; }
|
|
public DbSet<trade_barrier_option> trade_barrier_option { get; set; }
|
|
public DbSet<trade_binary_option> trade_binary_option { get; set; }
|
|
|
|
public DbSet<trade_risky_option> trade_risky_option { get; set; }
|
|
|
|
public DbSet<trade_double_sharkfin_option> trade_double_sharkfin_option { get; set; }
|
|
public DbSet<trade_autocall> trade_autocall { get; set; }
|
|
public DbSet<trade_snowball> trade_snowball { get; set; }
|
|
public DbSet<trade_rangeaccrual> trade_rangeaccrual { get; set; }
|
|
public DbSet<trade_airbag> trade_airbag { get; set; }
|
|
public DbSet<trade_underlying_enhance> trade_underlying_enhance { get; set; }
|
|
public DbSet<trade_accumulator_option> trade_accumulator_option { get; set; }
|
|
public DbSet<trade_swap_flow> trade_swap_flow { get; set; }
|
|
public DbSet<trade_swap_flow_more> trade_swap_flow_more { get; set; }
|
|
public DbSet<trade_swap_flow_check_result> trade_swap_flow_check_result { get; set; }
|
|
public DbSet<trade_flow_history> trade_flow_history { get; set; }
|
|
public DbSet<trade_swap> trade_swap { get; set; }
|
|
public DbSet<trade_swap_detail> trade_swap_detail { get; set; }
|
|
public DbSet<trade_margin_template> trade_margin_template { get; set; }
|
|
public DbSet<TradeMarketReportConfigure> tradeMarketReport_Configure { get; set; }
|
|
public DbSet<client_margin_template> client_margin_template { get; set; }
|
|
public DbSet<trade_cashflow> trade_cashflow { get; set; }
|
|
public DbSet<trade_custom> trade_custom { get; set; }
|
|
public DbSet<ClientBalanceDaily> ClientBalanceDaily { get; set; }
|
|
public DbSet<ClientBalanceDailyBS> ClientBalanceDailyBS { get; set; }
|
|
public DbSet<ClientCashInCashOut> ClientCashInCashOut { get; set; }
|
|
public DbSet<Clientcashincashout_remove> Clientcashincashout_remove { get; set; }
|
|
public DbSet<clientcashincashout_history> clientcashincashout_history { get; set; }
|
|
public DbSet<clientcashincashout_update> clientcashincashout_update { get; set; }
|
|
|
|
public DbSet<ClientCashLog> clientcash_log { get; set; }
|
|
|
|
public DbSet<eod_commodity_future_price> eod_commodity_future_price { get; set; }
|
|
|
|
public DbSet<eod_exchange_option_price> eod_exchange_option_price { get; set; }
|
|
|
|
public DbSet<underlying_manager> underlying_manager { get; set; }
|
|
|
|
public DbSet<trade_vol> trade_vol { get; set; }
|
|
|
|
public DbSet<dicForTranslation> dicForTranslation { get; set; }
|
|
|
|
public DbSet<Currency> currency { get; set; }
|
|
|
|
public DbSet<underlying_parameter> underlying_parameter { get; set; }
|
|
public DbSet<UnderlyingHisData> UnderlyingHisData { get; set; }
|
|
|
|
public DbSet<volatility> volatility { get; set; }
|
|
public DbSet<GlobalSkewMap> globalSkewMap { get; set; }
|
|
|
|
public DbSet<ApprovalGrade> approvalGrade { get; set; }
|
|
public DbSet<AssetUnit> assetunit { get; set; }
|
|
public DbSet<AssetUnitGroup> assetunitgroup { get; set; }
|
|
|
|
public DbSet<trade> trade { get; set; }
|
|
|
|
public DbSet<calendar> calendar { get; set; }
|
|
|
|
public DbSet<CreditTable> credit { get; set; }
|
|
|
|
public DbSet<CreditIntraday> CreditIntraday { get; set; }
|
|
|
|
public DbSet<CreditFromClient> CreditFromClient { get; set; }
|
|
public DbSet<CreditLog> credit_log { get; set; }
|
|
public DbSet<Variety> variety { get; set; }
|
|
public DbSet<VarietyLimit> variety_limit { get; set; }
|
|
public DbSet<variety_mapping_deduct> variety_mapping_deduct { get; set; }
|
|
public DbSet<variety_pfe_deduct> variety_pfe_deduct { get; set; }
|
|
|
|
public DbSet<trade_check> trade_check { get; set; }
|
|
public DbSet<trade_file> trade_file { get; set; }
|
|
public DbSet<clientcashincashout_product> clientcashincashout_product { get; set; }
|
|
|
|
//子公司抵押品
|
|
public DbSet<company_collateral> company_collateral { get; set; }
|
|
|
|
public DbSet<ProcessTradeLog> processtradelog { get; set; }
|
|
|
|
public DbSet<trade_contract_document> trade_contract_document { get; set; }
|
|
public DbSet<intraday_trade_position> intraday_trade_position { get; set; }
|
|
public DbSet<ClientBalanceGap> ClientBalanceGap { get; set; }
|
|
public DbSet<EodStatus> eodStatus { get; set; }
|
|
public DbSet<underlying_main_contract> underlying_main_contract { get; set; }
|
|
public DbSet<eod_trade_position> eod_trade_position { get; set; }
|
|
public DbSet<eod_trade_position_swap> eod_trade_position_swap { get; set; }
|
|
//public DbSet<TradePair> tradePairs { get; set; }
|
|
|
|
//public DbSet<inquiry> inquiry { get; set; }
|
|
//public DbSet<inquiry_service_representative> inquiry_service_representative { get; set; }
|
|
public DbSet<trade_contract_r> trade_contract_r { get; set; }
|
|
|
|
public DbSet<EmailTemplate> EmailTemplate { get; set; }
|
|
public DbSet<StockCommissionConfig> stock_commission_config { get; set; }
|
|
public DbSet<eod_trade_position_static> eod_trade_position_static { get; set; }
|
|
public DbSet<eod_trade_position_static2> eod_trade_position_static2 { get; set; }
|
|
public DbSet<TradeMeta> TradeMeta { get; set; }
|
|
public DbSet<trade_contract_r_number> trade_contract_r_number { get; set; }
|
|
|
|
|
|
public DbSet<trade_hedge_vol> trade_hedge_vol { get; set; }
|
|
public DbSet<TradeHisData> TradeHisData { get; set; }
|
|
public DbSet<ExchangeOptionVol> exchange_option_vol { get; set; }
|
|
public DbSet<eod_trade_risk_hedgevol> eod_trade_risk_hedgevol { get; set; }
|
|
public DbSet<eod_pnl_hedgevol> eod_pnl_hedgevol { get; set; }
|
|
public DbSet<eod_trade_position_hedgevol> eod_trade_position_hedgevol { get; set; }
|
|
public DbSet<RiskLimit> Risk_Limit { get; set; }
|
|
public DbSet<eod_pnl_extend> eod_pnl_extend { get; set; }
|
|
public DbSet<eod_pnl_extend_s> eod_pnl_extend_s { get; set; }
|
|
public DbSet<eod_trade_position_extend> eod_trade_position_extend { get; set; }
|
|
public DbSet<eod_trade_position_extend_s> eod_trade_position_extend_s { get; set; }
|
|
public DbSet<eod_trade_risk_extend> eod_trade_risk_extend { get; set; }
|
|
public DbSet<eod_trade_risk_extend_s> eod_trade_risk_extend_s { get; set; }
|
|
public DbSet<eod_pnl_openvol> eod_pnl_openvol { get; set; }
|
|
public DbSet<eod_trade_position_openvol> eod_trade_position_openvol { get; set; }
|
|
public DbSet<eod_trade_risk_openvol> eod_trade_risk_openvol { get; set; }
|
|
public DbSet<eod_exchange_account> eod_exchange_account { get; set; }
|
|
|
|
public DbSet<VarietyVol> variety_vol { get; set; }
|
|
|
|
public DbSet<VarietyHisData> VarietyHisData { get; set; }
|
|
|
|
//public DbSet<EodPnlStatics> eod_pnl_statics { get; set; }
|
|
|
|
public DbSet<eod_trade_risk_manual> eod_trade_risk_manual { get; set; }
|
|
|
|
public DbSet<eod_var> eod_var { get; set; }
|
|
|
|
public DbSet<Exchange_Option_Trade> Exchange_Option_Trade { get; set; }
|
|
|
|
public DbSet<SysUserConfig> SysUserConfig { get; set; }
|
|
|
|
public DbSet<autocall_observation> autocall_observation { get; set; }
|
|
|
|
public DbSet<UnderlyingBlockConfig> UnderlyingBlockConfig { get; set; }
|
|
|
|
public DbSet<UnderlyingDividend> UnderlyingDividend { get; set; }
|
|
|
|
public DbSet<manually_trade_observation_price> manually_trade_observation_price { get; set; }
|
|
|
|
public DbSet<trade_confirm_rule> trade_confirm_rule { get; set; }
|
|
|
|
public DbSet<client_cash_other> client_cash_other { get; set; }
|
|
|
|
public DbSet<BodTradePosition> BodTradePosition { get; set; }
|
|
|
|
public DbSet<bod_trade> bod_Trade { get; set; }
|
|
|
|
public DbSet<eod_pnl_s> eod_pnl_s { get; set; }
|
|
public DbSet<eod_pnl_hedgevol_s> eod_pnl_hedgevol_s { get; set; }
|
|
public DbSet<eod_pnl_openvol_s> eod_pnl_openvol_s { get; set; }
|
|
public DbSet<eod_trade_position_s> eod_trade_position_s { get; set; }
|
|
public DbSet<eod_trade_position_hedgevol_s> eod_trade_position_hedgevol_s { get; set; }
|
|
public DbSet<eod_trade_position_openvol_s> eod_trade_position_openvol_s { get; set; }
|
|
public DbSet<eod_trade_position_swap_mannual> eod_trade_position_swap_mannual { get; set; }
|
|
public DbSet<eod_trade_risk_s> eod_trade_risk_s { get; set; }
|
|
public DbSet<eod_trade_risk_hedgevol_s> eod_trade_risk_hedgevol_s { get; set; }
|
|
public DbSet<eod_trade_risk_openvol_s> eod_trade_risk_openvol_s { get; set; }
|
|
public DbSet<eod_currency_rate> eod_currency_rate { get; set; }
|
|
public DbSet<StockBlackWhite> Stock_BlackWhite { get; set; }
|
|
public DbSet<SalesCommissionInfo> SalesCommissionInfo { get; set; }
|
|
public DbSet<SalesCommissionDetail> SalesCommissionDetail { get; set; }
|
|
public DbSet<Salesman> salesmen { get; set; }
|
|
public DbSet<underlying_basis_curve> underlying_basis_curve { get; set; }
|
|
public DbSet<UserDefinedStructureDraft> user_defined_structure_draft { get; set; }
|
|
public DbSet<UserDefinedStructurePublished> user_defined_structure_published { get; set; }
|
|
public DbSet<SuperviseReport> supervise_report { get; set; }
|
|
public DbSet<tempfile> tempfiles { get; set; }
|
|
public DbSet<margin_ratio> margin_ratio { get; set; }
|
|
public DbSet<margin_template> margin_template { get; set; }
|
|
public DbSet<margin_template_v2> margin_template_v2 { get; set; }
|
|
|
|
public DbSet<margin_template_detail> margin_template_detail { get; set; }
|
|
public DbSet<MarginCalculationThreshold> MarginCalculationThreshold { get; set; }
|
|
|
|
public DbSet<SACReportNotes> sac_report_notes { get; set; }
|
|
public DbSet<TradeChanges> trade_changes { get; set; }
|
|
public DbSet<UnderlyingChanges> underlying_changes { get; set; }
|
|
|
|
public DbSet<EodTask> EodTask { get; set; }
|
|
|
|
public DbSet<EodTaskDetail> EodTaskDetail { get; set; }
|
|
|
|
public DbSet<TradeTask> TradeTask { get; set; }
|
|
|
|
public DbSet<SubstandardTradeRule> SubstandardTradeRule { get; set; }
|
|
|
|
public DbSet<client_file> client_file { get; set; }
|
|
|
|
public DbSet<ScenarioConfigV2> ScenarioConfig { get; set; }
|
|
|
|
public DbSet<Owner_info> Owner_Info { get; set; }
|
|
|
|
public DbSet<QuotaSetting> quotaSetting { get; set; }
|
|
|
|
public DbSet<QuotaTrial> quotaTrial { get; set; }
|
|
|
|
public DbSet<QuotaMonitor_Global> QuotaMonitor_Global { get; set; }
|
|
|
|
public DbSet<QuotaMonitor_Asset> QuotaMonitor_Asset { get; set; }
|
|
|
|
public DbSet<QuotaMonitor_Variety> QuotaMonitor_Variety { get; set; }
|
|
|
|
public DbSet<QuotaMonitor_Underlying> QuotaMonitor_Underlying { get; set; }
|
|
public DbSet<QuotaMonitor_Assetunit> QuotaMonitor_Assetunit { get; set; }
|
|
|
|
public DbSet<QuotaMonitor_Client> QuotaMonitor_Client { get; set; }
|
|
|
|
public DbSet<QuotaMonitor_Trade> QuotaMonitor_Trade { get; set; }
|
|
|
|
public DbSet<SensitiveData> SensitiveData { get; set; }
|
|
|
|
public DbSet<ApprovalResult> ApprovalResult { get; set; }
|
|
|
|
public DbSet<EodMeta> EodMeta { get; set; }
|
|
|
|
public DbSet<eod_market_sum> Eod_Market_Sum { get; set; }
|
|
|
|
public DbSet<ExtensionTime> ExtensionTime { get; set; }
|
|
|
|
public DbSet<Structure_Info> Structure_Info { get; set; }
|
|
|
|
public DbSet<Structure_Details> Structure_Details { get; set; }
|
|
|
|
public DbSet<client_variety_config> client_variety_config { get; set; }
|
|
|
|
public DbSet<client_variety_marginrate> client_variety_marginrate { get; set; }
|
|
|
|
public DbSet<SuperviseReportOptionModel> SuperviseReportOption { get; set; }
|
|
|
|
public DbSet<SuperviseReportSwapModel> SuperviseReportSwap { get; set; }
|
|
|
|
public DbSet<TradeAction> TradeAction { get; set; }
|
|
|
|
public DbSet<SuperviseClientCashDbModel> SuperviseReportClientCash { get; set; }
|
|
|
|
public DbSet<SupervisePositionDbModel> SuperviseReportPosition { get; set; }
|
|
|
|
public DbSet<SuperviseCreditRiskDbModel> SuperviseReportCreditRisk { get; set; }
|
|
|
|
public DbSet<client_marginrate> client_marginrate { get; set; }
|
|
|
|
public DbSet<ClientUser> ClientUser { get; set; }
|
|
|
|
public DbSet<system_job> system_job { get; set; }
|
|
public DbSet<swap_fund_account> swap_fund_account { get; set; }
|
|
public DbSet<swap_flow> swap_flow { get; set; }
|
|
|
|
public DbSet<swap_flow_merge> swap_flow_merge { get; set; }
|
|
public DbSet<swap_position> swap_position { get; set; }
|
|
public DbSet<trade_extend> trade_extend { get; set; }
|
|
public DbSet<trade_initial_margin> trade_initial_margin { get; set; }
|
|
public DbSet<swap_flow_event> swap_flow_event { get; set; }
|
|
|
|
public DbSet<eod_swap_position> eod_swap_position { get; set; }
|
|
public DbSet<swap_event> swap_event { get; set; }
|
|
public DbSet<eod_swap> eod_swap { get; set; }
|
|
public DbSet<TradeObervation> trade_obervation { get; set; }
|
|
|
|
public DbSet<SystemLog> SystemLogs { get; set; }
|
|
|
|
public DbSet<sys_tag> sys_tag { get; set; }
|
|
|
|
public DbSet<trade_tag> trade_tag { get; set; }
|
|
|
|
public DbSet<task_event> task_event { get; set; }
|
|
|
|
public DbSet<supervise_undelrying> supervise_undelrying { get; set; }
|
|
|
|
public DbSet<quotefile> quotefile { get; set; }
|
|
public DbSet<quotefiledetail> quotefiledetail { get; set; }
|
|
|
|
public DbSet<dividendrate_record> dividendrate_record { get; set; }
|
|
|
|
public DbSet<EodScenarioanalysis> eod_scenarioanalyses { get; set; }
|
|
|
|
public DbSet<UnderlyingSpanTwo> UnderlyingSpanTwo { get; set; }
|
|
|
|
public DbSet<eod_file> eod_file { get; set; }
|
|
public DbSet<SwapRate> swap_rate { get; set; }
|
|
public DbSet<SwapFloatRate> swap_float_rate { get; set; }
|
|
public DbSet<SwapRateLog> swap_rate_log { get; set; }
|
|
public DbSet<EtradingRule> Etrading_Rule { get; set; }
|
|
|
|
public DbSet<ChinaBondValuation> china_bond_valuation { get; set; }
|
|
|
|
public DbSet<PushLog> push_log { get; set; }
|
|
public DbSet<trade_report> trade_Report { get; set; }
|
|
|
|
|
|
public DbSet<trade_risk_check_log> trade_risk_check_log { get; set; }
|
|
|
|
public DbSet<EtradeAccount> etrade_account { get; set; }
|
|
|
|
|
|
public DbSet<reg_valuation_end_of_day> reg_valuation_end_of_day { get; set; }
|
|
|
|
public DbSet<SwapEventEmail> swap_event_email { get; set; }
|
|
|
|
public DbSet<SwapFlowDeal> swap_flow_deal { get; set; }
|
|
|
|
public DbSet<TrsOpenConfig> trs_open_config { get; set; }
|
|
public DbSet<TrsAcountManage> trs_account_manage { get; set; }
|
|
public DbSet<TrsAccountManageDetail> trs_account_manage_detail { get; set; }
|
|
|
|
public DbSet<ClientBalanceView> clientBalanceView { get; set; }
|
|
|
|
public DbSet<client_margin_config> clientMarginConfig { get; set; }
|
|
public DbSet<client_margin_detail> clientMarginDetail { get; set; }
|
|
public DbSet<trade_contract_oa_result> tradeContractOaResult { get; set; }
|
|
public DbSet<trade_approval_oa_result> tradeApprovalOaResult { get; set; }
|
|
public DbSet<BondPayment> bondPayment { get; set; }
|
|
|
|
public DbSet<glms_risk_rule> glms_risk_rule { get; set; }
|
|
public DbSet<glms_risk_rule_application> glms_risk_rule_application { get; set; }
|
|
public DbSet<glms_risk_rule_audit_log> glms_risk_rule_audit_log { get; set; }
|
|
public DbSet<glms_risk_variable> glms_risk_variable { get; set; }
|
|
|
|
}
|
|
}
|