From 87ede2b8314b8b1f9b7cdbe1fee778220d51d296 Mon Sep 17 00:00:00 2001 From: Yiru Date: Wed, 13 Mar 2024 16:17:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0wipStation=E6=9F=A5=E8=A9=A2(?= =?UTF-8?q?AP=E8=87=AA=E9=81=B8=E6=92=88=E7=94=9F=E7=94=A2=E6=97=A5?= =?UTF-8?q?=E4=BD=BF=E7=94=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AMES/WipStationController.cs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) 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; + } + + + /// /// 更新工單各站數量 ///