Merge remote-tracking branch 'origin/glms/feature/1.4.2' into glms/feature/1.4.2-margin

This commit is contained in:
锦麟 王
2026-08-24 09:40:03 +08:00
338 changed files with 9170 additions and 64604 deletions
@@ -596,6 +596,11 @@ namespace YLErp.Configuration
/// </summary>
int ExternalAPIForCustomCalcTimeOut { get; set; }
/// <summary>
/// 收益互换 OA 移动审批状态查询间隔(秒)。
/// </summary>
int TradeApprovalOaSyncIntervalSeconds { get; set; }
bool IsForwardTradeToBuy { get; set; }
/// <summary>
/// 是否需要计算实时预警
@@ -702,6 +702,11 @@ namespace YLErp
/// </summary>
public int ExternalAPIForCustomCalcTimeOut { get; set; }
/// <summary>
/// 收益互换 OA 移动审批状态查询间隔(秒)。
/// </summary>
public int TradeApprovalOaSyncIntervalSeconds { get; set; } = 30;
public bool IsForwardTradeToBuy { get; set; }
/// <summary>
/// 是否需要实时预警
@@ -70,5 +70,9 @@ namespace YLErp.DBModels
/// </summary>
[DisplayName("节点触发条件")]
public string triggerCondition { get; set; }
/// <summary>是否在进入该节点时关联国联民生 OA 移动审批。</summary>
public bool isOaApproval { get; set; }
}
}
@@ -112,5 +112,13 @@ namespace YLErp.DBModels
[DisplayName("更新时间")]
[Column("update_time")]
public DateTime? update_time { get; set; }
/// <summary>
/// 是否由 ex_dividend_info 在内存中补充的 Stock/Fund 公司行为现金分红。
/// bond_payment_info 原生记录的 paying_interest 按每 100 份存储;公司行为记录的
/// GiveCashAmount 按每 10 份存储。该标记只在运行时区分两种金额单位,不落库。
/// </summary>
[NotMapped]
public bool IsCorporateActionCashDividend { get; set; }
}
}
@@ -5,9 +5,6 @@
/// </summary>
public enum MarginTypeEnum
{
[Description("兴业商贸")]
XingYe = -1,
[Description("系统默认")]
DEFAULT = 0,
@@ -21,10 +18,6 @@
FLOAT = 3,
[Description("按浮动盈亏和持仓名义本金")]
FLOATP = 4,
[Description("国投初始预付金锁定模板")]
GuoTouLock = 6,
[Description("国投初始预付金不锁定模板")]
GuoTouNoLock = 5
FLOATP = 4
}
}
@@ -20,6 +20,7 @@ namespace YLErp.DBModels
=9,
=10,
=11,
=12
=12,
=13
}
}
@@ -82,6 +82,37 @@ namespace YLErp.DBModels
[NotMapped]
public UnwindData unwindData { get; set; }
}
/// <summary>
/// 公司行为事件快照。登记日先写入待生效快照,真实除权日补齐调整后数据;
/// 已应用快照只允许追加回退事件,不覆盖原记录。
/// ExDividendDate 是登记日,EffectiveDate 是 Q/P 真实切换日;GiveShareAmount
/// 表示每 10 份增减数量,Split 表示独立拆/合股倍数(null 按 1)。Before/After
/// 分别保存调整前后名义本金、价格、数量和待实现分红,CashFlowChange 保存现金变化。
/// </summary>
public class CorporateActionEventData
{
public int ExDividendInfoId { get; set; }
public long PositionId { get; set; }
public string UnderlyingCode { get; set; }
public DateTime? ExDividendDate { get; set; }
public DateTime? EffectiveDate { get; set; }
public decimal GiveCashAmount { get; set; }
public decimal GiveShareAmount { get; set; }
public decimal? Split { get; set; }
public decimal RationedSharesAmount { get; set; }
public decimal RationedSharesPrice { get; set; }
public decimal BeforeNotional { get; set; }
public decimal BeforePrice { get; set; }
public decimal BeforeQuantity { get; set; }
public decimal AfterNotional { get; set; }
public decimal AfterPrice { get; set; }
public decimal AfterQuantity { get; set; }
public decimal BeforePendingDividend { get; set; }
public decimal AfterPendingDividend { get; set; }
public decimal CashFlowChange { get; set; }
public bool Applied { get; set; }
}
/// <summary>
/// 展期信息
/// </summary>
@@ -118,6 +149,11 @@ namespace YLErp.DBModels
/// </summary>
public decimal ClosePercent { get; set; }
/// <summary>
/// 是否计罚息(EQD-6977):提前终止平仓时利息端按持有至到期计息。默认 false=否。
/// 由平仓页“是否罚息”下拉写入,经 GetUnwindInterests 透传至罚息接缝层。
/// </summary>
public bool IsPenaltyInterest { get; set; }
/// <summary>
/// 平仓名义本金
/// </summary>
public decimal CloseNotionalValue { get; set; }
@@ -400,5 +400,18 @@ namespace YLErp.DBModels
[NotMapped]
public decimal? InitYtm { get; set; }
/// <summary>
/// 期末标的结算收益率(EQD-6953 平仓)。普通债券类收益互换平仓时由债券计算器按
/// 期末标的交割全价反算(估值日=平仓日 ValueDate),允许手工覆盖。
/// 命名遵循《互换价格字段命名规范决策文档》时点维度:平仓/了结用 Exit(勿用 End/Close/Final)。
/// [NotMapped]:不落 swap_flow_event 表列;仅随 UnwindData 序列化进 swap_event.EventData JSON
/// 由平仓待复核回显(GetSwapEvent)与结算确认书 Excel(TradeSettleBillGenerator) 消费。
/// ⚠️ 存储口径为【展示态百分数】(如 6.3721 表示 6.3721%),与同页期末交割全价(展示态)一致,
/// 区别于录入页 trade.InitYtm 的存储态小数(0.063721)——两者载体不同、互不干扰,勿"顺手统一"。
/// 精度:确认书导出固定 4 位小数不去零(ToString("0.0000"));本字段保留 4 位(四舍五入)。
/// </summary>
[NotMapped]
public decimal? ExitYtm { get; set; }
}
}
@@ -809,10 +809,6 @@ namespace YLErp.DBModels
[DisplayName("是否走审批")]
public bool? IsAutoGenerate { get; set; }
/// <summary>
/// 衡泰交易状态
/// </summary>
public int? HTStatus { get; set; }
/// <summary>
/// 用来标记该交易在修改时是否应提示操作人员注意
/// </summary>
[NotMapped]
@@ -89,6 +89,21 @@ namespace YLErp.DBModels
/// </summary>
public string InterestCalcMode { get; set; } = "11";
/// <summary>算头:InterestCalcMode 首位为 1null/缺省视为算头。收口原 GetInterests/InitInterestDate/EOD三处 StartsWith 解析。</summary>
[JsonIgnore]
public bool CalcFirst => InterestCalcMode?.StartsWith("1") ?? true;
/// <summary>算尾:InterestCalcMode 末位为 1null/缺省视为算尾(EQD-6968 取价依赖判定的核心开关之一)。</summary>
[JsonIgnore]
public bool CalcLast => InterestCalcMode?.EndsWith("1") ?? true;
/// <summary>
/// 是否罚息(EQD-6977):提前终止平仓时利息端按持有至到期计息的簿记默认值。
/// 平仓页默认带出此值、可修改,以平仓时选择为准(当次选择经 UnwindData.IsPenaltyInterest 走请求,不回写)。
/// 存量 JSON 无此键 → 反序列化默认 false("否"),零回填。
/// </summary>
public bool IsPenaltyInterest { get; set; }
/// <summary>
///多空组合浮动端 收取方向 1:收取,2:支付
/// </summary>
@@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace YLErp.DBModels
{
/// <summary>
/// 衍生品交易审批节点对应的国联民生 OA 流程记录。
/// </summary>
[Table("trade_approval_oa_result")]
public class trade_approval_oa_result : DBModelBaseV6
{
public int trade_id { get; set; }
public int approval_process_id { get; set; }
public string process_type { get; set; }
public int? applicant_id { get; set; }
public string applicant_login_name { get; set; }
public string oa_fileid { get; set; }
public string status { get; set; }
public string oa_msg { get; set; }
public string request_payload { get; set; }
public string last_response { get; set; }
public DateTime? last_query_time { get; set; }
public bool is_valid { get; set; }
}
}
@@ -137,6 +137,20 @@ namespace YLErp.DBModels
[DisplayName("标的名称")]
public string UnderlyingName { set; get; }
/// <summary>
/// 基金及基金专户的基金管理人名称
/// </summary>
[Column("investadvisorname")]
[DisplayName("基金管理人")]
public string InvestAdvisorName { get; set; }
/// <summary>
/// 基金及基金专户所属的 ETF 子类,保存“ETF 子类”字典项名称
/// </summary>
[Column("etf_sub_type")]
[DisplayName("ETF 子类")]
public string EtfSubType { get; set; }
/// <summary>
/// 标的英文名
@@ -45,5 +45,11 @@ namespace YLErp.Models
public string DividendIn { get; set; }
public string Quantity { get; set; }
/// <summary>
/// 期末标的结算收益率(EQD-6953)。普通债券类收益互换平仓收益率,展示态百分数,
/// 固定 4 位小数不去零("0.0000");非债券/历史无值时为空串。
/// </summary>
public string ExitYtm { get; set; }
}
}
@@ -42,4 +42,17 @@
<dictionary name="可取系数" catalog="客户"></dictionary>
<dictionary name="最小转账金额" catalog="客户"></dictionary>
<dictionary name="累计转远期到期日类型" catalog="客户"></dictionary>
<dictionary name="ETF 子类" catalog="标的">
<item name="国债 ETF" short_name="国债 ETF"></item>
<item name="政金债 ETF" short_name="政金债 ETF"></item>
<item name="地方债 ETF" short_name="地方债 ETF"></item>
<item name="国债政金债 ETF" short_name="国债政金债 ETF"></item>
<item name="短融 ETF" short_name="短融 ETF"></item>
<item name="公司债 ETF" short_name="公司债 ETF"></item>
<item name="城投债 ETF" short_name="城投债 ETF"></item>
<item name="做市信用债 ETF" short_name="做市信用债 ETF"></item>
<item name="科创债 ETF" short_name="科创债 ETF"></item>
<item name="可转债 ETF" short_name="可转债 ETF"></item>
</dictionary>
</dictionaries>