Commit c1f814e4 authored by 黄奎's avatar 黄奎

页面修改

parent 841c9b8d
...@@ -52,5 +52,10 @@ namespace Edu.Model.ViewModel.User ...@@ -52,5 +52,10 @@ namespace Edu.Model.ViewModel.User
/// 岗位角色列表 /// 岗位角色列表
/// </summary> /// </summary>
public List<RB_Post_Role_ViewModel> PostRoleList { get; set; } public List<RB_Post_Role_ViewModel> PostRoleList { get; set; }
/// <summary>
/// 部门查询
/// </summary>
public string QDeptIds { get; set; }
} }
} }
...@@ -103,24 +103,31 @@ namespace Edu.Module.User ...@@ -103,24 +103,31 @@ namespace Edu.Module.User
var oldModel = GetAssistModule(model.AId); var oldModel = GetAssistModule(model.AId);
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Assist.School_Id),model.School_Id },
{nameof(RB_Assist.Teacher_Id),model.Teacher_Id },
{nameof(RB_Assist.AssistName),model.AssistName.Trim() }, {nameof(RB_Assist.AssistName),model.AssistName.Trim() },
{nameof(RB_Assist.AssistTel),model.AssistTel }, {nameof(RB_Assist.AssistTel),model.AssistTel },
{nameof(RB_Assist.AssistIcon),model.AssistIcon }, {nameof(RB_Assist.AssistIcon),model.AssistIcon },
{nameof(RB_Assist.AssistIntro),model.AssistIntro },
{nameof(RB_Assist.UpdateBy),model.UpdateBy }, {nameof(RB_Assist.UpdateBy),model.UpdateBy },
{nameof(RB_Assist.UpdateTime),model.UpdateTime }, {nameof(RB_Assist.UpdateTime),model.UpdateTime },
{ nameof(RB_Assist.IDCard),model.IDCard },
{ nameof(RB_Assist.Sex),model.Sex },
{ nameof(RB_Assist.EntryTime),model.EntryTime },
{ nameof(RB_Assist.Address),model.Address },
{ nameof(RB_Assist.BirthDate),model.BirthDate },
{ nameof(RB_Assist.LeaveStatus),model.LeaveStatus },
{ nameof(RB_Assist.LeaveTime),model.LeaveTime },
{ nameof(RB_Assist.Education),model.Education },
}; };
if (isUpdateBasic)
{
fileds.Add(nameof(RB_Assist.Dept_Id), model.Dept_Id);
fileds.Add(nameof(RB_Assist.Post_Id), model.Post_Id);
fileds.Add(nameof(RB_Assist.AssistIntro), model.AssistIntro);
fileds.Add(nameof(RB_Assist.Teacher_Id), model.Teacher_Id);
fileds.Add(nameof(RB_Assist.School_Id), model.School_Id);
}
else
{
fileds.Add(nameof(RB_Assist.IDCard), model.IDCard);
fileds.Add(nameof(RB_Assist.Sex),model.Sex);
fileds.Add(nameof(RB_Assist.EntryTime),model.EntryTime);
fileds.Add(nameof(RB_Assist.Address),model.Address);
fileds.Add(nameof(RB_Assist.BirthDate),model.BirthDate);
fileds.Add(nameof(RB_Assist.LeaveStatus),model.LeaveStatus);
fileds.Add(nameof(RB_Assist.LeaveTime),model.LeaveTime);
fileds.Add(nameof(RB_Assist.Education),model.Education);
}
string logContent = ""; string logContent = "";
if (model.AssistName != oldModel.AssistName) if (model.AssistName != oldModel.AssistName)
{ {
......
...@@ -470,9 +470,11 @@ namespace Edu.Module.User ...@@ -470,9 +470,11 @@ namespace Edu.Module.User
}); });
extModel.ChoosePostList = new List<int>(); extModel.ChoosePostList = new List<int>();
if (deptPostList != null && deptPostList.Count > 0) if (deptPostList != null && deptPostList.Count > 0)
{ {
foreach (var item in deptPostList)
{
extModel.ChoosePostList.Add(item.PostId);
}
} }
extModel.DeptPostList = deptPostList; extModel.DeptPostList = deptPostList;
} }
......
...@@ -47,6 +47,16 @@ namespace Edu.Module.User ...@@ -47,6 +47,16 @@ namespace Edu.Module.User
return postRepository.GetPostListRepository(query); return postRepository.GetPostListRepository(query);
} }
/// <summary>
/// 根据部门编号获取岗位列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Post_ViewModel> GetDeptPostListModule(RB_Post_ViewModel query)
{
return postRepository.GetDeptPostListRepository(query);
}
/// <summary> /// <summary>
/// 新增修改岗位 /// 新增修改岗位
/// </summary> /// </summary>
......
...@@ -110,8 +110,6 @@ namespace Edu.Module.User ...@@ -110,8 +110,6 @@ namespace Edu.Module.User
{nameof(RB_Teacher_ViewModel.UpdateBy),model.UpdateBy }, {nameof(RB_Teacher_ViewModel.UpdateBy),model.UpdateBy },
{nameof(RB_Teacher_ViewModel.UpdateTime),model.UpdateTime }, {nameof(RB_Teacher_ViewModel.UpdateTime),model.UpdateTime },
{nameof(RB_Teacher_ViewModel.School_Id),model.School_Id }, {nameof(RB_Teacher_ViewModel.School_Id),model.School_Id },
//{nameof(RB_Teacher_ViewModel.Dept_Id),model.Dept_Id },
// {nameof(RB_Teacher_ViewModel.Post_Id),model.Post_Id },
}; };
if (isUpdateBasic) if (isUpdateBasic)
{ {
...@@ -121,6 +119,8 @@ namespace Edu.Module.User ...@@ -121,6 +119,8 @@ namespace Edu.Module.User
fileds.Add(nameof(RB_Teacher_ViewModel.IsShow), model.IsShow); fileds.Add(nameof(RB_Teacher_ViewModel.IsShow), model.IsShow);
fileds.Add(nameof(RB_Teacher_ViewModel.TeacherIntro), model.TeacherIntro); fileds.Add(nameof(RB_Teacher_ViewModel.TeacherIntro), model.TeacherIntro);
fileds.Add(nameof(RB_Teacher_ViewModel.TeacherSay), model.TeacherSay); fileds.Add(nameof(RB_Teacher_ViewModel.TeacherSay), model.TeacherSay);
fileds.Add(nameof(RB_Teacher_ViewModel.Dept_Id), model.Dept_Id);
fileds.Add(nameof(RB_Teacher_ViewModel.Post_Id), model.Post_Id);
} }
else else
{ {
......
...@@ -99,5 +99,29 @@ WHERE 1=1 ...@@ -99,5 +99,29 @@ WHERE 1=1
return new List<RB_Post_ViewModel>(); return new List<RB_Post_ViewModel>();
} }
} }
/// <summary>
/// 根据部门编号获取岗位列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Post_ViewModel> GetDeptPostListRepository(RB_Post_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT B.PostId,B.PostName
FROM rb_department_post AS A INNER JOIN rb_post AS B ON A.PostId=B.PostId
WHERE 1=1
");
if (query != null)
{
if (!string.IsNullOrEmpty(query.QDeptIds))
{
builder.AppendFormat(@" AND A.Dept_Id IN({0}) ", query.QDeptIds);
}
}
return Get<RB_Post_ViewModel>(builder.ToString()).ToList();
}
} }
} }
\ No newline at end of file
...@@ -346,7 +346,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -346,7 +346,7 @@ namespace Edu.WebApi.Controllers.User
extModel.UpdateTime = DateTime.Now; extModel.UpdateTime = DateTime.Now;
extModel.AuditStatus = Common.Enum.User.AccountStatusEnum.Normal; extModel.AuditStatus = Common.Enum.User.AccountStatusEnum.Normal;
extModel.Group_Id = base.UserInfo.Group_Id; extModel.Group_Id = base.UserInfo.Group_Id;
bool flag = teacherModule.SetTeacherModule(extModel); bool flag = teacherModule.SetTeacherModule(extModel, isUpdateBasic: true);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
...@@ -458,7 +458,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -458,7 +458,7 @@ namespace Edu.WebApi.Controllers.User
extModel.UpdateTime = DateTime.Now; extModel.UpdateTime = DateTime.Now;
extModel.Group_Id = base.UserInfo.Group_Id; extModel.Group_Id = base.UserInfo.Group_Id;
extModel.AuditStatus = Common.Enum.User.AccountStatusEnum.Normal; extModel.AuditStatus = Common.Enum.User.AccountStatusEnum.Normal;
bool flag = assistModule.SetAssistModule(extModel); bool flag = assistModule.SetAssistModule(extModel,isUpdateBasic:true);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
...@@ -1223,6 +1223,22 @@ namespace Edu.WebApi.Controllers.User ...@@ -1223,6 +1223,22 @@ namespace Edu.WebApi.Controllers.User
} }
/// <summary>
/// 根据部门编号获取岗位列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public ApiResult GetDeptPostList()
{
var query = new RB_Post_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
QDeptIds=base.ParmJObj.GetStringValue("QDeptIds")
};
var list = postModule.GetDeptPostListModule(query);
return ApiResult.Success(data: list);
}
/// <summary> /// <summary>
/// 添加修改岗位 /// 添加修改岗位
/// </summary> /// </summary>
......
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