TRS-ZS-721 资金划转

This commit is contained in:
吴方海
2025-09-05 14:11:15 +08:00
parent eb4a51110e
commit ac07eae81e
10 changed files with 229 additions and 23 deletions
@@ -602,6 +602,8 @@ namespace YLErp.Modules.ClientModule
r.CurrencyCode = req.CurrencyCode;
r.cash_type = req.cash_type;
r.ValidState = ConsGlobal.Valid;
r.TransferOutAccount = req.TransferOutAccount;
r.TransferInAccount = req.TransferInAccount;
}
if (isARAP)
@@ -696,7 +698,31 @@ namespace YLErp.Modules.ClientModule
}
#endregion
#region
if ("划转".Equals(r.Direction))
{
var clientbalance = ClientBalanceUtility.GetClientBanlances(new List<int> { r.ClientId.Value }, DateTime.MinValue, DateTime.Now.Date).FirstOrDefault();
if (clientbalance == null)
{
throw new ServiceException("查询客户资金信息失败");
}
var money = r.Money ?? 0;
money=isAddNew? money: money-(originalMoney??0);
if (r.TransferOutAccount == "初保账户" && money > clientbalance.NetFundAll)
{
throw new ServiceException("划转金额不能超过初保账户金额");
}
if (r.TransferOutAccount == "追保账户" && money > clientbalance.VmFundSum)
{
throw new ServiceException("划转金额不能超过追保账户金额");
}
if (r.TransferOutAccount == "已实现盈亏" && money > clientbalance.WinLoss)
{
throw new ServiceException("划转金额不能超过已实现盈亏");
}
r.cash_type = null;
}
#endregion
if (r.Direction != "出金" && r.Direction != "入金")
{
r.OpenBank = null;
@@ -18,8 +18,9 @@ namespace YLErp.BLL
/// 系统中可以操作的方向
/// </summary>
public static List<string> EntryDirection_Remove = new List<string> { "收入", "支出" };
public static List<string> EntryDirection_Menu = new List<string> { "出金", "入金", "其他收入", "其他支出" };
public static List<string> DirectionType = new List<string> { "出金", "入金", "权利金支出", "权利金收入", "平仓/行权支出", "平仓/行权收入", "票息支出", "票息收入", "其他支出", "其他收入", "互换收入", "互换支出","应付预付金","预付金返息" };
public static List<string> EntryDirection_Menu = new List<string> { "出金", "入金", "其他收入", "其他支出","划转" };
public static List<string> TransferAccount = new List<string> { "初保账户", "追保账户", "已实现盈亏" };
public static List<string> DirectionType = new List<string> { "出金", "入金", "划转", "权利金支出", "权利金收入", "平仓/行权支出", "平仓/行权收入", "票息支出", "票息收入", "其他支出", "其他收入", "互换收入", "互换支出","应付预付金","预付金返息" };
/// <summary>
/// 现金交易方向
/// </summary>