using System.ComponentModel; using System.ComponentModel.DataAnnotations.Schema; using YLErp.DBModels.Abstract; using YLErp.Helpers; using YLErp.Model.Enum; namespace YLErp.DBModels { [Table("trade_contract_document")] public partial class trade_contract_document : DBModelWithOperator, ITradeContractDocument { public static string LogClass = "trade_contract_document"; /// /// 交易确认书编号 /// [DisplayName("交易确认书编号")] public string Code { get; set; } /// /// 日期 /// [DisplayName("日期")] public DateTime? ValueDate { get; set; } /// /// 买方id /// [DisplayName("买方id")] public int? BuyerId { get; set; } /// /// 买方名称 /// [DisplayName("买方名称")] public string BuyerName { get; set; } /// /// 卖方ID /// [DisplayName("卖方ID")] public int? SellerId { get; set; } /// /// 卖方名称 /// [DisplayName("卖方名称")] public string SellerName { get; set; } /// /// 交易确认书模板 /// [DisplayName("交易确认书模板")] public string ContractVersion { get; set; } /// /// 文件类型:WORD,EXCEL、PDF等等 /// [DisplayName("文件类型")] public string FileType { get; set; } /// /// 状态:草稿、单方用印、双方用印 /// [DisplayName("状态")] public string Status { get; set; } /// /// 路径地址 /// [DisplayName("路径地址")] public string Paths { get; set; } /// /// 文件名称 /// [DisplayName("文件名称")] public string FileName { get; set; } /// /// 类型:交易确认书、清算确认书 /// [DisplayName("类型")] public string Type { get; set; } public int? DayNumber { get; set; } /// /// 客户ID /// [DisplayName("卖方ID")] public int? ClientId { get; set; } /// /// 客户名称 /// private string _ClientName = ""; /// /// 客户名称 /// [DisplayName("客户名称")] public string ClientName { set { _ClientName = value; } get { return SellerName; } } /// /// 确认书来源类型:1=系统生成,2=人工上传,null=默认为系统生成 /// [DisplayName("确认书来源类型")] public int? SourceType { get; set; } /// /// 用印文件 /// [DisplayName("用印文件")] public string StampDocumentFileName { get; set; } /// /// 备注 /// [DisplayName("备注")] public string Comments { get; set; } /// /// 电子章用印结果 /// public int? SealResult { get; set; } /// /// 电子章用印错误信息 /// public string SealErrMsg { get; set; } /// /// 获取文件绝对路径 /// public string AbsolutePath => TradeContractHelper.GetAbsolutePath(Paths, FileName); /// /// 相对路径 /// public string RelativePath { get { var appDocsPath = OtcAppContext.AppDocsPath; return $"/App_Docs{AbsolutePath.Replace(appDocsPath, "").Replace(appDocsPath, "").Replace("\\", "/")}"; } } /// /// 用印文件绝对路径 /// public string AbsoluteStampPath => string.IsNullOrWhiteSpace(StampDocumentFileName) ? string.Empty : TradeContractHelper.GetPhysicalPath(StampDocumentFileName); } public class SettletmentModel // model for 交易确认书模板 { public SettletmentModel() { FPCompanyName = ""; FPAddress = ""; FPTel = ""; FPFax = ""; FPName = ""; FPBankCard = ""; FPBankName = ""; FPLinkman = ""; SPCompanyName = ""; SPAddress = ""; SPTel = ""; SPFax = ""; SPName = ""; SPBankCard = ""; SPBankName = ""; SPLinkman = ""; OptionPremium = ""; InitialMargin = ""; TradeType = ""; Principle = ""; InitialSpotPrice = ""; Strike = ""; PremiumRate = ""; Premium = ""; Underlying = ""; StartDate = ""; ExerciseDate = ""; PremiumPayDate = ""; ContractVersion = ""; ValueDate = ""; ContractCode = ""; TradeCode = ""; TradeNumber = ""; UnderlyingCode = ""; UnderlyingName = ""; TotalPrinciple = ""; TotalSettleProfit = ""; TradeList = new List(); } public string FPCompanyName { get; set; } public string FPAddress { get; set; } public string FPTel { get; set; } public string FPFax { get; set; } public string FPName { get; set; } public string FPBankCard { get; set; } public string FPBankName { get; set; } public string FPLinkman { get; set; } public string FPEmail { get; set; } public string SPCompanyName { get; set; } public string SPAddress { get; set; } public string SPTel { get; set; } public string SPFax { get; set; } public string SPName { get; set; } public string SPBankCard { get; set; } public string SPBankName { get; set; } public string SPLinkman { get; set; } public string SPEmail { get; set; } public string ClientCompanyName { get; set; } public string ClientAddress { get; set; } public string ClientTel { get; set; } public string ClientFax { get; set; } public string ClientName { get; set; } public string ClientBankCard { get; set; } public string ClientBankName { get; set; } public string ClientLinkman { get; set; } public string ClientEmail { get; set; } public string PayDate { get; set; }//渤海使用支付日 //期权费 public string OptionPremium { get; set; } //初始预付金 public string InitialMargin { get; set; } public string TradeType { get; set; } public string Principle { get; set; } public string InitialSpotPrice { get; set; } public string Strike { get; set; } public string PremiumRate { get; set; } public string Premium { get; set; } public string Underlying { get; set; } public string StartDate { get; set; } public string ExerciseDate { get; set; } public string PremiumPayDate { get; set; } public string ContractVersion { get; set; } public string Formula { get { return "{(S-K)/S0,0}"; } } public string ValueDate { get; set; } public string ContractCode { get; set; } public string TradeCode { get; set; } public string TradeNumber { get; set; } public string UnderlyingCode { get; set; } public string UnderlyingName { get; set; } public string TotalPrinciple { get; set; } public string TotalSettleProfit { get; set; } public string TotalSettleProfitAbs { get; set; } public string PayDesc { get; set; } public string ExerciseDateLabel { get; set; } public string ExerciseDateDesc { get; set; } public string ExerciseLabel1 { get; set; } public string ExerciseDesc1 { get; set; } public string ExerciseLabel2 { get; set; } public string ExerciseDesc2 { get; set; } public string WinLossDescTitle { get; set; } public string WinLossDesc1 { get; set; } public string WinLossDesc2 { get; set; } public string SettlePriceOrUnwindPriceTitle { get; set; } public string SettleProfitTitle { get; set; } public List TradeList { get; set; } } public class SettleContractBill { public string SettleContractCode { get; set; } public string TradeNumber { get; set; } public string TradeContractCode { get; set; } public string SettleDate { get; set; } public string UnderlyingClass { get; set; } public string UnderlyingCode { get; set; } public string UnderlyingName { get; set; } public string Notional { get; set; } public string TradeAmount { get; set; } public string TradeQuantity { get; set; } public string StockEqvNotional { get; set; } public string InitialSpotPrice { get; set; } public string Strike { get; set; } public string StrikePrice { get; set; } public string InitialTermDay { get; set; } public string FinalTermDay { get; set; } public string SpotPrice { get; set; } public string SettlePrice { get; set; } public string SettlePriceOrUnwindPrice { get; set; } public string SettleProfit { get; set; } public string ExerciseType { get; set; } public string TradeUnit { get; set; } public string QuoteUnit { get; set; } public string SettleSingleProfit { get; set; } public string Margin { get; set; } public string TradeDate { get; set; } public string Market { get; set; } public string TradeType { get; set; } public string Remark1 { get; set; } public string Remark2 { get; set; } public string ExecuteType { get; set; } public string CallPut { get; set; } public string BuySell { get; set; } public string ABSSettleProfit { get; set; } public string ABSSettleSingleProfit { get; set; } public string Premium { get; set; } public string PremiumSingle { get; set; } public string StartDate { get; set; } public string ExerciseDate { get; set; } public string PremiumPayDate { get; set; } public string Principle { get; set; } public string ExchangeNo { get; set; } public string UnWindData { get; set; } } }