/// <summary> /// 任务派工主表列表接口 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <PagedResultDto <VW_ICMODispBill_By_Date> > GetDailyGroup( VW_ICMODispBill_By_DateGetAllInput input) { var query = VRepository.GetAll(); var count = await query.CountAsync(); var data = await query.OrderBy(p => p.日期).PageBy(input).ToListAsync(); return(new PagedResultDto <VW_ICMODispBill_By_Date>(count, data)); }
/// <summary> /// 任务派工界面列表接口 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <PagedResultDto <VW_ICMODailyDto> > GetAll(ICMODailyGetAllInput input) { var query = VRepository.GetAll(); var count = await query.CountAsync(); query = string.IsNullOrEmpty(input.Sorting) ? query.OrderBy(p => p.日期).PageBy(input) : query.OrderBy(input.Sorting).PageBy(input); var data = await query.ToListAsync(); var list = data.MapTo <List <VW_ICMODailyDto> >(); return(new PagedResultDto <VW_ICMODailyDto>(count, list)); }
//public IRepository<ICMOSchedule, string> SRepository { get; set; } /// <summary> /// 任务派工界面数据 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <PagedResultDto <ICMODispBillListDto> > GetAll(ICMODispBillGetAllInput input) { var query = VRepository.GetAll() .Where(p => p.FMOBillNo == input.FMOBillNo && p.FMOInterID == input.FMOInterID); query = input.FDate == null?query: query.Where(p => p.日期 == input.FDate); var count = await query.CountAsync(); try { var data = await query.ToListAsync(); var list = data.MapTo(new List <ICMODispBillListDto>()); return(new PagedResultDto <ICMODispBillListDto>(count, list)); } catch (Exception e) { Console.WriteLine(e); throw; } }