| | |
| | | string[] Applytimes = searchEntity.Applytime.Split("|"); |
| | | DateTime.TryParse(Applytimes[0], out Applytimestart); |
| | | DateTime.TryParse(Applytimes[1], out Applytimeend); |
| | | //Applytimeend = Applytimeend.AddDays(1); |
| | | Applytimeend = Applytimeend.AddDays(1); |
| | | } |
| | | |
| | | ///WfHistories |
| | |
| | | from fff in fsssss.DefaultIfEmpty() |
| | | |
| | | join d in _context.WfApplytypes |
| | | on k.Applytiye equals d.Id |
| | | on k.Applytiye equals d.Applyno |
| | | |
| | | join b in _context.PltUsers |
| | | on k.Creater equals b.Id |
| | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.RunProcessId) || a.RunProcessId == searchEntity.RunProcessId.Trim()) |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Applyno) || k.Applyno == searchEntity.Applyno.Trim()) |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Creater) || a.DeelUserId == searchEntity.Creater.Trim()) |
| | | |
| | | select new WfHistoryDTO |
| | | { |
| | |
| | | NeeddeelTypeName = fff.Comments, |
| | | Contentyijian = a.Content, |
| | | Sort = a.Sort, |
| | | |
| | | Deelurl = a.Deelurl, |
| | | Creater = a.Creater, |
| | | Createtime = a.Createtime, |
| | | |
| | | Step = a.Step, |
| | | RecStatus = a.RecStatus, |
| | | Modifier = a.Modifier, |
| | | Modifytime = a.Modifytime, |
| | | |
| | | } |
| | | ).OrderBy(x => x.Sort).ThenByDescending(x=>x.Resivetime).ToList(); |
| | | ).OrderByDescending(x=>x.Applyno).ThenBy(x => x.Sort).ThenByDescending(x=>x.Resivetime).ToList(); |
| | | |
| | | |
| | | |
| | | if (searchEntity.totalrows == 0) |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | data.LoadData(searchEntity, lianlist); |
| | |
| | | /// 获取所有有效流程类型 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<WfHistoryDTO> GetList() |
| | | public List<WfHistoryDTO> GetList(string RunProcessId = "") |
| | | { |
| | | |
| | | |
| | | var listRole = _context.WfHistories.Where(r => r.RecStatus == "A").ToList(); |
| | | var listRole = _context.WfHistories.Where(r => r.RecStatus == "A").OrderBy(x=>x.Sort).ToList(); |
| | | if (!string.IsNullOrEmpty(RunProcessId)) |
| | | { |
| | | listRole = listRole.Where(x => x.RunProcessId == RunProcessId).ToList(); |
| | | } |
| | | |
| | | var list = _mapper.Map<List<WfHistoryDTO>>(listRole); |
| | | return list; |
| | | } |
| | | /// <summary> |
| | | /// 查询历史审批意见 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<WfHistoryDTO> GetListshenpi(string RunProcessId) |
| | | { |
| | | |
| | | |
| | | var listRole = (from a in _context.WfHistories.Where(x => x.RecStatus == "A" && x.NeeddeelType =="1" && x.ChuliStatus != "0" && x.RunProcessId == RunProcessId) |
| | | |
| | | join b in _context.PltUsers |
| | | on a.DeelUserId equals b.Id |
| | | |
| | | |
| | | select new WfHistoryDTO |
| | | { |
| | | RunProcessId = a.RunProcessId, |
| | | SendUserId = a.SendUserId, |
| | | DeelUserId = a.DeelUserId, |
| | | Sendtime = a.Sendtime, |
| | | Resivetime = a.Resivetime, |
| | | Step = a.Step, |
| | | ChuliStatus = a.ChuliStatus, |
| | | Deelurl = a.Deelurl, |
| | | NeeddeelType = a.NeeddeelType, |
| | | Sort = a.Sort, |
| | | Content = a.Content, |
| | | |
| | | |
| | | RecStatus = a.RecStatus, |
| | | Creater = a.Creater, |
| | | Createtime = a.Createtime, |
| | | Modifier = a.Modifier, |
| | | Modifytime = a.Modifytime, |
| | | ChuliStatusName = a.Step == "提交"? "提交" : a.ChuliStatus == "2" ? "同意" : "拒绝", |
| | | DeelUserIdName = b.UserName, |
| | | ModifytimeName = a.Modifytime.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | } |
| | | ).OrderBy(x => x.Modifytime).ToList(); |
| | | |
| | | |
| | | |
| | | // _context.WfHistories.Where(r => r.RecStatus == "A").OrderBy(x => x.Sort).ToList(); |
| | | //if (!string.IsNullOrEmpty(RunProcessId)) |
| | | //{ |
| | | // listRole = listRole.Where(x => x.RunProcessId == RunProcessId).ToList(); |
| | | //} |
| | | |
| | | |
| | | |
| | | |
| | | return listRole; |
| | | } |
| | | |
| | | } |
| | | } |