diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipStationController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipStationController.cs index ab63563e..f1ddc121 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/WipStationController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipStationController.cs @@ -936,6 +936,31 @@ FROM JHAMES.WIP_STATION"; return result.FirstOrDefault(); } + /// + /// 基本查詢過站資料 + /// + /// 工單ID + /// 流程ID + /// + [HttpGet("QueryList")] + public async Task> GetWipStations(int wipID, int stationID) + { + IQueryable q = _context.WipStations; + ResultModel result = new ResultModel(); + + if (wipID != 0) + q = q.Where(w => w.WipID == wipID); + if (stationID != 0) + q = q.Where(w => w.StationID == stationID); + result.DataTotal = q.ToList().Count; + + result.Data = await q.ToListAsync(); + + return result; + } + + + /// /// 更新工單各站數量 ///