Commit 1563abc7 authored by 黄奎's avatar 黄奎

页面修改

parent eaa9aa9d
...@@ -18,6 +18,8 @@ using Edu.Repository.Grade; ...@@ -18,6 +18,8 @@ using Edu.Repository.Grade;
using Edu.Repository.Customer; using Edu.Repository.Customer;
using Edu.Model.ViewModel.User; using Edu.Model.ViewModel.User;
using Edu.Common.Plugin; using Edu.Common.Plugin;
using Edu.Model.ViewModel.Customer;
using Edu.Model.Entity.Customer;
namespace Edu.Module.Duty namespace Edu.Module.Duty
{ {
...@@ -45,6 +47,21 @@ namespace Edu.Module.Duty ...@@ -45,6 +47,21 @@ namespace Edu.Module.Duty
/// 账号管理仓储层对象 /// 账号管理仓储层对象
/// </summary> /// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository(); private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 学员仓储层对象
/// </summary>
private readonly RB_StudentRepository studentRepository = new RB_StudentRepository();
/// <summary>
/// 学员协助人员
/// </summary>
private readonly RB_Student_AssistRepository student_AssistRepository = new RB_Student_AssistRepository();
/// <summary>
/// 学员日志仓储层对象
/// </summary>
private readonly RB_Student_LogRepository student_LogRepository = new RB_Student_LogRepository();
/// <summary> /// <summary>
/// 获取访客约课分页列表 /// 获取访客约课分页列表
...@@ -128,35 +145,51 @@ namespace Edu.Module.Duty ...@@ -128,35 +145,51 @@ namespace Edu.Module.Duty
var newId = visitor_ReserveRepository.Insert(model); var newId = visitor_ReserveRepository.Insert(model);
model.Id = newId; model.Id = newId;
flag = newId > 0; flag = newId > 0;
if (flag) { if (flag)
{
//获取学生信息 //获取学生信息
//var smodel = studentRepository.GetEntity(model.Visitor_Id); var smodel = studentRepository.GetEntity(model.Visitor_Id);
//if (smodel != null && smodel.StuStage <= Common.Enum.User.StuStageEnum.PreliminaryCommunication) if (smodel != null && smodel.StuId > 0)
//{ {
// Dictionary<string, object> keyValues = new Dictionary<string, object>() { var assistTeacher = student_AssistRepository.GetStudentAssistListRepository(new RB_Student_Assist_Extend()
// { nameof(RB_Student_ViewModel.StuStage), Common.Enum.User.StuStageEnum.Audition} {
// }; StuId = smodel.StuId
// List<WhereHelper> wheres = new List<WhereHelper>() { })?.FirstOrDefault(qitem => qitem.AssistType == Common.Enum.User.AssistTypeEnum.Teacher);
// new WhereHelper(){ string logTitle = "新增协同人员";
// FiledName = nameof (RB_Student_ViewModel.StuId), string logContent = "";
// FiledValue = model.Visitor_Id, var empModel = accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
// OperatorEnum =OperatorEnum.Equal {
// } AccountType = Common.Enum.User.AccountTypeEnum.Teacher,
// }; AccountId = model.TeacherId
// studentRepository.Update(keyValues, wheres); })?.FirstOrDefault();
// student_LogRepository.Insert(new Model.Entity.Customer.RB_Student_Log() if (assistTeacher == null)
// { {
// LogId = 0, logTitle = "新增协同人员";
// CreateBy = model.CreateBy, student_AssistRepository.Insert(new RB_Student_Assist()
// CreateTime = DateTime.Now, {
// CreateType = 1, CreateBy = model.UpdateBy,
// Group_Id = model.Group_Id, CreateTime = DateTime.Now,
// LogContent = "首次试听,客户阶段由'" + (smodel.StuStage.ToName()) + "'自动转换为'" + (Common.Enum.User.StuStageEnum.Audition.ToName()) + "'", Id = 0,
// LogTitle = "客户阶段变更", Status = DateStateEnum.Normal,
// LogType = Common.Enum.Log.StudentLogTypeEnum.BasicInfo, StuId = smodel.StuId,
// StuId = model.Visitor_Id AssistId = empModel?.Id ?? 0,
// }); AssistType = Common.Enum.User.AssistTypeEnum.Teacher,
//} });
logContent += string.Format("新增协同人员:" + empModel?.EmployeeName);
}
else
{
logTitle = "修改协同人员";
string oldName = accountRepository.GetEmployeeInfo(assistTeacher.AssistId)?.EmployeeName ?? "";
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Student_Assist.AssistId),(empModel?.Id??0) }
};
student_AssistRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Assist.Id), assistTeacher.Id));
logContent += string.Format("修改协同人员:由【{0}】=>【{1}】", oldName, empModel?.EmployeeName);
}
student_LogRepository.AddStuLogRepository(smodel.StuId, Common.Enum.Log.StudentLogTypeEnum.BasicInfo, logTitle, logContent, model.UpdateBy);
}
} }
} }
return flag; return flag;
......
...@@ -340,7 +340,7 @@ FROM ...@@ -340,7 +340,7 @@ FROM
/// <param name="query"></param> /// <param name="query"></param>
/// <param name="parameters"></param> /// <param name="parameters"></param>
/// <returns></returns> /// <returns></returns>
public string GetEmployeeSqlReposiroty(Employee_ViewModel query, DynamicParameters parameters) private string GetEmployeeSqlReposiroty(Employee_ViewModel query, DynamicParameters parameters)
{ {
StringBuilder where = new StringBuilder(); StringBuilder where = new StringBuilder();
StringBuilder where2 = new StringBuilder(); StringBuilder where2 = new StringBuilder();
......
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