using BaseOUDAL; using Newtonsoft.Json; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using YLErp.Helpers; namespace YLErp.DBModels { [Table("company_collateral")] public class company_collateral : DBModelWithOperator { /// /// 抵押赎回状态 /// [DisplayName("抵押赎回状态")] public string Status { get; set; } /// /// 出入金单号 /// [DisplayName("出入金单号")] public string Number { get; set; } /// /// 客户名称 /// [DisplayName("客户名称")] public int ClientId { get; set; } /// /// 客户编号 /// [DisplayName("客户编号")] public string ClientNumber { get; set; } /// /// 客户名称 /// [DisplayName("对手方名称")] public string ClientName { get; set; } /// /// 数量 /// [DisplayName("数量")] public double? ProductAmount { get; set; } /// /// 质押率 /// [DisplayName("质押率")] public double? Rate { get; set; } [NotMapped] public string RateString => Rate == null ? "0.00%" : (Rate.Value * 100).ToString("0.00") + "%"; /// /// 抵押品名 /// 编辑时下拉菜单选择,保存VarietyId /// [DisplayName("抵押品名")] public int? VarietyId { get; set; } /// /// 抵押品名,在View页面需要显示 /// [DisplayName("抵押品名")] [NotMapped] public string VarietyShortName { get; set; } /// /// 标的Id /// [DisplayName("标的代码")] public int? UnderlyingId { get; set; } [NotMapped] public string UnderlyingCode { get; set; } [NotMapped] [DisplayName("盯市价格")] public double? SpotPrice { get; set; } [NotMapped] [DisplayName("质押价值")] public double? ProductTotalPrice { get; set; } /// /// 抵押时间 /// [DisplayName("抵押时间")] public DateTime HappenDate { get; set; } [NotMapped] public string HappenDateString => HappenDate.ToString("yyyy-MM-dd"); /// /// 赎回时间 /// [DisplayName("赎回时间")] public DateTime? BackDate { get; set; } [NotMapped] public string BackDateString => BackDate != null ? BackDate.Value.ToString("yyyy-MM-dd") : ""; /// /// 仓单号 /// [DisplayName("仓单号")] public string SerialNumber { get; set; } /// /// 备注 /// [DisplayName("备注")] public string Comments { get; set; } /// /// 执行状态 /// "未确认", "已确认", "拒绝" /// [DisplayName("执行状态")] public string OptStatus { get; set; } [NotMapped] public string OptDateString => OptDate != null ? OptDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""; /// /// 执行人_optid /// [DisplayName("创建人")] public int? ExcuteId { get; set; } /// /// 创建人_excutename /// [DisplayName("创建人")] public string ExcuteName { get; set; } /// /// 操作时间_excutedate /// [DisplayName("操作时间")] public DateTime? ExcuteDate { get; set; } /// /// 保存抵押品时的错误消息 /// [NotMapped] public string ErrorMsg { get; set; } } public class company_collateralGridSum { /// /// /// 质押率总数 /// public double? RateSum { get; set; } public double? ProductTotalPriceSum { get; set; } } public class company_collateralReq : BaseSearchReq { /// /// 抵押赎回状态 /// public string Status { get; set; } /// /// 抵押品编号 /// public string Number { get; set; } /// /// 客户信息 /// public int? ClientId { get; set; } public string ClientIdString { get; set; } public string[] ClientIds => ClientIdString?.Split(','); /// /// 抵押品名 /// public int? VarietyId { get; set; } public string VarietyIdString { get; set; } public string[] VarietyIds => VarietyIdString?.Split(','); /// /// 客户编号 /// public string ClientNumber { get; set; } /// /// 客户名称 /// public string ClientName { get; set; } /// /// 数量 /// public double? ProductAmount { get; set; } /// /// 质押率 /// public double? Rate { get; set; } /// /// 标的Id /// public int? UnderlyingId { get; set; } /// /// 抵押时间 /// public DateTime? HappenDate { get; set; } [NotMapped] [JsonIgnore] public DateTime HappenDateStart { get; set; } [NotMapped] [JsonIgnore] public DateTime HappenDateEnd { get; set; } /// /// 抵押时间 /// public DateTime? BackDate { get; set; } [NotMapped] [JsonIgnore] public DateTime BackDateStart { get; set; } [NotMapped] [JsonIgnore] public DateTime BackDateEnd { get; set; } /// /// 执行状态 /// public string OptStatus { get; set; } /// /// 创建人_optid /// public int? OptId { get; set; } /// /// 创建人_optname /// public string OptName { get; set; } /// /// 操作时间_createdate /// public DateTime? OptDate { get; set; } [NotMapped] [JsonIgnore] public DateTime OptDateStart { get; set; } [NotMapped] [JsonIgnore] public DateTime OptDateEnd { get; set; } public DateTime? ValueDate { get; set; } /// /// 客户名称列表 /// public List ClientNameList { get; set; } /// /// 客户代码列表 /// public List ClientNumberList { get; set; } /// /// 抵押品赎回状态列表 /// public List StatusList { get; set; } /// /// 抵押品名列表 /// public List VarietyShortNameList { get; set; } /// /// 质押率范围开始 /// public double? RateStart { get; set; } /// /// 质押率范围结束 /// public double? RateEnd { get; set; } /// /// 执行状态列表 /// public List OptStatusList { get; set; } /// /// 是否查询子级标识 /// public bool ParentFlag { get; set; } } public class company_collateralLinq { public static string LogClass = "ccompany_collateral"; /// /// 加密主键 /// [NotMapped] public string EncryptId => DataProtectHelper.Encrypt(id); /// /// /// [Key] public int id { get; set; } /// /// 抵押赎回状态 /// [DisplayName("抵押赎回状态")] public string Status { get; set; } /// /// 出入金单号 /// [DisplayName("出入金单号")] public string Number { get; set; } /// /// 客户名称 /// [DisplayName("客户名称")] public int? ClientId { get; set; } /// /// 客户编号 /// [DisplayName("客户编号")] public string ClientNumber { get; set; } /// /// 客户名称 /// [DisplayName("客户名称")] public string ClientName { get; set; } /// /// 数量 /// [DisplayName("数量")] public double? ProductAmount { get; set; } /// /// 质押率 /// [DisplayName("质押率")] public double? Rate { get; set; } [NotMapped] public string RateString => Rate == null ? "0.00%" : (Rate.Value * 100).ToString("0.00") + "%"; /// /// 抵押品名 /// 编辑时下拉菜单选择,保存VarietyId /// [DisplayName("抵押品名")] public int? VarietyId { get; set; } /// /// 抵押品名,在View页面需要显示 /// [DisplayName("抵押品名")] public string VarietyShortName { get; set; } /// /// 标的Id /// [DisplayName("标的代码")] public int? UnderlyingId { get; set; } public string UnderlyingCode { get; set; } [DisplayName("盯市价格")] public double? SpotPrice { get; set; } [DisplayName("质押价值")] public double? ProductTotalPrice { get; set; } /// /// 抵押时间 /// [DisplayName("抵押时间")] public DateTime? HappenDate { get; set; } [NotMapped] public string HappenDateString => HappenDate != null ? HappenDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""; /// /// 赎回时间 /// [DisplayName("赎回时间")] public DateTime? BackDate { get; set; } [NotMapped] public string BackDateString => BackDate != null ? BackDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""; /// /// 仓单号 /// [DisplayName("仓单号")] public string SerialNumber { get; set; } /// /// 备注 /// [DisplayName("备注")] public string Comments { get; set; } /// /// 执行状态 /// "未确认", "已确认", "拒绝" /// [DisplayName("执行状态")] public string OptStatus { get; set; } /// /// 创建人_optid /// [DisplayName("创建人")] public int? OptId { get; set; } /// /// 创建人_optname /// [DisplayName("创建人")] public string OptName { get; set; } /// /// 操作时间_createdate /// [DisplayName("操作时间")] public DateTime? OptDate { get; set; } [NotMapped] public string OptDateString => OptDate != null ? OptDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : ""; /// /// 执行人_optid /// [DisplayName("创建人")] public int? ExcuteId { get; set; } /// /// 创建人_excutename /// [DisplayName("创建人")] public string ExcuteName { get; set; } /// /// 操作时间_excutedate /// [DisplayName("操作时间")] public DateTime? ExcuteDate { get; set; } } public class company_collateralStatusEnum { public const string 抵押 = "抵押"; public const string 赎回 = "赎回"; } }