Commit 0c58fd9f authored by liudong1993's avatar liudong1993

1

parent bbde2ef0
...@@ -458,7 +458,7 @@ namespace REBORN.Module.SellModule ...@@ -458,7 +458,7 @@ namespace REBORN.Module.SellModule
RB_Finance_Infochange_Log financeLog = new Model.Entity.Log.RB_Finance_Infochange_Log(); RB_Finance_Infochange_Log financeLog = new Model.Entity.Log.RB_Finance_Infochange_Log();
#region 添加银行机构 #region 添加银行机构
var tempFlag = true; var tempFlag = true;
var FinancialInstitutions = new RB_FinancialInstitutionsRepository().GetByNameList(dmodel.BankName)?.FirstOrDefault(); var FinancialInstitutions = new RB_FinancialInstitutionsRepository().GetByNameList(dmodel.BankName, userInfo.RB_Group_id)?.FirstOrDefault();
if (FinancialInstitutions == null) if (FinancialInstitutions == null)
{ {
FinancialInstitutions = new RB_FinancialInstitutions_Extend() FinancialInstitutions = new RB_FinancialInstitutions_Extend()
...@@ -684,7 +684,7 @@ namespace REBORN.Module.SellModule ...@@ -684,7 +684,7 @@ namespace REBORN.Module.SellModule
RB_Finance_Infochange_Log financeLog = new Model.Entity.Log.RB_Finance_Infochange_Log(); RB_Finance_Infochange_Log financeLog = new Model.Entity.Log.RB_Finance_Infochange_Log();
#region 添加银行机构 #region 添加银行机构
var tempFlag = true; var tempFlag = true;
var FinancialInstitutions = new RB_FinancialInstitutionsRepository().GetByNameList(dmodel.BankName)?.FirstOrDefault(); var FinancialInstitutions = new RB_FinancialInstitutionsRepository().GetByNameList(dmodel.BankName, userInfo.RB_Group_id)?.FirstOrDefault();
if (FinancialInstitutions == null) if (FinancialInstitutions == null)
{ {
FinancialInstitutions = new RB_FinancialInstitutions_Extend() FinancialInstitutions = new RB_FinancialInstitutions_Extend()
...@@ -1381,7 +1381,7 @@ namespace REBORN.Module.SellModule ...@@ -1381,7 +1381,7 @@ namespace REBORN.Module.SellModule
RB_FinancialInstitutions_Extend rB_Financial = new RB_FinancialInstitutions_Extend(); RB_FinancialInstitutions_Extend rB_Financial = new RB_FinancialInstitutions_Extend();
RB_Finance_Infochange_Log financeLog = new Model.Entity.Log.RB_Finance_Infochange_Log(); RB_Finance_Infochange_Log financeLog = new Model.Entity.Log.RB_Finance_Infochange_Log();
#region 添加银行机构 #region 添加银行机构
var FinancialInstitutions = new RB_FinancialInstitutionsRepository().GetByNameList(dmodel.BankName)?.FirstOrDefault(); var FinancialInstitutions = new RB_FinancialInstitutionsRepository().GetByNameList(dmodel.BankName, userInfo.RB_Group_id)?.FirstOrDefault();
if (FinancialInstitutions == null) if (FinancialInstitutions == null)
{ {
FinancialInstitutions = new RB_FinancialInstitutions_Extend() FinancialInstitutions = new RB_FinancialInstitutions_Extend()
......
...@@ -1154,7 +1154,7 @@ namespace REBORN.Module.UserModule ...@@ -1154,7 +1154,7 @@ namespace REBORN.Module.UserModule
} }
RB_FinancialInstitutions_Extend rB_Financial = new RB_FinancialInstitutions_Extend(); RB_FinancialInstitutions_Extend rB_Financial = new RB_FinancialInstitutions_Extend();
#region 添加银行机构 #region 添加银行机构
var FinancialInstitutions = new RB_FinancialInstitutionsRepository().GetByNameList(dmodel.BankName)?.FirstOrDefault(); var FinancialInstitutions = new RB_FinancialInstitutionsRepository().GetByNameList(dmodel.BankName, dmodel.RB_Group_Id ?? 0)?.FirstOrDefault();
if (FinancialInstitutions == null) if (FinancialInstitutions == null)
{ {
FinancialInstitutions = new RB_FinancialInstitutions_Extend() FinancialInstitutions = new RB_FinancialInstitutions_Extend()
......
...@@ -173,9 +173,12 @@ left join rb_accountrelation al on t.BankType=al.AccountType and t.ID=al.Account ...@@ -173,9 +173,12 @@ left join rb_accountrelation al on t.BankType=al.AccountType and t.ID=al.Account
/// </summary> /// </summary>
/// <param name="Name"></param> /// <param name="Name"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_FinancialInstitutions_Extend> GetByNameList(string Name) public List<RB_FinancialInstitutions_Extend> GetByNameList(string Name, int GroupId =0)
{ {
string where = string.Format(" where " + nameof(RB_FinancialInstitutions.Status) + "={0}", (int)Common.Enum.DateStateEnum.Normal); string where = string.Format(" where " + nameof(RB_FinancialInstitutions.Status) + "={0}", (int)Common.Enum.DateStateEnum.Normal);
if (GroupId > 0) {
where += string.Format(" AND " + nameof(RB_FinancialInstitutions.GroupId) + "={0}", GroupId);
}
if (!string.IsNullOrWhiteSpace(Name)) if (!string.IsNullOrWhiteSpace(Name))
{ {
where += string.Format(" AND " + nameof(RB_FinancialInstitutions.Name) + "='{0}'", Name); where += string.Format(" AND " + nameof(RB_FinancialInstitutions.Name) + "='{0}'", Name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment