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 @@ - +