Commit d84201ad authored by 黄奎's avatar 黄奎

页面修改

parent b6e6fba3
...@@ -4785,107 +4785,80 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time ...@@ -4785,107 +4785,80 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time
/// <returns></returns> /// <returns></returns>
public object GetOKRMyEmployeeList(UserInfo userInfo) public object GetOKRMyEmployeeList(UserInfo userInfo)
{ {
var deptModel = departmentRepository.GetEntity(userInfo.DeptId); try
List<int> UserIdList = new List<int>();
List<int> ParentIdList = new List<int>();
#region 我的直属上级
List<Model.ViewModel.User.RB_Department_ViewModel> sjdlist = new List<Model.ViewModel.User.RB_Department_ViewModel>();
bool sjdlistSelect = false;
List<Model.ViewModel.User.Employee_ViewModel> ZSList = new List<Model.ViewModel.User.Employee_ViewModel>();
var accountModel = accountRepository.GetEntity(userInfo.Id);
if (accountModel.DirectSupervisor > 0)
{
var directModel = accountRepository.GetEmployeeInfo(accountModel.DirectSupervisor);
ZSList.Add(new Model.ViewModel.User.Employee_ViewModel
{
Id = directModel.Id,
EmployeeName = directModel.EmployeeName,
UserIcon = directModel.UserIcon,
Dept_Id = directModel.Dept_Id
});
UserIdList.Add(directModel.Id);
ParentIdList.Add(directModel.Id);
}
else
{ {
//根据部门查询 var deptModel = departmentRepository.GetEntity(userInfo.DeptId);
string ManagerIds = ""; List<int> UserIdList = new List<int>();
sjdlist = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, ManagerIds = userInfo.Id.ToString() }); List<int> ParentIdList = new List<int>();
sjdlistSelect = true; #region 我的直属上级
if (sjdlist.Any()) List<Model.ViewModel.User.RB_Department_ViewModel> sjdlist = new List<Model.ViewModel.User.RB_Department_ViewModel>();
bool sjdlistSelect = false;
List<Model.ViewModel.User.Employee_ViewModel> ZSList = new List<Model.ViewModel.User.Employee_ViewModel>();
var accountModel = accountRepository.GetEntity(userInfo.Id);
if (accountModel.DirectSupervisor > 0)
{ {
//说明是部门主管 var directModel = accountRepository.GetEmployeeInfo(accountModel.DirectSupervisor);
foreach (var ditem in sjdlist.Where(x => x.ParentId > 0)) ZSList.Add(new Model.ViewModel.User.Employee_ViewModel
{ {
var deptpModel = departmentRepository.GetEntity(ditem.ParentId); Id = directModel.Id,
if (!string.IsNullOrEmpty(deptpModel?.ManagerIds ?? "")) EmployeeName = directModel.EmployeeName,
UserIcon = directModel.UserIcon,
Dept_Id = directModel.Dept_Id
});
UserIdList.Add(directModel.Id);
ParentIdList.Add(directModel.Id);
}
else
{
//根据部门查询
string ManagerIds = "";
sjdlist = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, ManagerIds = userInfo.Id.ToString() });
sjdlistSelect = true;
if (sjdlist.Any())
{
//说明是部门主管
foreach (var ditem in sjdlist.Where(x => x.ParentId > 0))
{ {
ManagerIds += (deptpModel?.ManagerIds ?? "") + ","; var deptpModel = departmentRepository.GetEntity(ditem.ParentId);
if (!string.IsNullOrEmpty(deptpModel?.ManagerIds ?? ""))
{
ManagerIds += (deptpModel?.ManagerIds ?? "") + ",";
}
}
if (!string.IsNullOrEmpty(ManagerIds))
{
ManagerIds = ManagerIds[0..^1];
} }
} }
if (!string.IsNullOrEmpty(ManagerIds)) else
{ {
ManagerIds = ManagerIds[0..^1]; ManagerIds = deptModel.ManagerIds;
} }
}
else
{
ManagerIds = deptModel.ManagerIds;
}
if (!string.IsNullOrEmpty(ManagerIds)) if (!string.IsNullOrEmpty(ManagerIds))
{
var list = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { QIds = ManagerIds, IsLeave = 1 });
foreach (var item in list)
{ {
ZSList.Add(new Model.ViewModel.User.Employee_ViewModel() var list = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { QIds = ManagerIds, IsLeave = 1 });
foreach (var item in list)
{ {
Id = item.Id, ZSList.Add(new Model.ViewModel.User.Employee_ViewModel()
EmployeeName = item.EmployeeName, {
UserIcon = item.UserIcon, Id = item.Id,
Dept_Id = item.Dept_Id EmployeeName = item.EmployeeName,
}); UserIcon = item.UserIcon,
UserIdList.Add(item.Id); Dept_Id = item.Dept_Id
ParentIdList.Add(item.Id); });
UserIdList.Add(item.Id);
ParentIdList.Add(item.Id);
}
} }
} }
} #endregion
#endregion #region 我的直属下级
#region 我的直属下级 List<Model.ViewModel.User.Employee_ViewModel> ChildList = new List<Model.ViewModel.User.Employee_ViewModel>();
List<Model.ViewModel.User.Employee_ViewModel> ChildList = new List<Model.ViewModel.User.Employee_ViewModel>(); var emList = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, DirectSupervisor = userInfo.Id });
var emList = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, DirectSupervisor = userInfo.Id }); if (emList.Any())
if (emList.Any())
{
foreach (var item in emList)
{
ChildList.Add(new Model.ViewModel.User.Employee_ViewModel()
{
Id = item.Id,
EmployeeName = item.EmployeeName,
UserIcon = item.UserIcon
});
UserIdList.Add(item.Id);
}
}
//如果是部门主管 需要将部门下除自己其他人加入
//查询部门负责人 负责的所有部门
var xjdlist = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, ManagerIds = userInfo.Id.ToString() });
if (xjdlist.Any())
{
//查询该部门下所有人 (需排除所有的部门负责人)
var em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, QDeptIds = string.Join(",", xjdlist.Select(x => x.DeptId)) });
em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系
if (em1List.Any())
{ {
//查询全部负责人 foreach (var item in emList)
string AllManagerIds = departmentRepository.GetAllDepartmentManagerIds(userInfo.Group_Id);
List<int> AllDeptManageId = new List<int>();
if (!string.IsNullOrEmpty(AllManagerIds))
{
AllDeptManageId = JsonHelper.DeserializeObject<List<int>>("[" + AllManagerIds + "]");
}
//对 em1List 排除负责人
foreach (var item in em1List.Where(x => !AllDeptManageId.Contains(x.Id)))
{ {
ChildList.Add(new Model.ViewModel.User.Employee_ViewModel() ChildList.Add(new Model.ViewModel.User.Employee_ViewModel()
{ {
...@@ -4896,52 +4869,63 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time ...@@ -4896,52 +4869,63 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time
UserIdList.Add(item.Id); UserIdList.Add(item.Id);
} }
} }
//如果是部门主管 需要将部门下除自己其他人加入
//上级部门下所有子部门的负责人 //查询部门负责人 负责的所有部门
var d2list = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, QParentIds = string.Join(",", xjdlist.Select(x => x.DeptId)) }); var xjdlist = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, ManagerIds = userInfo.Id.ToString() });
string ManagerIds = string.Join(",", d2list.Where(x => !string.IsNullOrEmpty(x.ManagerIds)).Select(x => x.ManagerIds)); if (xjdlist.Any())
if (!string.IsNullOrEmpty(ManagerIds))
{ {
em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, QIds = ManagerIds }); //查询该部门下所有人 (需排除所有的部门负责人)
em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.Id != userInfo.Id && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系 var em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, QDeptIds = string.Join(",", xjdlist.Select(x => x.DeptId)) });
foreach (var item in em1List) em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系
if (em1List.Any())
{ {
ChildList.Add(new Model.ViewModel.User.Employee_ViewModel() //查询全部负责人
string AllManagerIds = departmentRepository.GetAllDepartmentManagerIds(userInfo.Group_Id);
List<int> AllDeptManageId = new List<int>();
if (!string.IsNullOrEmpty(AllManagerIds))
{ {
Id = item.Id, AllDeptManageId = JsonHelper.DeserializeObject<List<int>>("[" + AllManagerIds + "]");
EmployeeName = item.EmployeeName, }
UserIcon = item.UserIcon //对 em1List 排除负责人
}); foreach (var item in em1List.Where(x => !AllDeptManageId.Contains(x.Id)))
UserIdList.Add(item.Id); {
ChildList.Add(new Model.ViewModel.User.Employee_ViewModel()
{
Id = item.Id,
EmployeeName = item.EmployeeName,
UserIcon = item.UserIcon
});
UserIdList.Add(item.Id);
}
} }
}
} //上级部门下所有子部门的负责人
#endregion var d2list = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, QParentIds = string.Join(",", xjdlist.Select(x => x.DeptId)) });
#region 我的同级 string ManagerIds = string.Join(",", d2list.Where(x => !string.IsNullOrEmpty(x.ManagerIds)).Select(x => x.ManagerIds));
List<Model.ViewModel.User.Employee_ViewModel> SiblingList = new List<Model.ViewModel.User.Employee_ViewModel>(); if (!string.IsNullOrEmpty(ManagerIds))
if (ParentIdList.Any())
{
var em2List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, DirectSupervisorIds = string.Join(",", ParentIdList) });
em2List = em2List.Where(x => x.Id != userInfo.Id && !UserIdList.Contains(x.Id)).ToList();
foreach (var item in em2List)
{
SiblingList.Add(new Model.ViewModel.User.Employee_ViewModel()
{ {
Id = item.Id, em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, QIds = ManagerIds });
EmployeeName = item.EmployeeName, em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.Id != userInfo.Id && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系
UserIcon = item.UserIcon foreach (var item in em1List)
}); {
UserIdList.Add(item.Id); ChildList.Add(new Model.ViewModel.User.Employee_ViewModel()
{
Id = item.Id,
EmployeeName = item.EmployeeName,
UserIcon = item.UserIcon
});
UserIdList.Add(item.Id);
}
}
} }
#endregion
//查询部门负责人 负责的所1有部门 #region 我的同级
var dlist = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, ManagerIds = string.Join(",", ParentIdList) }); List<Model.ViewModel.User.Employee_ViewModel> SiblingList = new List<Model.ViewModel.User.Employee_ViewModel>();
if (dlist.Any()) if (ParentIdList.Any())
{ {
//上级所在部门下 所有的普通成员 var em2List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, DirectSupervisorIds = string.Join(",", ParentIdList) });
var em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, QDeptIds = string.Join(",", dlist.Select(x => x.DeptId)) }); em2List = em2List.Where(x => x.Id != userInfo.Id && !UserIdList.Contains(x.Id)).ToList();
em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.Id != userInfo.Id && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系 foreach (var item in em2List)
foreach (var item in em1List)
{ {
SiblingList.Add(new Model.ViewModel.User.Employee_ViewModel() SiblingList.Add(new Model.ViewModel.User.Employee_ViewModel()
{ {
...@@ -4952,12 +4936,12 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time ...@@ -4952,12 +4936,12 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time
UserIdList.Add(item.Id); UserIdList.Add(item.Id);
} }
//上级部门下所有子部门的负责人 //查询部门负责人 负责的所1有部门
var d2list = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, QParentIds = string.Join(",", ZSList.Select(x => x.Dept_Id)) }); var dlist = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, ManagerIds = string.Join(",", ParentIdList) });
string ManagerIds = string.Join(",", d2list.Where(x => !string.IsNullOrEmpty(x.ManagerIds)).Select(x => x.ManagerIds)); if (dlist.Any())
if (!string.IsNullOrEmpty(ManagerIds))
{ {
em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, QIds = ManagerIds }); //上级所在部门下 所有的普通成员
var em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, QDeptIds = string.Join(",", dlist.Select(x => x.DeptId)) });
em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.Id != userInfo.Id && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系 em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.Id != userInfo.Id && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系
foreach (var item in em1List) foreach (var item in em1List)
{ {
...@@ -4969,23 +4953,61 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time ...@@ -4969,23 +4953,61 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time
}); });
UserIdList.Add(item.Id); UserIdList.Add(item.Id);
} }
//上级部门下所有子部门的负责人
var d2list = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, QParentIds = string.Join(",", ZSList.Select(x => x.Dept_Id)) });
string ManagerIds = string.Join(",", d2list.Where(x => !string.IsNullOrEmpty(x.ManagerIds)).Select(x => x.ManagerIds));
if (!string.IsNullOrEmpty(ManagerIds))
{
em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, QIds = ManagerIds });
em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.Id != userInfo.Id && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系
foreach (var item in em1List)
{
SiblingList.Add(new Model.ViewModel.User.Employee_ViewModel()
{
Id = item.Id,
EmployeeName = item.EmployeeName,
UserIcon = item.UserIcon
});
UserIdList.Add(item.Id);
}
}
} }
} }
} else
else
{
if (sjdlistSelect == false)
{ {
sjdlist = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, ManagerIds = userInfo.Id.ToString() }); if (sjdlistSelect == false)
{
sjdlist = departmentRepository.GetDepartmentListRepository(new Model.ViewModel.User.RB_Department_ViewModel() { Group_Id = userInfo.Group_Id, ManagerIds = userInfo.Id.ToString() });
}
//继续查询同部门的 也算同级
if (!sjdlist.Any())
{
var em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, Dept_Id = userInfo.DeptId });
em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.Id != userInfo.Id && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系
foreach (var item in em1List)
{
SiblingList.Add(new Model.ViewModel.User.Employee_ViewModel()
{
Id = item.Id,
EmployeeName = item.EmployeeName,
UserIcon = item.UserIcon
});
UserIdList.Add(item.Id);
}
}
} }
//继续查询同部门的 也算同级 #endregion
if (!sjdlist.Any()) #region 我的关注
List<Model.ViewModel.User.Employee_ViewModel> AttentionList = new List<Model.ViewModel.User.Employee_ViewModel>();
var alist = oKR_AttentionRepository.GetList(new RB_OKR_Attention_ViewModel() { Group_Id = userInfo.Group_Id, AccountId = userInfo.Id });
if (alist.Any())
{ {
var em1List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = userInfo.Group_Id, IsLeave = 1, Dept_Id = userInfo.DeptId }); string aids = string.Join(",", alist.Select(x => x.AttentionId));
em1List = em1List.Where(x => !UserIdList.Contains(x.Id) && x.Id != userInfo.Id && x.DirectSupervisor == 0).ToList();//排序 已存在的直接关系 var em3List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { QIds = aids, IsLeave = 1 });
foreach (var item in em1List) foreach (var item in em3List)
{ {
SiblingList.Add(new Model.ViewModel.User.Employee_ViewModel() AttentionList.Add(new Model.ViewModel.User.Employee_ViewModel()
{ {
Id = item.Id, Id = item.Id,
EmployeeName = item.EmployeeName, EmployeeName = item.EmployeeName,
...@@ -4994,80 +5016,66 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time ...@@ -4994,80 +5016,66 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value:yyyy-MM-dd}' and {ruleModel.Time
UserIdList.Add(item.Id); UserIdList.Add(item.Id);
} }
} }
} #endregion
#endregion //还差了个 是否有最新消息返回------------------------------------------------------
#region 我的关注 if (UserIdList.Any())
List<Model.ViewModel.User.Employee_ViewModel> AttentionList = new List<Model.ViewModel.User.Employee_ViewModel>();
var alist = oKR_AttentionRepository.GetList(new RB_OKR_Attention_ViewModel() { Group_Id = userInfo.Group_Id, AccountId = userInfo.Id });
if (alist.Any())
{
string aids = string.Join(",", alist.Select(x => x.AttentionId));
var em3List = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { QIds = aids, IsLeave = 1 });
foreach (var item in em3List)
{ {
AttentionList.Add(new Model.ViewModel.User.Employee_ViewModel() var list = oKR_UpdateNotificationRepository.GetList(new RB_OKR_UpdateNotification_ViewModel() { ReceiveId = userInfo.Id, UpdateByIds = string.Join(",", UserIdList), State = 2 });
var UserUpdateList = list.Select(x => x.UpdateBy).ToList();
ZSList.Where(x => UserUpdateList.Contains(x.Id)).ToList().ForEach(x =>
{ {
Id = item.Id, x.IsBirth = 1;
EmployeeName = item.EmployeeName, });
UserIcon = item.UserIcon ChildList.Where(x => UserUpdateList.Contains(x.Id)).ToList().ForEach(x =>
{
x.IsBirth = 1;
});
SiblingList.Where(x => UserUpdateList.Contains(x.Id)).ToList().ForEach(x =>
{
x.IsBirth = 1;
});
AttentionList.Where(x => UserUpdateList.Contains(x.Id)).ToList().ForEach(x =>
{
x.IsBirth = 1;
}); });
UserIdList.Add(item.Id);
} }
} return new
#endregion
//还差了个 是否有最新消息返回------------------------------------------------------
if (UserIdList.Any())
{
var list = oKR_UpdateNotificationRepository.GetList(new RB_OKR_UpdateNotification_ViewModel() { ReceiveId = userInfo.Id, UpdateByIds = string.Join(",", UserIdList), State = 2 });
var UserUpdateList = list.Select(x => x.UpdateBy).ToList();
ZSList.Where(x => UserUpdateList.Contains(x.Id)).ToList().ForEach(x =>
{
x.IsBirth = 1;
});
ChildList.Where(x => UserUpdateList.Contains(x.Id)).ToList().ForEach(x =>
{
x.IsBirth = 1;
});
SiblingList.Where(x => UserUpdateList.Contains(x.Id)).ToList().ForEach(x =>
{
x.IsBirth = 1;
});
AttentionList.Where(x => UserUpdateList.Contains(x.Id)).ToList().ForEach(x =>
{ {
x.IsBirth = 1; ParentList = ZSList.Select(x => new
}); {
x.Id,
x.EmployeeName,
x.UserIcon,
IsHaveUpdate = x.IsBirth
}),
ChildList = ChildList.Select(x => new
{
x.Id,
x.EmployeeName,
x.UserIcon,
IsHaveUpdate = x.IsBirth
}),
SiblingList = SiblingList.Select(x => new
{
x.Id,
x.EmployeeName,
x.UserIcon,
IsHaveUpdate = x.IsBirth
}),
AttentionList = AttentionList.Select(x => new
{
x.Id,
x.EmployeeName,
x.UserIcon,
IsHaveUpdate = x.IsBirth
})
};
} }
return new catch (Exception ex)
{ {
ParentList = ZSList.Select(x => new Common.Plugin.LogHelper.Write(ex, "GetOKRMyEmployeeList:userInfo" + Common.Plugin.JsonHelper.Serialize(userInfo));
{ }
x.Id, return new object();
x.EmployeeName,
x.UserIcon,
IsHaveUpdate = x.IsBirth
}),
ChildList = ChildList.Select(x => new
{
x.Id,
x.EmployeeName,
x.UserIcon,
IsHaveUpdate = x.IsBirth
}),
SiblingList = SiblingList.Select(x => new
{
x.Id,
x.EmployeeName,
x.UserIcon,
IsHaveUpdate = x.IsBirth
}),
AttentionList = AttentionList.Select(x => new
{
x.Id,
x.EmployeeName,
x.UserIcon,
IsHaveUpdate = x.IsBirth
})
};
} }
/// <summary> /// <summary>
......
...@@ -563,7 +563,12 @@ namespace Edu.WebApi.Controllers.Course ...@@ -563,7 +563,12 @@ namespace Edu.WebApi.Controllers.Course
[HttpPost] [HttpPost]
public ApiResult BatchRemoveChapter() public ApiResult BatchRemoveChapter()
{ {
var extModel = Common.Plugin.JsonHelper.DeserializeObject<RB_Course_Chapter_ViewModel>(RequestParm.Msg.ToString()); var extModel = new RB_Course_Chapter_ViewModel()
{
CourseId=base.ParmJObj.GetInt("CourseId"),
ChapterNo=base.ParmJObj.GetStringValue("ChapterNo"),
ChapterId=base.ParmJObj.GetInt("ChapterId"),
};
bool flag = courseModule.BatchRemoveChapterModule(extModel); bool flag = courseModule.BatchRemoveChapterModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
......
...@@ -1349,7 +1349,7 @@ namespace Edu.WebApi.Controllers.Finance ...@@ -1349,7 +1349,7 @@ namespace Edu.WebApi.Controllers.Finance
} }
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.Write(ex, "OutToExcelOrderStudentClassHoursList"); LogHelper.Write(ex, "OutToExcelOrderStudentClassHoursList:" + Common.Plugin.JsonHelper.Serialize(dmodel));
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist); var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", ExcelName); return File(byteData1, "application/octet-stream", ExcelName);
} }
...@@ -1545,7 +1545,7 @@ namespace Edu.WebApi.Controllers.Finance ...@@ -1545,7 +1545,7 @@ namespace Edu.WebApi.Controllers.Finance
} }
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.Write(ex, "OutToExcelOrderStudentClassHoursList"); LogHelper.Write(ex, "OutToExcelOrderStudentClassHoursList:" + string.Format("TeacherId:{0},SchoolId:{1},StartMonth:{2},EndMonth:{3},Group_Id:{4}", TeacherId, SchoolId, StartMonth, EndMonth, userInfo.Group_Id));
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist); var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", ExcelName); return File(byteData1, "application/octet-stream", ExcelName);
} }
......
...@@ -1014,7 +1014,6 @@ namespace Edu.WebApi.Controllers.OKR ...@@ -1014,7 +1014,6 @@ namespace Edu.WebApi.Controllers.OKR
public ApiResult GetOKRMyEmployeeList() public ApiResult GetOKRMyEmployeeList()
{ {
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
var obj = okrPeriodModule.GetOKRMyEmployeeList(userInfo); var obj = okrPeriodModule.GetOKRMyEmployeeList(userInfo);
return ApiResult.Success("", obj); return ApiResult.Success("", 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