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

新增字段

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