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() {