Commit a97122ca authored by 黄奎's avatar 黄奎

页面修改

parent 0bf269eb
...@@ -44,6 +44,11 @@ namespace Edu.WebApi.Controllers.User ...@@ -44,6 +44,11 @@ namespace Edu.WebApi.Controllers.User
/// </summary> /// </summary>
public readonly AttendanceRecodModule attendRecodeModule = new AttendanceRecodModule(); public readonly AttendanceRecodModule attendRecodeModule = new AttendanceRecodModule();
/// <summary>
/// 部门处理类对象
/// </summary>
private readonly DepartmentModule departmentModule = new DepartmentModule();
#region 字典管理 #region 字典管理
/// <summary> /// <summary>
...@@ -314,22 +319,75 @@ namespace Edu.WebApi.Controllers.User ...@@ -314,22 +319,75 @@ namespace Edu.WebApi.Controllers.User
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
query.DeptId = base.UserInfo.DeptId; query.DeptId = base.UserInfo.DeptId;
var list = noticeModule.GetMyNoticePageList(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query); var list = noticeModule.GetMyNoticePageList(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
pageModel.Count = rowsCount; List<object> result = new List<object>();
pageModel.PageData = list.Select(x => new foreach (var item in list)
{ {
x.Id, var fileList = new List<FileModel>();
x.From, if (!string.IsNullOrEmpty(item.File))
x.Number, {
x.Title, try
x.NoticeState, {
NoticeStateName = x.NoticeState.ToName(), fileList= Common.Plugin.JsonHelper.DeserializeObject<List<FileModel>>(item.File);
x.Is_Top, }
x.ReadNum, catch (Exception ex)
x.UpdateBy, {
UpdateByName = UserReidsCache.GetUserLoginInfo(x.UpdateBy)?.AccountName ?? "", Common.Plugin.LogHelper.Write(ex, "GetMyNoticePageList_Item");
UpdateTime = x.UpdateTime.HasValue ? x.UpdateTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "", }
UpdateTimeStr = Common.ConvertHelper.FormatDate(x.UpdateTime) }
}); List<string> ccList = new List<string>();
if (!string.IsNullOrEmpty(item.CopyPeople))
{
var peopleList = Common.ConvertHelper.StringToList(item.CopyPeople);
foreach (var sItem in peopleList)
{
string aName = UserReidsCache.GetUserLoginInfo(sItem)?.AccountName ?? "";
if (!string.IsNullOrEmpty(aName))
{
ccList.Add(aName);
}
}
}
List<string> toList = new List<string>();
if (!string.IsNullOrEmpty(item.To))
{
var deptList = Common.ConvertHelper.StringToList(item.To);
if (deptList != null && deptList.Count > 0)
{
var departMentList = departmentModule.GetDepartmentListModule(new RB_Department_ViewModel() { QDeptIds = string.Join(",", deptList) });
foreach (var dItem in departMentList)
{
toList.Add(dItem.DeptName);
}
}
}
if (toList != null && toList.Count == 0)
{
toList.Add("全公司");
}
var obj = new
{
item.Id,
item.From,
item.Number,
item.Title,
item.NoticeState,
NoticeStateName = item.NoticeState.ToName(),
item.Is_Top,
item.ReadNum,
item.UpdateBy,
UpdateByName = UserReidsCache.GetUserLoginInfo(item.UpdateBy)?.AccountName ?? "",
UpdateTime =Common.ConvertHelper.FormatDate2(item.UpdateTime),
UpdateTimeStr = Common.ConvertHelper.FormatDate(item.UpdateTime),
item.Content,
fileList,
ccList,
toList
};
result.Add(obj);
}
pageModel.Count = rowsCount;
pageModel.PageData = result;
return ApiResult.Success("", pageModel); return ApiResult.Success("", pageModel);
} }
......
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