Beispiel #1
0
 public List <PlanDto> GetAllPlan(int year, int month, Guid?sysDepartId, int pageSize, int pageIndex, bool asc)
 {
     using (var planDao = new PlanDao())
     {
         return(planDao.JoinProject(year, month, sysDepartId).Result
                .Select(m => new PlanDto()
         {
             Id = m.Id,
             NodeNumber = m.NodeNumber,
             NextNodeNumber = m.FlowNode.NextNodeNumber,
             PlanId = m.Plan.Id,
             ProjectId = m.Plan.ProjectId,
             ProjectName = m.Plan.Project.ProjectName,
             StatusName = m.StatusName,
             SysDepartId = m.Plan.SysDepartId,
             SysDepartName = m.Plan.SysDepart.DepartName,
             SysDepartOwnerId = m.Plan.Project.SysDepartId,
             SysDepartOwnerName = m.Plan.Project.SysDepart.DepartName,
             UpdateTime = m.UpdateTime,
             CreateTime = m.CreateTime
         })
                .OrderByDescending(m => m.CreateTime)
                .ThenBy(m => m.SysDepartId)
                .ToList());
     }
 }