From 50922607f7c168fc86c0c8530e4e490c598ed7d8 Mon Sep 17 00:00:00 2001 From: Marvin Date: Tue, 27 Feb 2024 09:33:42 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=BB=B4=E4=BF=AE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E6=98=AF=E7=BB=B4?= =?UTF-8?q?=E4=BF=AE=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/REPController.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/AMESCoreStudio.Web/Controllers/REPController.cs b/AMESCoreStudio.Web/Controllers/REPController.cs index f41385dd..46ce9ccc 100644 --- a/AMESCoreStudio.Web/Controllers/REPController.cs +++ b/AMESCoreStudio.Web/Controllers/REPController.cs @@ -1009,6 +1009,21 @@ namespace AMESCoreStudio.Web.Controllers } } + var station_info = await _basApi.GetStations(repairStationID); + + if (station_info.Count > 0) + { + if (station_info[0].TypeNo != "R") + { + //ModelState.AddModelError("error", "下一站不是維修站!"); + return RedirectToAction("Refresh", "Home", new { id = model.ngComponent.NgID, msg = "下一站不是維修站!" }); + } + } + else + { + return RedirectToAction("Refresh", "Home", new { id = model.ngComponent.NgID, msg = "查無下一站!" }); + } + int lineID = -1; if (model.ngInfo.Wip.LineID != null) {