From 06aad85f9232d29afc9fe4c6326757ebe39a3580 Mon Sep 17 00:00:00 2001 From: ray Date: Tue, 19 Apr 2022 17:47:53 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=AD=A3=E9=81=8E=E7=AB=99Key=20?= =?UTF-8?q?Parts=E6=B2=92=E8=B3=87=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/PCSController.cs | 14 +++++++------- .../ViewModels/PCS/PCS021ViewModel.cs | 2 +- AMESCoreStudio.Web/Views/PCS/PCS021.cshtml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 9e6009de..3954e986 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -3468,7 +3468,7 @@ namespace AMESCoreStudio.Web.Controllers { model.MaterialStationsItems = await _pcsApi.GetMaterialStationsItemByItemID(model.MaterialItem.ItemID); - model.MaterialStationsItems = model.MaterialStationsItems.Where(w => w.RuleStationID == model.RuleStation).ToList(); + model.MaterialStationsItems = model.MaterialStationsItems.Where(w => w.RuleStationID == model.RuleStation).OrderBy(o => o.StationsItemSeq).ToList(); if (model.MaterialStationsItems.Count() == 0) { ModelState.AddModelError("error", "找不到該站別作業工項"); @@ -3538,7 +3538,7 @@ namespace AMESCoreStudio.Web.Controllers } #endregion - var Kp = model.Inputs.Where(w => !w.Input.Contains("$")).ToList(); // 撈非不良代碼 = 組件序號 + var Kp = model.Inputs.Where(w => !w.Contains("$")).ToList(); // 撈非不良代碼 = 組件序號 var q = await _pcsApi.GetBarCodeFromWip(model.Input); // 判斷是否用內部序號有對應到工單號碼,沒對應到視為組件或不良代碼 if (q.Success) @@ -3569,7 +3569,7 @@ namespace AMESCoreStudio.Web.Controllers model.StationSEQ = RuleStations.Where(w => w.StationID == model.Station).Select(s => s.Sequence).FirstOrDefault(); } // 判斷是否有$符號,代表有不良代碼 - if (model.Inputs.Where(w => w.Input.Contains("$")).Any()) + if (model.Inputs.Where(w => w.Contains("$")).Any()) { model.BarcodeNG = true; // 判斷是否為投入站,投入站不能刷不良 @@ -3618,12 +3618,12 @@ namespace AMESCoreStudio.Web.Controllers } keyParts.Add(new BarCodeCheckDto.inputItem { - inputType = KeyPartItem.Input.Contains("$") ? "NG" : model.WipKps[i + KpItemQty].KpNo, - inputData = KeyPartItem.Input, - oldInputData = KeyPartItem.InputNo + inputType = KeyPartItem.Contains("$") ? "NG" : model.WipKps[i + KpItemQty].KpNo, + inputData = KeyPartItem, + //oldInputData = KeyPartItem.InputNo }); - if (!KeyPartItem.Input.Contains("$")) + if (!KeyPartItem.Contains("$")) i += 1; } diff --git a/AMESCoreStudio.Web/ViewModels/PCS/PCS021ViewModel.cs b/AMESCoreStudio.Web/ViewModels/PCS/PCS021ViewModel.cs index 5f719866..7f4cb8e3 100644 --- a/AMESCoreStudio.Web/ViewModels/PCS/PCS021ViewModel.cs +++ b/AMESCoreStudio.Web/ViewModels/PCS/PCS021ViewModel.cs @@ -109,7 +109,7 @@ namespace AMESCoreStudio.Web.ViewModels.PCS /// inputs /// - public List Inputs { get; set; } = new List(); + public List Inputs { get; set; } = new List(); /// /// 料號相關資料 diff --git a/AMESCoreStudio.Web/Views/PCS/PCS021.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS021.cshtml index 16859072..3b60dca5 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS021.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS021.cshtml @@ -222,7 +222,7 @@ - +