Commit 66d3eabd authored by 黄奎's avatar 黄奎

新增字段

parent 89ff1153
......@@ -138,5 +138,10 @@ namespace Edu.Model.Entity.User
/// 离职时间
/// </summary>
public DateTime? LeaveTime { get; set; }
/// <summary>
/// 邮箱
/// </summary>
public string Email { get; set; }
}
}
\ No newline at end of file
......@@ -116,5 +116,10 @@ namespace Edu.Model.Entity.User
/// 离职时间
/// </summary>
public DateTime? LeaveTime { get; set; }
/// <summary>
/// 邮箱
/// </summary>
public string Email { get; set; }
}
}
......@@ -167,5 +167,11 @@ namespace Edu.Model.Entity.User
/// 带班基础人数 2020-12-10 Add by:w
/// </summary>
public int BaseStuNum { get; set; }
/// <summary>
/// 邮箱
/// </summary>
public string Email { get; set; }
}
}
\ No newline at end of file
......@@ -156,5 +156,10 @@ namespace Edu.Model.ViewModel.User
/// 行政备注
/// </summary>
public string AccountRemark { get; set; }
/// <summary>
/// 邮箱
/// </summary>
public string Email { get; set; }
}
}
......@@ -131,6 +131,7 @@ namespace Edu.Module.User
fileds.Add(nameof(RB_Assist.LeaveStatus),model.LeaveStatus);
fileds.Add(nameof(RB_Assist.LeaveTime),model.LeaveTime);
fileds.Add(nameof(RB_Assist.Education),model.Education);
fileds.Add(nameof(RB_Assist.Email), model.Email);
}
string logContent = "";
if (model.AssistName != oldModel.AssistName)
......@@ -181,6 +182,10 @@ namespace Edu.Module.User
{
logContent += string.Format(",将学历由【{0}】修改为【{1}】。", oldModel.Education.ToName(), model.Education.ToName());
}
if (model.Email != oldModel.Email)
{
logContent += string.Format(",将邮箱由【{0}】修改为【{1}】。", oldModel.Email, model.Email);
}
if (!string.IsNullOrEmpty(logContent))
{
//新增日志
......
......@@ -116,7 +116,6 @@ namespace Edu.Module.User
public Employee_ViewModel GetEmployeeModule(int Id, int AccountId, int AccountType)
{
Employee_ViewModel model = new Employee_ViewModel();
var list = accountRepository.GetEmployeeListRepository(new Employee_ViewModel() { Id = Id, AccountId = AccountId, AccountType = (Common.Enum.User.AccountTypeEnum)AccountType });
if (list != null && list.Any())
{
......@@ -162,7 +161,8 @@ namespace Edu.Module.User
BirthDate = extModel.BirthDate,
LeaveStatus = extModel.LeaveStatus,
LeaveTime = extModel.LeaveTime,
Education = extModel.Education
Education = extModel.Education,
Email=extModel.Email,
});
break;
case Common.Enum.User.AccountTypeEnum.Teacher:
......@@ -189,6 +189,7 @@ namespace Edu.Module.User
LeaveStatus = extModel.LeaveStatus,
LeaveTime = extModel.LeaveTime,
Education = extModel.Education,
Email=extModel.Email,
});
break;
case Common.Enum.User.AccountTypeEnum.Assist:
......@@ -213,7 +214,8 @@ namespace Edu.Module.User
BirthDate = extModel.BirthDate,
LeaveStatus = extModel.LeaveStatus,
LeaveTime = extModel.LeaveTime,
Education = extModel.Education
Education = extModel.Education,
Email=extModel.Email,
});
break;
}
......
......@@ -78,8 +78,9 @@ namespace Edu.Module.User
{ nameof(RB_Manager_ViewModel.Address),model.Address },
{ nameof(RB_Manager_ViewModel.BirthDate),model.BirthDate },
{ nameof(RB_Manager_ViewModel.LeaveStatus),model.LeaveStatus },
{ nameof(RB_Manager_ViewModel.LeaveTime),model.LeaveTime },
{ nameof(RB_Manager_ViewModel.LeaveTime),model.LeaveTime },
{ nameof(RB_Manager_ViewModel.Education),model.Education },
{ nameof(RB_Manager_ViewModel.Email),model.Email },
};
string logContent = "";
if (model.MName != oldModel.MName)
......@@ -142,6 +143,10 @@ namespace Edu.Module.User
{
logContent += string.Format(",将学历由【{0}】修改为【{1}】。", oldModel.Education.ToName(), model.Education.ToName());
}
if (model.Email != oldModel.Email)
{
logContent += string.Format(",将邮箱由【{0}】修改为【{1}】。", oldModel.Email, model.Email);
}
if (!string.IsNullOrEmpty(logContent))
{
//新增日志
......
......@@ -137,6 +137,7 @@ namespace Edu.Module.User
fileds.Add(nameof(RB_Teacher_ViewModel.LeaveStatus), model.LeaveStatus);
fileds.Add(nameof(RB_Teacher_ViewModel.LeaveTime), model.LeaveTime);
fileds.Add(nameof(RB_Teacher_ViewModel.Education), model.Education);
fileds.Add(nameof(RB_Teacher_ViewModel.Email), model.Email);
}
string logContent = "";
if (model.TeacherName != oldModel.TeacherName)
......@@ -183,6 +184,10 @@ namespace Edu.Module.User
{
logContent += string.Format(",将学历由【{0}】修改为【{1}】。", oldModel.Education.ToName(), model.Education.ToName());
}
if (model.Email != oldModel.Email)
{
logContent += string.Format(",将邮箱由【{0}】修改为【{1}】。", oldModel.Email, model.Email);
}
if (!string.IsNullOrEmpty(logContent))
{
//新增日志
......
......@@ -303,24 +303,25 @@ SELECT ar.AccountRemark,A.Id,A.Account,A.AccountId,A.Group_Id,A.School_Id,A.Empl
ELSE 0 END) IsBirth
FROM
(
SELECT A.Id,A.Account,A.`Password`, 1 as AccountType,B.MId as AccountId,
A.CreateBy,A.CreateTime,A.UpdateBy,A.UpdateTime,A.Group_Id,A.`Status`,A.AnnualLeaveDay,
b.School_Id,IFNULL(B.MName,'') AS EmployeeName,B.MHead AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.MTel AS EmployeeTel
SELECT A.Id,A.Account,A.`Password`, 1 as AccountType,B.MId as AccountId
,A.CreateBy,A.CreateTime,A.UpdateBy,A.UpdateTime,A.Group_Id,A.`Status`,A.AnnualLeaveDay
,b.School_Id,IFNULL(B.MName,'') AS EmployeeName,B.MHead AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard
,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.MTel AS EmployeeTel,IFNULL(B.Email,'') AS Email
FROM rb_manager AS B LEFT JOIN rb_account AS A ON A.AccountId=B.MId AND A.AccountType=1
WHERE 1=1 {0} {1}
UNION ALL
SELECT A.Id,A.Account,A.`Password`, 2 as AccountType,B.TId as AccountId,
A.CreateBy,A.CreateTime,A.UpdateBy,A.UpdateTime,A.Group_Id,A.`Status`,A.AnnualLeaveDay,
b.School_Id,IFNULL(B.TeacherName,'') AS EmployeeName,B.TeacherIcon AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.TeacherTel AS EmployeeTel
,B.LeaveStatus,B.LeaveTime,B.TeacherTel AS EmployeeTel,IFNULL(B.Email,'') AS Email
FROM rb_teacher AS B LEFT JOIN rb_account AS A ON A.AccountId=B.TId AND A.AccountType=2
WHERE 1=1 {0} {2}
UNION ALL
SELECT A.Id,A.Account,A.`Password`, 3 as AccountType,B.AId as AccountId,
A.CreateBy,A.CreateTime,A.UpdateBy,A.UpdateTime,A.Group_Id,A.`Status`,A.AnnualLeaveDay,
b.School_Id,IFNULL(B.AssistName,'') AS EmployeeName,B.AssistIcon AS UserIcon,B.Dept_Id,B.Post_Id,B.IDCard,B.Sex,B.Education,B.EntryTime,B.Address,B.BirthDate
,B.LeaveStatus,B.LeaveTime,B.AssistTel AS EmployeeTel
,B.LeaveStatus,B.LeaveTime,B.AssistTel AS EmployeeTel,IFNULL(B.Email,'') AS Email
FROM rb_assist AS B LEFT JOIN rb_account AS A ON A.AccountId=B.AId AND A.AccountType=3
WHERE 1=1 {0} {3}
) AS A LEFT JOIN rb_group AS g ON A.Group_Id=g.GId
......
......@@ -733,6 +733,7 @@ namespace Edu.WebApi.Controllers.User
LeaveTime=base.ParmJObj.GetDateTime("LeaveTime"),
Education=(EducationEnum)base.ParmJObj.GetInt("Education"),
School_Id=base.ParmJObj.GetInt("School_Id"),
Email=base.ParmJObj.GetStringValue("Email"),
};
extModel.CreateBy = base.UserInfo.Id;
extModel.CreateTime = DateTime.Now;
......@@ -903,6 +904,7 @@ namespace Edu.WebApi.Controllers.User
SexStr = (extModel?.Sex ?? 0) == 0 ? "男" : "女",
UserIcon = extModel?.UserIcon ?? "",
Status = extModel?.Status ?? 0,
};
return ApiResult.Success(data: obj);
}
......
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