Files
zszq-trs/Framework/YLErp.Core/DBModels/Clientcashincashout_remove.cs
T
2024-05-09 14:06:26 +08:00

144 lines
5.3 KiB
C#

using System.ComponentModel.DataAnnotations.Schema;
namespace YLErp.DBModels
{
/// <summary>
/// 出入金信息
/// </summary>
[Table("Clientcashincashout_remove")]
public class Clientcashincashout_remove : ClientCashICO
{
//每笔交易 应该只有一个应到账出入金
public const string 拒绝 = "拒绝";
public const string 未确认 = "未确认";
public const string 已确认 = "已确认";
public const string 已结算 = "已结算";
public static string 已到帐 = "已到帐";
public static string 应到帐 = "应到帐";
public static string 人工操作 = "人工操作";
public static string 应收 = "应收";
public static List<string> 到账类型 = new List<string> { 已到帐, 应到帐 };
public const string 系统操作_期权费 = "系统操作-期权费";
public const string 系统操作_行权费 = "系统操作-行权费";
public const string 系统操作_平仓费 = "系统操作-平仓费";
public const string 系统操作_票息 = "系统操作-票息";
public const string 系统操作_互换 = "系统操作-互换";
public const string 人工操作_其他 = "人工操作-其他";
public const string 人工操作_预付金 = "人工操作-预付金";
/// <summary>
/// all action
/// </summary>
public static List<string> ACTION = new List<string> { 系统操作_期权费, 系统操作_行权费, 系统操作_平仓费, 系统操作_票息 };
public static List<string> OPTIONFEE_ACTION = new List<string> { 系统操作_期权费 };
public static List<string> PROFIT_ACTION = new List<string> { 系统操作_行权费, 系统操作_平仓费, 系统操作_互换 };
public static List<string> CompanyCashAction = new List<string> { 人工操作_预付金 };
public static Dictionary<string, string> CompanyCashActionKVs = new Dictionary<string, string>
{
{ "预付金",人工操作_预付金}
};
/// <summary>
/// 方向类型
/// </summary>
[NotMapped]
[DisplayName("方向类型")]
public string DirectionType
{
get
{
if (Direction == "出金" || Direction == "入金" || Direction == "其他收入" || Direction == "其他支出" || Direction == "应收预付金" || Direction == "实收预付金" || Direction == "实付预付金" || Direction == "实收权利金" || Direction == "实付权利金")
{
return Direction;
}
if (Direction == "应收")
{
var action = "";
if (Action == "系统操作-平仓费" || Action == "系统操作-行权费")
{
action = "平仓/行权";
}
else if (Action == "系统操作-期权费")
{
action = "权利金";
}
else if (Action == "系统操作-票息")
{
action = "票息";
}
else if (Action == "系统操作-互换")
{
action = "互换";
}
if (action != "")
{
return $"{ action}{(Money > 0 ? "收入" : "支出")}";
}
}
return "";
}
}
/// <summary>
/// 交易员方向类型
/// </summary>
[NotMapped]
[DisplayName("方向类型")]
public string TradeDirectionType
{
get
{
if (Direction == "其他收入")
{
return "其他支出";
}
else if (Direction == "其他支出")
{
return "其他收入";
}
else if (Direction == "应收")
{
var action = "";
if (Action == "系统操作-平仓费" || Action == "系统操作-行权费")
{
action = "平仓/行权";
}
else if (Action == "系统操作-期权费")
{
action = "权利金";
}
else if (Action == "系统操作-票息")
{
action = "票息";
}
else if (Action == "系统操作-互换")
{
action = "互换";
}
if (action != "")
{
return $"{ action}{(Money > 0 ? "支出" : "收入")}";
}
}
return "";
}
}
[NotMapped]
public bool CanGenerateExit => PS.Config.IsExportEntryexit && Direction == "出金" && new List<string> { 已确认, 已结算 }.Contains(State);
[NotMapped]
public class Clientcashincashout_removeDto : Clientcashincashout_remove
{
}
}
}