| | |
| | | using DTO; |
| | | using DTO.Models; |
| | | using IServices; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | 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); |
| | | } |
| | | |
| | | ///WfNeeddeels |
| | |
| | | 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 WfNeeddeelDTO |
| | | { |
| | |
| | | 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<WfNeeddeelDTO> GetList() |
| | | public List<WfNeeddeelDTO> GetList(string RunProcessId = "", string step = "") |
| | | { |
| | | |
| | | |
| | | var listRole = _context.WfNeeddeels.AsNoTracking().Where(r => r.RecStatus == "A").ToList(); |
| | | |
| | | if (!string.IsNullOrEmpty(RunProcessId) && !string.IsNullOrEmpty(step)) |
| | | { |
| | | listRole = listRole.Where(x => x.RunProcessId == RunProcessId && x.Step == step).ToList(); |
| | | } |
| | | |
| | | var list = _mapper.Map<List<WfNeeddeelDTO>>(listRole); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取所有有效流程类型 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<WfNeeddeelDTO> GetListTracking(string RunProcessId = "", string step = "") |
| | | { |
| | | |
| | | |
| | | var listRole = _context.WfNeeddeels.Where(r => r.RecStatus == "A").ToList(); |
| | | |
| | | if (!string.IsNullOrEmpty(RunProcessId) && !string.IsNullOrEmpty(step)) |
| | | { |
| | | listRole = listRole.Where(x => x.RunProcessId == RunProcessId && x.Step == step).ToList(); |
| | | } |
| | | |
| | | var list = _mapper.Map<List<WfNeeddeelDTO>>(listRole); |
| | | return list; |
| | | } |