From 98689b2fad660c4ae3c44a2ec20a0c9036f664f3 Mon Sep 17 00:00:00 2001 From: Marvin Date: Thu, 13 Jan 2022 21:51:31 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9BAS009,=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/BASController.cs | 13 +++++++++++++ AMESCoreStudio.Web/HttpApis/IBAS.cs | 7 ++++++- .../Controllers/AMES/ProcessTypesController.cs | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/BASController.cs b/AMESCoreStudio.Web/Controllers/BASController.cs index c531a815..74c3d221 100644 --- a/AMESCoreStudio.Web/Controllers/BASController.cs +++ b/AMESCoreStudio.Web/Controllers/BASController.cs @@ -179,6 +179,17 @@ namespace AMESCoreStudio.Web.Controllers ViewBag.NextStationList = NextStationItems; } + private async Task GetProcessTypeList() + { + var result = await _basApi.GetProcessType(); + + var ProcessTypeItems = new List(); + for (int i = 0; i < result.Count; i++) + { + ProcessTypeItems.Add(new SelectListItem(result[i].ProcessTypeName, result[i].ProcessTypeNO.ToString())); + } + ViewBag.ProcessTypeList = ProcessTypeItems; + } [HttpPost] public async Task GetFlowRuleJson(string unit_no) @@ -976,6 +987,7 @@ namespace AMESCoreStudio.Web.Controllers public async Task BAS009C(string id) { await GetUnitList(); + await GetProcessTypeList(); var model = new FlowRule(); if (id != null) @@ -994,6 +1006,7 @@ namespace AMESCoreStudio.Web.Controllers public async Task BAS009UAsync(int id) { await GetUnitList(); + await GetProcessTypeList(); var result = await _basApi.GetFlowRule(id); diff --git a/AMESCoreStudio.Web/HttpApis/IBAS.cs b/AMESCoreStudio.Web/HttpApis/IBAS.cs index 0ff16901..f59b32f4 100644 --- a/AMESCoreStudio.Web/HttpApis/IBAS.cs +++ b/AMESCoreStudio.Web/HttpApis/IBAS.cs @@ -707,6 +707,11 @@ namespace AMESCoreStudio.Web #endregion - + /// + /// 獲取工單屬性資料 + /// + /// + [WebApiClient.Attributes.HttpGet("api/ProcessTypes")] + ITask> GetProcessType(); } } diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/ProcessTypesController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/ProcessTypesController.cs index ecc57d06..5792b62a 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/ProcessTypesController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/ProcessTypesController.cs @@ -28,10 +28,10 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES } /// - /// 獲取產品別資料 + /// 獲取工單屬性資料 /// /// - // GET: api/SystemInfoes + // GET: api/ProcessTypes [HttpGet] public async Task>> GetProcessType() {