Commit 16cf4754 authored by 吴春's avatar 吴春

提交供应商修改

parent 7eea27bb
......@@ -81,6 +81,15 @@ namespace Mall.Module.User
model.Status = (int)Common.Enum.DateStateEnum.Normal;
var id = clientBankAccountRepository.Insert(model.ClientBankAccount);
model.BankAccountId = id;
//IDictionary<string, object> fileds = new Dictionary<string, object>()
//{
// { nameof(RB_ClientBankAccount.SupplierId),model.ID}
//};
//IList<WhereHelper> whereHelpers = new List<WhereHelper>()
//{
// new WhereHelper (){ FiledName=nameof(RB_ClientBankAccount.ID),FiledValue=id,OperatorEnum=OperatorEnum.Equal}
//};
//flag = clientBankAccountRepository.Update(fileds, whereHelpers);
flag = id > 0;
}
else
......@@ -94,7 +103,8 @@ namespace Mall.Module.User
{ nameof(RB_ClientBankAccount.AccountHolder),model.ClientBankAccount.AccountHolder},
{ nameof(RB_ClientBankAccount.CardNum),model.ClientBankAccount.CardNum},
{ nameof(RB_ClientBankAccount.AccountAlias),model.ClientBankAccount.AccountAlias},
{ nameof(RB_ClientBankAccount.Status),model.ClientBankAccount.Status}
{ nameof(RB_ClientBankAccount.Status),model.ClientBankAccount.Status},
{ nameof(RB_ClientBankAccount.AccountClassify),model.ClientBankAccount.AccountClassify}
};
IList<WhereHelper> whereHelpers = new List<WhereHelper>()
{
......@@ -127,8 +137,17 @@ namespace Mall.Module.User
if (id > 0)
{
model.BankAccountId = id;
flag = supplierRepository.Insert(model) > 0;
int supplierId = supplierRepository.Insert(model);
flag = supplierId > 0;
//IDictionary<string, object> fileds = new Dictionary<string, object>()
//{
// { nameof(RB_ClientBankAccount.SupplierId),supplierId}
//};
//IList<WhereHelper> whereHelpers = new List<WhereHelper>()
//{
// new WhereHelper (){ FiledName=nameof(RB_ClientBankAccount.ID),FiledValue=id,OperatorEnum=OperatorEnum.Equal}
//};
//flag = clientBankAccountRepository.Update(fileds, whereHelpers);
}
}
......
......@@ -91,18 +91,18 @@ namespace Mall.WebApi.Controllers.User
return ApiResult.Failed("请填写联系电话");
}
if (string.IsNullOrEmpty(demodel.ClientBankAccount.OpenBankName))
{
return ApiResult.Failed("请填写开户行!");
}
if (string.IsNullOrEmpty(demodel.ClientBankAccount.AccountHolder))
{
return ApiResult.Failed("请填写开户人!");
}
if (string.IsNullOrEmpty(demodel.ClientBankAccount.CardNum))
{
return ApiResult.Failed("请填写卡号!");
}
//if (string.IsNullOrEmpty(demodel.ClientBankAccount.OpenBankName))
//{
// return ApiResult.Failed("请填写开户行!");
//}
//if (string.IsNullOrEmpty(demodel.ClientBankAccount.AccountHolder))
//{
// return ApiResult.Failed("请填写开户人!");
//}
//if (string.IsNullOrEmpty(demodel.ClientBankAccount.CardNum))
//{
// return ApiResult.Failed("请填写卡号!");
//}
//if (supplierModule.ExistsClientAccount(demodel.ClientBankAccount.ID, demodel.ClientBankAccount.CardNum, 2, Convert.ToInt32(Config.RB_Branch_Id)))
//{
// return ApiResult.Failed("卡号重复!");
......@@ -120,6 +120,7 @@ namespace Mall.WebApi.Controllers.User
if (demodel.ID > 0)
{
demodel.BankAccountId = demodel.ClientBankAccount.ID;
demodel.UpdateDate = System.DateTime.Now;
}
bool flag = supplierModule.AddOrUpdateSupplier(demodel);
if (flag)
......
......@@ -35,6 +35,13 @@ namespace Mall.WindowsService.Helper
Module.FinanceModule.AutoCreateFinanceRefund();
LogHelper.Write("AutoCreateFinanceRefund=====End");
#endregion
#region 分享商VIP过期时间
LogHelper.Write("DistributorVipModule=====Start");
Module.FinanceModule.DistributorVipModule();
LogHelper.Write("DistributorVipModule=====End");
#endregion
Interlocked.Exchange(ref inTimer, 0);
}
}
......@@ -44,7 +51,8 @@ namespace Mall.WindowsService.Helper
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void AutoCancelOrder(object sender, System.Timers.ElapsedEventArgs e) {
public void AutoCancelOrder(object sender, System.Timers.ElapsedEventArgs e)
{
if (Interlocked.Exchange(ref inTimer1, 1) == 0)
{
LogHelper.Write("AutoCancelOrder=====Start");
......@@ -67,7 +75,7 @@ namespace Mall.WindowsService.Helper
{
LogHelper.Write("AutoReceivingOrder=====Start");
Module.FinanceModule.AutoReceivingOrder();
LogHelper.Write("AutoReceivingOrder=====End");
LogHelper.Write("AutoReceivingOrder=====End");
}
LogHelper.Write("AutoAfterSaleOrderSendCommission=====Start");
......@@ -90,7 +98,7 @@ namespace Mall.WindowsService.Helper
{
LogHelper.Write("AutoReleaseTheOffline=====Start");
Module.FinanceModule.AutoReleaseTheOffline();
LogHelper.Write("AutoReleaseTheOffline=====End");
LogHelper.Write("AutoReleaseTheOffline=====End");
}
Interlocked.Exchange(ref inTimer3, 0);
}
......
......@@ -1557,22 +1557,25 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
try
{
var financeConfigurineList = distributor_InfoRepository.GetOverTimeVipList(new RB_Distributor_Info_Extend { IsSelectOverTime = 1, AuditStatus = DistributorAuditStatusEnum.Audited });
var mallList = financeConfigurineList.GroupBy(x => new { x.TenantId, x.MallBaseId });
foreach (var item in mallList)
var fxGradeList = distributor_FXGradeRepository.GetList(new RB_Distributor_FXGrade_Extend { IsGuest = 3 });
foreach (var itemFXGradeList in fxGradeList)
{
var fxGradeModel = distributor_FXGradeRepository.GetList(new RB_Distributor_FXGrade_Extend { TenantId = item.Key.TenantId, MallBaseId = item.Key.MallBaseId, IsGuest = 1 }).FirstOrDefault();
var list = financeConfigurineList.Where(x => x.MallBaseId == item.Key.MallBaseId & x.TenantId == item.Key.TenantId & x.FXGradeId != fxGradeModel.Id);
if (list != null && list.Any())
var financeConfigurineList = distributor_InfoRepository.GetOverTimeVipList(new RB_Distributor_Info_Extend { IsSelectOverTime = 1, AuditStatus = DistributorAuditStatusEnum.Audited ,GradeId= itemFXGradeList.Id});
var mallList = financeConfigurineList.GroupBy(x => new { x.TenantId, x.MallBaseId });
foreach (var item in mallList)
{
foreach (var itemDistributor in list)
var fxGradeModel = distributor_FXGradeRepository.GetList(new RB_Distributor_FXGrade_Extend { TenantId = item.Key.TenantId, MallBaseId = item.Key.MallBaseId, IsGuest = 1 }).FirstOrDefault();
var list = financeConfigurineList.Where(x => x.MallBaseId == item.Key.MallBaseId & x.TenantId == item.Key.TenantId & x.FXGradeId != fxGradeModel.Id);
if (list != null && list.Any())
{
Dictionary<string, object> keyValues = new Dictionary<string, object>() { };
keyValues.Add(nameof(RB_Distributor_Info.FXGradeId), fxGradeModel.Id);
keyValues.Add(nameof(RB_Goods_Order_Extend.CancelTime), DateTime.Now);
foreach (var itemDistributor in list)
{
Dictionary<string, object> keyValues = new Dictionary<string, object>() { };
keyValues.Add(nameof(RB_Distributor_Info.FXGradeId), fxGradeModel.Id);
keyValues.Add(nameof(RB_Goods_Order_Extend.CancelTime), DateTime.Now);
List<WhereHelper> wheres = new List<WhereHelper>() {
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_Order_Extend.OrderId),
FiledValue=itemDistributor.Id,
......@@ -1589,7 +1592,8 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
OperatorEnum=OperatorEnum.Equal
}
};
flag = goods_OrderRepository.Update(keyValues, wheres);
flag = goods_OrderRepository.Update(keyValues, wheres);
}
}
}
}
......
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