From fee0c169e006442850206ddaf4eef2e057f92894 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 9 Aug 2022 09:36:14 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=AD=A3=E9=A1=AF=E7=A4=BA?= =?UTF-8?q?=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/PCBController.cs | 9 +++++++-- AMESCoreStudio.Web/Controllers/PCSController.cs | 2 +- AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs | 2 +- AMESCoreStudio.Web/Views/PCB/PCB013V.cshtml | 3 ++- .../Controllers/AMES/BarcodeInfoesController.cs | 4 ++-- .../Controllers/AMES/BarcodeItemsController.cs | 2 +- .../Controllers/AMES/SteelPlateMeasureController.cs | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/PCBController.cs b/AMESCoreStudio.Web/Controllers/PCBController.cs index a8f6ec78..67269de2 100644 --- a/AMESCoreStudio.Web/Controllers/PCBController.cs +++ b/AMESCoreStudio.Web/Controllers/PCBController.cs @@ -169,7 +169,7 @@ namespace AMESCoreStudio.Web.Controllers if (result.Success) { - var _msg = model.SteelPlateID == 0 ? "新增成功!" : "修改成功!"; + var _msg = "新增量測記錄成功!"; return RedirectToAction("Refresh", "Home", new { msg = _msg }); } else @@ -186,7 +186,12 @@ namespace AMESCoreStudio.Web.Controllers return View("PCB013A", model); } - + /// + /// 鋼板量測紀錄 View + /// + /// + /// + /// [HttpGet] public IActionResult PCB013V(int steelPlateID, string steelPlateNo) { diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 7026e723..d9b37f10 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -5662,7 +5662,7 @@ namespace AMESCoreStudio.Web.Controllers /// public async Task PCS022QueryAsync(string wipNo, string productNo, string unit, string type, int lineID = 0, int page = 0, int limit = 10) { - IResultModel result = await _pcsApi.GetBarcodeItemByPCS022Query(wipNo: wipNo, + IResultModel result = await _pcsApi.GetBarcodeInfoesByPCS022Query(wipNo: wipNo, itemNo: productNo, unit: unit, lineID, page: page, limit: limit); if (result.Data.Count() != 0) diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs index 01628b17..55b0a7e0 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs @@ -336,7 +336,7 @@ namespace AMESCoreStudio.Web /// 筆數 /// [WebApiClient.Attributes.HttpGet("api/BarcodeInfoes/BarcodeInfoByPCS022")] - ITask> GetBarcodeItemByPCS022Query(string wipNo = null, string itemNo = null, + ITask> GetBarcodeInfoesByPCS022Query(string wipNo = null, string itemNo = null, string unit = null, int lineID = 0, int page = 0, int limit = 10); #endregion diff --git a/AMESCoreStudio.Web/Views/PCB/PCB013V.cshtml b/AMESCoreStudio.Web/Views/PCB/PCB013V.cshtml index 691bf7e4..031a9440 100644 --- a/AMESCoreStudio.Web/Views/PCB/PCB013V.cshtml +++ b/AMESCoreStudio.Web/Views/PCB/PCB013V.cshtml @@ -59,13 +59,14 @@ sort: true }, { - field: 'userName', + field: 'createUserName', title: '量測人員', sort: true }, { field: 'createDate', title: '量測時間', + width: 140, sort: true, templet: '
{{ layui.util.toDateString(d.createDate, "yyyy/MM/dd HH:mm:ss") }}
' }] diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeInfoesController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeInfoesController.cs index 6e0b932c..2b3738f0 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeInfoesController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeInfoesController.cs @@ -236,7 +236,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES // 查詢工單號碼 if (!string.IsNullOrWhiteSpace(wipNo)) { - var wipID = _context.WipInfos.Where(w => w.WipNO == wipNo.Trim().ToUpper()).Select(s => s.WipID).ToList(); + var wipID = _context.WipInfos.Where(w => w.WipNO == wipNo.Trim().ToUpper() && w.StatusNO != "E").Select(s => s.WipID).ToList(); barcodeInfos = await _context.BarcodeInfoes.Where(w => wipID.Contains(w.WipID)).ToListAsync(); } // 查詢料號 @@ -247,7 +247,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES barcodeInfos = await _context.BarcodeInfoes.Where(w => wipID.Contains(w.WipID)).ToListAsync(); } - var q = from q1 in barcodeInfos + var q = from q1 in barcodeInfos.Where(w => w.RuleStatus != "S" && w.GetRuleStation.StationID != 1000) join q2 in _context.RuleStations on q1.RuleStationID equals q2.RuleStationID join q3 in _context.WipInfos on q1.WipID equals q3.WipID join q4 in _context.LineInfoes on q3.LineID equals q4.LineID diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs index fa0d110e..a3393729 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/BarcodeItemsController.cs @@ -340,7 +340,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES // 查詢組件代碼 if (!string.IsNullOrWhiteSpace(KPItemNo)) { - q = q.Where(w => w.KpItemNo == KPItemNo).ToList(); + q = q.Where(w => w.ItemNo == KPItemNo).ToList(); } diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/SteelPlateMeasureController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/SteelPlateMeasureController.cs index 6119399c..e3f7d9cf 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/SteelPlateMeasureController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/SteelPlateMeasureController.cs @@ -88,7 +88,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES q = q.Skip((page - 1) * limit).Take(limit); } - result.Data = await q.OrderBy(o => o.CreateDate).ToListAsync(); + result.Data = await q.OrderByDescending(o => o.CreateDate).ToListAsync(); result.Data.Select(s => s.Status = Enum.EnumPCB.GetDisplayName((Enum.EnumPCB.EnumSteelPlateStatus)System.Enum.Parse(typeof(Enum.EnumPCB.EnumSteelPlateStatus), s.Status))).ToList(); if (result == null)