public object GetUnApplicationList(GetApplicationListDto getApplicationListDto) { var worker = _ctx.Worker.SingleOrDefault(w => w.Account.Equals(getApplicationListDto.Account)); var list = (from apply in _ctx.Apply join deparment in _ctx.Deparment on apply.DeparmentId equals deparment.Id where apply.WorkerId == worker.Id && !apply.IsSubmit && apply.Account.Contains(getApplicationListDto.Query) select new { id = apply.Id, workerName = worker.Name, deparment = deparment.Name, type = _approvalService.GetApplicationType(apply.Type1, apply.Type2), startTime = apply.StartTime, endTime = apply.EndTime, createTime = _commonServer.ChangeTime(apply.CreateTime), }).ToList(); var result = new object(); result = new { count = list.Count(), data = list.Skip((getApplicationListDto.CurrentPage - 1) * getApplicationListDto.CurrentPageSize).Take(getApplicationListDto.CurrentPageSize), }; return(result); }
public async Task <object> GetApplicationList([FromBody] GetApplicationListDto getApplicationListDto) { var context = HttpContext; getApplicationListDto.Account = await _jwtUtil.GetMessageByToken(context); return(_approvalAppService.GetApplicationList(getApplicationListDto)); }
public object GetUnApplicationList(GetApplicationListDto getApplicationListDto) { return(_approvalManager.GetUnApplicationList(getApplicationListDto)); }