From 853786042ac3f3191814d44be12a3e4beb5f0f0a Mon Sep 17 00:00:00 2001 From: Marvin Date: Fri, 21 Feb 2025 14:11:55 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9BarcodeItem=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=99=A8=EF=BC=8C=E5=A2=9E=E5=8A=A0GetBarcodeItem4Dat?= =?UTF-8?q?aCarrierNew?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AMES/BarcodeItemsController.cs | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs index 07af748..548a0ed 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs @@ -147,6 +147,48 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES return result; } + /// + /// 查詢結轉條碼組件資料 + /// + /// + [Route("[action]")] + [HttpGet] + public async Task> GetBarcodeItem4DataCarrierNew(int barcodeID, int wipID) + { + ResultModel result = new ResultModel(); + var q = from q1 in _context.BarcodeItems + select new + { + q1.BarcodeID, + q1.WipID, + q1.ItemNo, + q1.PartNo, + q1.KpItemNo, + KpDateTime = q1.CreateDate.ToString("yyyyMMddHHmmss") + }; + + q = q.Where(w => w.BarcodeID.Equals(barcodeID)); + + q = q.Where(w => w.WipID.Equals(wipID)); + + + //紀錄筆數 + result.DataTotal = q.Count(); + + result.Data = await q.ToListAsync(); + + if (result == null) + { + result.Msg = "查無資料"; + result.Success = false; + return result; + } + + result.Success = true; + result.Msg = "OK"; + return result; + } + /// /// 查詢結轉條碼組件資料 ///