From e5bc5ebf9b32982532a7365e5ea3dd447a7562d7 Mon Sep 17 00:00:00 2001 From: Marvin Date: Thu, 14 Mar 2024 10:37:25 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=BB=B4=E4=BF=AE=E8=B5=84?= =?UTF-8?q?=E6=96=99=E8=BE=93=E5=85=A5=EF=BC=8C=E8=8B=A5=E8=BF=87=E7=AB=99?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=EF=BC=8C=E5=88=99=E5=B0=86=E7=BB=B4=E4=BF=AE?= =?UTF-8?q?=E6=A0=87=E8=AE=B01=E6=94=B9=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/REPController.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/AMESCoreStudio.Web/Controllers/REPController.cs b/AMESCoreStudio.Web/Controllers/REPController.cs index 46ce9ccc..935b4510 100644 --- a/AMESCoreStudio.Web/Controllers/REPController.cs +++ b/AMESCoreStudio.Web/Controllers/REPController.cs @@ -1015,12 +1015,17 @@ namespace AMESCoreStudio.Web.Controllers { if (station_info[0].TypeNo != "R") { + model.ngComponent.Status = 0; + result = await _repApi.PutNgComponent((int)model.ngComponent.ComponentID, JsonConvert.SerializeObject(model.ngComponent)); //ModelState.AddModelError("error", "下一站不是維修站!"); return RedirectToAction("Refresh", "Home", new { id = model.ngComponent.NgID, msg = "下一站不是維修站!" }); } } else { + model.ngComponent.Status = 0; + result = await _repApi.PutNgComponent((int)model.ngComponent.ComponentID, JsonConvert.SerializeObject(model.ngComponent)); + return RedirectToAction("Refresh", "Home", new { id = model.ngComponent.NgID, msg = "查無下一站!" }); } @@ -1060,8 +1065,12 @@ namespace AMESCoreStudio.Web.Controllers } else { + model.ngComponent.Status = 0; + result = await _repApi.PutNgComponent((int)model.ngComponent.ComponentID, JsonConvert.SerializeObject(model.ngComponent)); + return RedirectToAction("Refresh", "Home", new { id = model.ngComponent.NgID, msg = barcode_result.Msg }); } + } if (result.Success) @@ -1080,6 +1089,9 @@ namespace AMESCoreStudio.Web.Controllers { ModelState.AddModelError("error", result.Msg); } + + model.ngComponent.Status = 0; + result = await _repApi.PutNgComponent((int)model.ngComponent.ComponentID, JsonConvert.SerializeObject(model.ngComponent)); } HttpContext.Response.Cookies.Delete("UserID4REP001");