| | |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelDto.LogDto; |
| | | using SqlSugar; |
| | |
| | | } |
| | | |
| | | |
| | | public List<TaskDto> GetTaskList(List<string> orderType, string type, string status, string taskNo, int isSuccess, string palletNo, string msg, int page, int limit, out int count) |
| | | public async Task<List<TaskDto>> GetTaskList(List<string> orderType, string type, string status, string taskNo, int isSuccess, string palletNo, string msg, int page, int limit, RefAsync<int> count) |
| | | { |
| | | try |
| | | { |
| | |
| | | .AndIF(!string.IsNullOrWhiteSpace(palletNo), it => it.PalletNo.Contains(palletNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(msg), it => it.Msg.Contains(msg.Trim())) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var data = GetAllWhereAsync(item) |
| | | var data = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysUserInfor>((a,b)=>a.CreateUser == b.Id). |
| | | Select((a,b) => new TaskDto() |
| | | { |
| | |
| | | CreateTime = a.CreateTime |
| | | }) |
| | | .OrderByDescending(a => a.TaskNo) |
| | | .ToOffsetPage(page,limit,ref total); |
| | | count = total; |
| | | .ToPageListAsync(page,limit, count); |
| | | |
| | | return data.OrderByDescending(m=>m.TaskNo).ToList(); |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |