Files
zszq-trs/YLErpDAL/Model/TradeContractDocument.cs
T
2024-05-09 14:06:26 +08:00

328 lines
11 KiB
C#

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";
/// <summary>
/// 交易确认书编号
/// </summary>
[DisplayName("交易确认书编号")]
public string Code { get; set; }
/// <summary>
/// 日期
/// </summary>
[DisplayName("日期")]
public DateTime? ValueDate { get; set; }
/// <summary>
/// 买方id
/// </summary>
[DisplayName("买方id")]
public int? BuyerId { get; set; }
/// <summary>
/// 买方名称
/// </summary>
[DisplayName("买方名称")]
public string BuyerName { get; set; }
/// <summary>
/// 卖方ID
/// </summary>
[DisplayName("卖方ID")]
public int? SellerId { get; set; }
/// <summary>
/// 卖方名称
/// </summary>
[DisplayName("卖方名称")]
public string SellerName { get; set; }
/// <summary>
/// 交易确认书模板
/// </summary>
[DisplayName("交易确认书模板")]
public string ContractVersion { get; set; }
/// <summary>
/// 文件类型:WORD,EXCEL、PDF等等
/// </summary>
[DisplayName("文件类型")]
public string FileType { get; set; }
/// <summary>
/// 状态:草稿、单方用印、双方用印
/// </summary>
[DisplayName("状态")]
public string Status { get; set; }
/// <summary>
/// 路径地址
/// </summary>
[DisplayName("路径地址")]
public string Paths { get; set; }
/// <summary>
/// 文件名称
/// </summary>
[DisplayName("文件名称")]
public string FileName { get; set; }
/// <summary>
/// 类型:交易确认书、清算确认书
/// </summary>
[DisplayName("类型")]
public string Type { get; set; }
public int? DayNumber { get; set; }
/// <summary>
/// 客户ID
/// </summary>
[DisplayName("卖方ID")]
public int? ClientId { get; set; }
/// <summary>
/// 客户名称
/// </summary>
private string _ClientName = "";
/// <summary>
/// 客户名称
/// </summary>
[DisplayName("客户名称")]
public string ClientName
{
set { _ClientName = value; }
get { return SellerName; }
}
/// <summary>
/// 用印文件
/// </summary>
[DisplayName("用印文件")]
public string StampDocumentFileName { get; set; }
/// <summary>
/// 备注
/// </summary>
[DisplayName("备注")]
public string Comments { get; set; }
/// <summary>
/// 电子章用印结果
/// </summary>
public int? SealResult { get; set; }
/// <summary>
/// 电子章用印错误信息
/// </summary>
public string SealErrMsg { get; set; }
/// <summary>
/// 获取文件绝对路径
/// </summary>
public string AbsolutePath => TradeContractHelper.GetAbsolutePath(Paths, FileName);
/// <summary>
/// 相对路径
/// </summary>
public string RelativePath
{
get
{
var appDocsPath = OtcAppContext.AppDocsPath;
return $"/App_Docs{AbsolutePath.Replace(appDocsPath, "").Replace(appDocsPath, "").Replace("\\", "/")}";
}
}
/// <summary>
/// 用印文件绝对路径
/// </summary>
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<SettleContractBill>();
}
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<SettleContractBill> 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; }
}
}