Commit 97e33677 authored by 黄奎's avatar 黄奎

页面修改

parent 08ebe0b7
......@@ -724,20 +724,18 @@ namespace Edu.Module.Customer
};
if (oldModel!=null&&oldModel.AssistId != model.AssistId)
{
logContent += string.Format("修改协同人员:【0】=>【{1}】",
logContent += string.Format("修改协同人员:【{0}】=>【{1}】",
empList?.FirstOrDefault(qitem => qitem.Id == (oldModel?.AssistId ?? 0))?.EmployeeName,
empList?.FirstOrDefault(qitem => qitem.Id == model.AssistId)?.EmployeeName
);
}
if (oldModel != null && oldModel.AssistType != model.AssistType)
{
logContent += string.Format("修改协同类型:【0】=>【{1}】", oldModel.AssistType.ToName(), model.AssistType.ToName());
}
logContent += string.Format("修改协同类型:【{0}】=>【{1}】", oldModel.AssistType.ToName(), model.AssistType.ToName());
flag = student_AssistRepository.Update(fileds, new WhereHelper(nameof(RB_Student_Assist_Extend.Id), model.Id));
}
else
{
logContent += string.Format("新增协同人员:" + empList?.FirstOrDefault(qitem => qitem.Id == model.AssistId)?.EmployeeName);
logContent += string.Format("新增协同人员:" + empList?.FirstOrDefault(qitem => qitem.Id == model.AssistId)?.EmployeeName);
logContent += string.Format(" 协同类型:【{0}】", model.AssistType.ToName());
var newId = student_AssistRepository.Insert(model);
model.Id = newId;
flag = newId > 0;
......
......@@ -180,52 +180,6 @@ namespace Edu.Module.Duty
var newId = visitor_ReserveRepository.Insert(model);
model.Id = newId;
flag = newId > 0;
if (flag)
{
//获取学生信息
var smodel = studentRepository.GetEntity(model.Visitor_Id);
if (smodel != null && smodel.StuId > 0)
{
var assistTeacher = student_AssistRepository.GetStudentAssistListRepository(new RB_Student_Assist_Extend()
{
StuId = smodel.StuId
})?.FirstOrDefault(qitem => qitem.AssistType == Common.Enum.User.AssistTypeEnum.Teacher);
string logTitle = "新增协同人员";
string logContent = "";
var empModel = accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
{
AccountType = Common.Enum.User.AccountTypeEnum.Teacher,
AccountId = model.TeacherId
})?.FirstOrDefault();
if (assistTeacher == null)
{
logTitle = "新增协同人员";
student_AssistRepository.Insert(new RB_Student_Assist()
{
CreateBy = model.UpdateBy,
CreateTime = DateTime.Now,
Id = 0,
Status = DateStateEnum.Normal,
StuId = smodel.StuId,
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;
}
......
......@@ -146,18 +146,6 @@ namespace Edu.Module.Goods
}
return list;
}
/// <summary>
/// 获取活动参与人员列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_ActivitySurvey_Guest_Extend> GetActivitySurveyGuestListModule(RB_ActivitySurvey_Guest_Extend query)
{
var list = activitySurvey_GuestRepository.GetActivitySurveyGuestListRepository(query);
return list;
}
#endregion
}
}
......@@ -46,42 +46,5 @@ WHERE 1=1
}
return GetPage<RB_ActivitySurvey_Guest_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取活动参与人员列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_ActivitySurvey_Guest_Extend> GetActivitySurveyGuestListRepository(RB_ActivitySurvey_Guest_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_ActivitySurvey_Guest AS A
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_ActivitySurvey_Guest_Extend.Status), 0);
if (query != null)
{
if (query.TenantId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_ActivitySurvey_Guest_Extend.TenantId), query.TenantId);
}
if (query.MallBaseId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_ActivitySurvey_Guest_Extend.MallBaseId), query.MallBaseId);
}
if (query.SurveyId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_ActivitySurvey_Guest_Extend.SurveyId), query.SurveyId);
}
if (query.GuestId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_ActivitySurvey_Guest_Extend.GuestId), query.GuestId);
}
}
return Get<RB_ActivitySurvey_Guest_Extend>(builder.ToString()).ToList();
}
}
}
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