| | |
| | | public async Task<List<WcsDeviceTaskOrderDto>> WcsPackStationPlcList([FromQuery] WcsDeviceBaseInput entry) |
| | | { |
| | | return await _wcsDeviceRep.Context.Queryable<WcsDevice>() |
| | | .LeftJoin<WcsCheckTask>((device, task) => device.StationNum == task.Port) |
| | | .Where((device, task) => device.PlcId == entry.PlcId) |
| | | .OrderBy((device, task) => device.CreateTime) |
| | | .Select((device, task) => new WcsDeviceTaskOrderDto() |
| | | .InnerJoin<WcsPlc>((device, plc) => device.PlcId == plc.Id) |
| | | .LeftJoin<WcsCheckTask>((device, plc, task) => device.StationNum == task.Port) |
| | | .Where((device, plc, task) => device.PlcId == entry.PlcId) |
| | | .OrderBy((device, plc, task) => device.CreateTime) |
| | | .Select((device, plc, task) => new WcsDeviceTaskOrderDto() |
| | | { |
| | | Id = device.Id, |
| | | Text = device.Text, |
| | |
| | | LineNo = task.LineNo, |
| | | Status = task.Status, |
| | | PZNo = task.PZNo, |
| | | Qty = task.Qty |
| | | Qty = task.Qty, |
| | | |
| | | Type = plc.Type |
| | | }) |
| | | .ToListAsync(); |
| | | } |