Commit 55b4efb4 authored by 黄奎's avatar 黄奎

页面修改

parent 4d875969
...@@ -567,7 +567,7 @@ namespace Edu.Module.Course ...@@ -567,7 +567,7 @@ namespace Edu.Module.Course
item.PlanTimeList = timeList?.Where(qitem => qitem.ClassPlanId == item.ClassPlanId)?.ToList(); item.PlanTimeList = timeList?.Where(qitem => qitem.ClassPlanId == item.ClassPlanId)?.ToList();
list.Add(new list.Add(new
{ {
IsEndDate = item.ClassDate <= today ? true : false, IsEndDate = item.ClassDate <= today,
item.ClassPlanId, item.ClassPlanId,
item.ClassId, item.ClassId,
item.ClassDate, item.ClassDate,
...@@ -780,9 +780,8 @@ namespace Edu.Module.Course ...@@ -780,9 +780,8 @@ namespace Edu.Module.Course
[TransactionCallHandler] [TransactionCallHandler]
public bool AddClassStudentDropOutModule(RB_Order_Guest_ViewModel model, string CreateName) public bool AddClassStudentDropOutModule(RB_Order_Guest_ViewModel model, string CreateName)
{ {
bool flag = false;
//写日志 //写日志
flag = order_GuestRepository.Insert(model) > 0; bool flag = order_GuestRepository.Insert(model) > 0;
if (flag) if (flag)
{ {
//更新学生的状态 //更新学生的状态
...@@ -808,14 +807,11 @@ namespace Edu.Module.Course ...@@ -808,14 +807,11 @@ namespace Edu.Module.Course
[TransactionCallHandler] [TransactionCallHandler]
public bool AddClassCheckModule(List<RB_Class_Check_ViewModel> list) public bool AddClassCheckModule(List<RB_Class_Check_ViewModel> list)
{ {
bool flag = false;
//写日志 //写日志
flag = classCheckRepository.InsertBatch(list); bool flag = classCheckRepository.InsertBatch(list);
return flag; return flag;
} }
/// <summary> /// <summary>
/// 获取班级上课记录 /// 获取班级上课记录
/// </summary> /// </summary>
......
...@@ -149,7 +149,7 @@ namespace Edu.Module.System ...@@ -149,7 +149,7 @@ namespace Edu.Module.System
/// <returns></returns> /// <returns></returns>
public List<MenuTree_ViewModel> GetTreeMenuModule(RB_Menu_ViewModel query, int roleId = 0) public List<MenuTree_ViewModel> GetTreeMenuModule(RB_Menu_ViewModel query, int roleId = 0)
{ {
List<RB_Menu_ViewModel> list = new List<RB_Menu_ViewModel>(); List<RB_Menu_ViewModel> list;
if (roleId <= 0) if (roleId <= 0)
{ {
list = GetMenuListModule(query); list = GetMenuListModule(query);
......
...@@ -119,6 +119,10 @@ namespace Edu.Module.User ...@@ -119,6 +119,10 @@ namespace Edu.Module.User
} }
else else
{ {
if (model.LeaveStatus != LeaveStatusEnum.Departure)
{
model.LeaveTime = null;
}
fileds.Add(nameof(RB_Assist.IDCard), model.IDCard); fileds.Add(nameof(RB_Assist.IDCard), model.IDCard);
fileds.Add(nameof(RB_Assist.Sex),model.Sex); fileds.Add(nameof(RB_Assist.Sex),model.Sex);
fileds.Add(nameof(RB_Assist.EntryTime),model.EntryTime); fileds.Add(nameof(RB_Assist.EntryTime),model.EntryTime);
...@@ -203,7 +207,7 @@ namespace Edu.Module.User ...@@ -203,7 +207,7 @@ namespace Edu.Module.User
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param> /// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns> /// <returns></returns>
public bool SetAssistDeptModule(RB_Assist model, bool isUpdateBasic = false) public bool SetAssistDeptModule(RB_Assist model)
{ {
bool flag; bool flag;
if (model.AId > 0) if (model.AId > 0)
...@@ -211,21 +215,16 @@ namespace Edu.Module.User ...@@ -211,21 +215,16 @@ 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.UpdateBy),model.UpdateBy }, {nameof(RB_Assist.UpdateBy),model.UpdateBy },
{nameof(RB_Assist.UpdateTime),model.UpdateTime }, {nameof(RB_Assist.UpdateTime),model.UpdateTime },
{nameof(RB_Assist.Dept_Id),model.Dept_Id }, {nameof(RB_Assist.Dept_Id),model.Dept_Id },
// {nameof(RB_Assist.Post_Id),model.Post_Id },
}; };
string logContent = ""; string logContent = "";
if (model.Dept_Id != oldModel.Dept_Id) if (model.Dept_Id != oldModel.Dept_Id)
{ {
var deptList = departmentRepository.GetDepartmentListRepository(new RB_Department_ViewModel() { QDeptIds = model.Dept_Id + "," + oldModel.Dept_Id }); var deptList = departmentRepository.GetDepartmentListRepository(new RB_Department_ViewModel() { QDeptIds = model.Dept_Id + "," + oldModel.Dept_Id });
logContent += string.Format(",将部门由【{0}】修改为【{1}】。", (deptList.Where(qitem => qitem.DeptId == oldModel.Dept_Id)?.FirstOrDefault()?.DeptName ?? ""), (deptList.Where(qitem => qitem.DeptId == model.Dept_Id)?.FirstOrDefault()?.DeptName ?? "")); logContent += string.Format(",将部门由【{0}】修改为【{1}】。", (deptList.Where(qitem => qitem.DeptId == oldModel.Dept_Id)?.FirstOrDefault()?.DeptName ?? ""), (deptList.Where(qitem => qitem.DeptId == model.Dept_Id)?.FirstOrDefault()?.DeptName ?? ""));
} }
if (!string.IsNullOrEmpty(logContent)) if (!string.IsNullOrEmpty(logContent))
{ {
//新增日志 //新增日志
...@@ -249,7 +248,7 @@ namespace Edu.Module.User ...@@ -249,7 +248,7 @@ namespace Edu.Module.User
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param> /// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns> /// <returns></returns>
public bool SetAssistPostModule(RB_Assist model, bool isUpdateBasic = false) public bool SetAssistPostModule(RB_Assist model)
{ {
bool flag; bool flag;
if (model.AId > 0) if (model.AId > 0)
...@@ -261,15 +260,12 @@ namespace Edu.Module.User ...@@ -261,15 +260,12 @@ namespace Edu.Module.User
{nameof(RB_Assist.UpdateTime),model.UpdateTime }, {nameof(RB_Assist.UpdateTime),model.UpdateTime },
{nameof(RB_Assist.Post_Id),model.Post_Id }, {nameof(RB_Assist.Post_Id),model.Post_Id },
}; };
string logContent = ""; string logContent = "";
if (model.Post_Id != oldModel.Post_Id) if (model.Post_Id != oldModel.Post_Id)
{ {
var postList = postRepository.GetPostListRepository(new RB_Post_ViewModel() { QPostIds = model.Post_Id + "," + oldModel.Post_Id }); var postList = postRepository.GetPostListRepository(new RB_Post_ViewModel() { QPostIds = model.Post_Id + "," + oldModel.Post_Id });
logContent += string.Format(",将岗位由【{0}】修改为【{1}】。", (postList.Where(qitem => qitem.PostId == oldModel.Post_Id)?.FirstOrDefault()?.PostName ?? ""), (postList.Where(qitem => qitem.PostId == model.Post_Id)?.FirstOrDefault()?.PostName ?? "")); logContent += string.Format(",将岗位由【{0}】修改为【{1}】。", (postList.Where(qitem => qitem.PostId == oldModel.Post_Id)?.FirstOrDefault()?.PostName ?? ""), (postList.Where(qitem => qitem.PostId == model.Post_Id)?.FirstOrDefault()?.PostName ?? ""));
} }
if (!string.IsNullOrEmpty(logContent)) if (!string.IsNullOrEmpty(logContent))
{ {
//新增日志 //新增日志
...@@ -291,9 +287,8 @@ namespace Edu.Module.User ...@@ -291,9 +287,8 @@ namespace Edu.Module.User
/// 添加修改助教离职时间 /// 添加修改助教离职时间
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns> /// <returns></returns>
public bool SetAssistLeaveTimeModule(RB_Assist model, bool isUpdateBasic = false) public bool SetAssistLeaveTimeModule(RB_Assist model)
{ {
bool flag; bool flag;
if (model.AId > 0) if (model.AId > 0)
...@@ -307,9 +302,7 @@ namespace Edu.Module.User ...@@ -307,9 +302,7 @@ namespace Edu.Module.User
{nameof(RB_Assist.UpdateTime),model.UpdateTime }, {nameof(RB_Assist.UpdateTime),model.UpdateTime },
}; };
string logContent = ""; string logContent = "";
if (model.LeaveStatus != oldModel.LeaveStatus) if (model.LeaveStatus != oldModel.LeaveStatus)
{ {
logContent += string.Format(",将在职状态由【{0}】修改为【{1}】。", oldModel.LeaveStatus.ToName(), model.LeaveStatus.ToName()); logContent += string.Format(",将在职状态由【{0}】修改为【{1}】。", oldModel.LeaveStatus.ToName(), model.LeaveStatus.ToName());
...@@ -318,7 +311,6 @@ namespace Edu.Module.User ...@@ -318,7 +311,6 @@ namespace Edu.Module.User
{ {
logContent += string.Format(",将离职时间由【{0}】修改为【{1}】。", oldModel?.LeaveTime, model.LeaveTime); logContent += string.Format(",将离职时间由【{0}】修改为【{1}】。", oldModel?.LeaveTime, model.LeaveTime);
} }
if (!string.IsNullOrEmpty(logContent)) if (!string.IsNullOrEmpty(logContent))
{ {
//新增日志 //新增日志
......
...@@ -125,6 +125,10 @@ namespace Edu.Module.User ...@@ -125,6 +125,10 @@ namespace Edu.Module.User
} }
else else
{ {
if (model.LeaveStatus != LeaveStatusEnum.Departure)
{
model.LeaveTime = null;
}
fileds.Add(nameof(RB_Teacher_ViewModel.IDCard), model.IDCard); fileds.Add(nameof(RB_Teacher_ViewModel.IDCard), model.IDCard);
fileds.Add(nameof(RB_Teacher_ViewModel.Sex), model.Sex); fileds.Add(nameof(RB_Teacher_ViewModel.Sex), model.Sex);
fileds.Add(nameof(RB_Teacher_ViewModel.EntryTime), model.EntryTime); fileds.Add(nameof(RB_Teacher_ViewModel.EntryTime), model.EntryTime);
...@@ -201,9 +205,8 @@ namespace Edu.Module.User ...@@ -201,9 +205,8 @@ namespace Edu.Module.User
/// 新增修改讲师 /// 新增修改讲师
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns> /// <returns></returns>
public bool SetTeacherDeptModule(RB_Teacher_ViewModel model, bool isUpdateBasic = false) public bool SetTeacherDeptModule(RB_Teacher_ViewModel model)
{ {
bool flag; bool flag;
if (model.TId > 0) if (model.TId > 0)
...@@ -211,7 +214,6 @@ namespace Edu.Module.User ...@@ -211,7 +214,6 @@ namespace Edu.Module.User
var oldModel = GetTeacherModule(model.TId); var oldModel = GetTeacherModule(model.TId);
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{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.Dept_Id),model.Dept_Id }, {nameof(RB_Teacher_ViewModel.Dept_Id),model.Dept_Id },
...@@ -223,7 +225,6 @@ namespace Edu.Module.User ...@@ -223,7 +225,6 @@ namespace Edu.Module.User
var deptList = departmentRepository.GetDepartmentListRepository(new RB_Department_ViewModel() { QDeptIds = model.Dept_Id + "," + oldModel.Dept_Id }); var deptList = departmentRepository.GetDepartmentListRepository(new RB_Department_ViewModel() { QDeptIds = model.Dept_Id + "," + oldModel.Dept_Id });
logContent += string.Format(",将部门由【{0}】修改为【{1}】。", (deptList.Where(qitem => qitem.DeptId == oldModel.Dept_Id)?.FirstOrDefault()?.DeptName ?? ""), (deptList.Where(qitem => qitem.DeptId == model.Dept_Id)?.FirstOrDefault()?.DeptName ?? "")); logContent += string.Format(",将部门由【{0}】修改为【{1}】。", (deptList.Where(qitem => qitem.DeptId == oldModel.Dept_Id)?.FirstOrDefault()?.DeptName ?? ""), (deptList.Where(qitem => qitem.DeptId == model.Dept_Id)?.FirstOrDefault()?.DeptName ?? ""));
} }
if (!string.IsNullOrEmpty(logContent)) if (!string.IsNullOrEmpty(logContent))
{ {
//新增日志 //新增日志
...@@ -245,9 +246,8 @@ namespace Edu.Module.User ...@@ -245,9 +246,8 @@ namespace Edu.Module.User
/// 新增修改讲师 /// 新增修改讲师
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns> /// <returns></returns>
public bool SetTeacherPostModule(RB_Teacher_ViewModel model, bool isUpdateBasic = false) public bool SetTeacherPostModule(RB_Teacher_ViewModel model)
{ {
bool flag; bool flag;
if (model.TId > 0) if (model.TId > 0)
...@@ -255,20 +255,16 @@ namespace Edu.Module.User ...@@ -255,20 +255,16 @@ namespace Edu.Module.User
var oldModel = GetTeacherModule(model.TId); var oldModel = GetTeacherModule(model.TId);
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{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.Post_Id),model.Post_Id }, {nameof(RB_Teacher_ViewModel.Post_Id),model.Post_Id },
}; };
string logContent = ""; string logContent = "";
if (model.Post_Id != oldModel.Post_Id) if (model.Post_Id != oldModel.Post_Id)
{ {
var postList = postRepository.GetPostListRepository(new RB_Post_ViewModel() { QPostIds = model.Post_Id + "," + oldModel.Post_Id }); var postList = postRepository.GetPostListRepository(new RB_Post_ViewModel() { QPostIds = model.Post_Id + "," + oldModel.Post_Id });
logContent += string.Format(",将岗位由【{0}】修改为【{1}】。", (postList.Where(qitem => qitem.PostId == oldModel.Post_Id)?.FirstOrDefault()?.PostName ?? ""), (postList.Where(qitem => qitem.PostId == model.Post_Id)?.FirstOrDefault()?.PostName ?? "")); logContent += string.Format(",将岗位由【{0}】修改为【{1}】。", (postList.Where(qitem => qitem.PostId == oldModel.Post_Id)?.FirstOrDefault()?.PostName ?? ""), (postList.Where(qitem => qitem.PostId == model.Post_Id)?.FirstOrDefault()?.PostName ?? ""));
} }
if (!string.IsNullOrEmpty(logContent)) if (!string.IsNullOrEmpty(logContent))
{ {
//新增日志 //新增日志
...@@ -290,9 +286,8 @@ namespace Edu.Module.User ...@@ -290,9 +286,8 @@ namespace Edu.Module.User
/// 新增修改讲师 /// 新增修改讲师
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="isUpdateBasic">是否更新基础资料</param>
/// <returns></returns> /// <returns></returns>
public bool SetTeacherLeaveTimeModule(RB_Teacher_ViewModel model, bool isUpdateBasic = false) public bool SetTeacherLeaveTimeModule(RB_Teacher_ViewModel model)
{ {
bool flag; bool flag;
if (model.TId > 0) if (model.TId > 0)
...@@ -300,13 +295,11 @@ namespace Edu.Module.User ...@@ -300,13 +295,11 @@ namespace Edu.Module.User
var oldModel = GetTeacherModule(model.TId); var oldModel = GetTeacherModule(model.TId);
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{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.LeaveStatus),model.LeaveStatus }, {nameof(RB_Teacher_ViewModel.LeaveStatus),model.LeaveStatus },
{nameof(RB_Teacher_ViewModel.LeaveTime),model.LeaveTime } {nameof(RB_Teacher_ViewModel.LeaveTime),model.LeaveTime }
}; };
string logContent = ""; string logContent = "";
if (model.LeaveStatus != oldModel.LeaveStatus) if (model.LeaveStatus != oldModel.LeaveStatus)
{ {
......
...@@ -215,10 +215,6 @@ FROM ...@@ -215,10 +215,6 @@ FROM
{ {
where.AppendFormat(" AND A.{0}='{1}' ", nameof(Employee_ViewModel.Account), query.Account.Trim()); where.AppendFormat(" AND A.{0}='{1}' ", nameof(Employee_ViewModel.Account), query.Account.Trim());
} }
//if (query.Id > 0)
//{
// where.AppendFormat(" AND A.{0}={1} ", nameof(Employee_ViewModel.Id), query.Id);
//}
if (!string.IsNullOrEmpty(query.QIds)) if (!string.IsNullOrEmpty(query.QIds))
{ {
where.AppendFormat(" AND A.{0} IN({1}) ", nameof(Employee_ViewModel.Id), query.QIds); where.AppendFormat(" AND A.{0} IN({1}) ", nameof(Employee_ViewModel.Id), query.QIds);
...@@ -270,11 +266,11 @@ FROM ...@@ -270,11 +266,11 @@ FROM
} }
if (!string.IsNullOrEmpty(query.StartLeaveTime)) if (!string.IsNullOrEmpty(query.StartLeaveTime))
{ {
where.AppendFormat(" AND b.{0}>='{1}' ", nameof(Employee_ViewModel.LeaveTime), query.StartLeaveTime); where.AppendFormat(" AND B.LeaveStatus=4 AND b.{0}>='{1}' ", nameof(Employee_ViewModel.LeaveTime), query.StartLeaveTime);
} }
if (!string.IsNullOrEmpty(query.EndLeaveTime)) if (!string.IsNullOrEmpty(query.EndLeaveTime))
{ {
where.AppendFormat(" AND b.{0}<='{1} 23:59:59' ", nameof(Employee_ViewModel.LeaveTime), query.EndLeaveTime); where.AppendFormat(" AND B.LeaveStatus=4 AND b.{0}<='{1} 23:59:59' ", nameof(Employee_ViewModel.LeaveTime), query.EndLeaveTime);
} }
if (!string.IsNullOrEmpty(query.StartBirthDate)) if (!string.IsNullOrEmpty(query.StartBirthDate))
{ {
......
...@@ -437,7 +437,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -437,7 +437,7 @@ namespace Edu.WebApi.Controllers.Course
return ApiResult.Failed("班级信息不存在"); return ApiResult.Failed("班级信息不存在");
} }
bool result = classModule.UpdateClassStudentDropOutModule(ids, dropOutRemark, classId, base.UserInfo.Id, classModel.Group_Id, classModel.School_Id, studentName); bool result = classModule.UpdateClassStudentDropOutModule(ids, dropOutRemark, classId, base.UserInfo.Id, classModel.Group_Id, classModel.School_Id, studentName);
return ApiResult.Success(); return result ? ApiResult.Success() : ApiResult.Failed();
} }
...@@ -460,7 +460,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -460,7 +460,7 @@ namespace Edu.WebApi.Controllers.Course
model.CreateTime = System.DateTime.Now; model.CreateTime = System.DateTime.Now;
model.UpdateTime = model.CreateTime; model.UpdateTime = model.CreateTime;
bool result = classModule.AddClassStudentDropOutModule(model, base.UserInfo.AccountName); bool result = classModule.AddClassStudentDropOutModule(model, base.UserInfo.AccountName);
return ApiResult.Success(); return result? ApiResult.Success():ApiResult.Failed();
} }
/// <summary> /// <summary>
/// 获取教室页列表 /// 获取教室页列表
......
...@@ -671,7 +671,6 @@ namespace Edu.WebApi.Controllers.User ...@@ -671,7 +671,6 @@ namespace Edu.WebApi.Controllers.User
pageModel.PageData = list.Select((qitem, i) => new pageModel.PageData = list.Select((qitem, i) => new
{ {
Id = (pageModel.PageSize * (pageModel.PageIndex - 1)) + i + 1, Id = (pageModel.PageSize * (pageModel.PageIndex - 1)) + i + 1,
// qitem.Id,
qitem.UserIcon, qitem.UserIcon,
qitem.EmployeeName, qitem.EmployeeName,
qitem.SchoolName, qitem.SchoolName,
......
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