Commit e76c954e authored by 黄奎's avatar 黄奎

页面修改

parent 49f43117
......@@ -39,6 +39,11 @@ namespace Edu.Model.ViewModel.Bonus
/// 期数编号【查询使用】
/// </summary>
public string QPeriodIds { get; set; }
/// <summary>
/// 员工姓名
/// </summary>
public string EmployeeName { get; set; }
}
/// <summary>
......
......@@ -10,5 +10,9 @@ namespace Edu.Model.ViewModel.Bonus
/// </summary>
public class RB_Personnel_Period_Extend : RB_Personnel_Period
{
/// <summary>
/// 提成数据
/// </summary>
public List<RB_Personnel_Bonus_Extend> BonusList { get; set; }
}
}
......@@ -12,6 +12,7 @@ using VT.FW.DB;
using Edu.Repository.User;
using Edu.Model.CacheModel;
using Edu.AOP.CustomerAttribute;
using Edu.Model.ViewModel.User;
namespace Edu.Module.Course
{
......@@ -60,6 +61,11 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_Personnel_PeriodRepository personnel_PeriodRepository = new RB_Personnel_PeriodRepository();
/// <summary>
/// 人员账号仓储层对象
/// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 获取人头奖金期数分页列表
......@@ -79,10 +85,27 @@ namespace Edu.Module.Course
{
QPeriodIds = ids
});
List<Employee_ViewModel> empList = new List<Employee_ViewModel>();
if (bonusList != null && bonusList.Count > 0)
{
string empIds = string.Join(",", bonusList.Select(qitem => qitem.EmployeeId));
empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
{
QIds = empIds
});
}
foreach (var item in list)
{
item.SumPrice = bonusList?.Where(qitem => qitem.PeriodId == item.Id)
?.Sum(qitem => qitem.CurRewardMoney+qitem.ClueNumSalary+qitem.OpenBonus-qitem.BeforeMoney)??0;
var tempList = bonusList?.Where(qitem => qitem.PeriodId == item.Id)?.ToList();
if (tempList != null && tempList.Count > 0)
{
foreach (var subItem in tempList)
{
subItem.EmployeeName = empList?.Where(qitem => qitem.Id == subItem.EmployeeId)?.FirstOrDefault()?.EmployeeName ?? "";
}
}
item.SumPrice = tempList?.Sum(qitem => qitem.CurRewardMoney+qitem.ClueNumSalary+qitem.OpenBonus-qitem.BeforeMoney)??0;
item.BonusList = tempList;
}
}
return list;
......
......@@ -101,7 +101,8 @@ namespace Edu.Module.Customer
{nameof(RB_Customer_Extend.WeChatNo),model.WeChatNo },
};
flag = customerRepository.Update(fileds, new WhereHelper(nameof(RB_Customer_Extend.CustomerId), model.CustomerId));
if (flag) {
if (flag)
{
#region 操作记录
string LogContent = "后台修改同业信息:";
if (oldModel.CustomerName != model.CustomerName)
......@@ -112,6 +113,19 @@ namespace Edu.Module.Customer
{
LogContent += "电话由'" + oldModel.ContactNumber + "'修改为'" + model.ContactNumber + "';";
}
if (oldModel.Fax != model.Fax)
{
LogContent += "传真由'" + oldModel.Fax + "'修改为'" + model.Fax + "';";
}
if (oldModel.QQ != model.QQ)
{
LogContent += "QQ由'" + oldModel.QQ + "'修改为'" + model.QQ + "';";
}
if (oldModel.Email != model.Email)
{
LogContent += "邮箱由'" + oldModel.Email + "'修改为'" + model.Email + "';";
}
if (oldModel.Address != model.Address)
{
LogContent += "地址由'" + oldModel.Address + "'修改为'" + model.Address + "';";
......@@ -128,7 +142,10 @@ namespace Edu.Module.Customer
{
LogContent += "类型由'" + (oldModel.CustomerType == 1 ? "企业" : "学校") + "'修改为'" + (model.CustomerType == 1 ? "企业" : "学校") + "';";
}
if (oldModel.WeChatNo != model.WeChatNo)
{
LogContent += "微信号由'" + oldModel.Address + "'修改为'" + model.Address + "';";
}
//记录操作日志
changeLogRepository.Insert(new Model.Entity.Log.RB_User_ChangeLog()
{
......
......@@ -214,6 +214,7 @@ namespace Edu.WebApi.Controllers.Bonus
CreateByName,
item.Financials,
CreateTime = Common.ConvertHelper.FormatTime(item.CreateTime),
item.BonusList,
});
}
pageModel.Count = rowsCount;
......
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