| | |
| | | |
| | | using WCS.Application.Service.WcsTaskMonitor.Dto; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Page")] |
| | | [DisplayName("分页查询任务明细监控表")] |
| | | public async Task<SqlSugarPagedList<WcsTaskMonitorOutput>> Page(PageWcsTaskMonitorInput input) |
| | | public async Task<SqlSugarPagedList<WcsTaskMonitorOutput2>> Page(PageWcsTaskMonitorInput input) |
| | | { |
| | | input.SearchKey = input.SearchKey?.Trim(); |
| | | var query = _wcsTaskMonitorRep.AsQueryable() |
| | |
| | | u.TaskNo.Contains(input.SearchKey) |
| | | ) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.TaskNo), u => u.TaskNo.Contains(input.TaskNo.Trim())) |
| | | .Select<WcsTaskMonitorOutput>(); |
| | | return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); |
| | | .LeftJoin<WcsDevice>((u, plcid) => u.PlcId == plcid.Id) |
| | | .Select((u, plcid) => new WcsTaskMonitorOutput2 |
| | | { |
| | | Id = u.Id, |
| | | TaskNo = u.TaskNo, |
| | | PlcName = plcid.StationNum + "工位," + plcid.Text, |
| | | InteractiveMsg = u.InteractiveMsg, |
| | | CreateTime = u.CreateTime |
| | | }) |
| | | .OrderByDescending(u=>u.CreateTime); |
| | | return await query.OrderBuilder(input,"","").ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |