diff --git a/AMESCoreStudio.Web/Controllers/QRSController.cs b/AMESCoreStudio.Web/Controllers/QRSController.cs index dd2b2c38..8dcf5944 100644 --- a/AMESCoreStudio.Web/Controllers/QRSController.cs +++ b/AMESCoreStudio.Web/Controllers/QRSController.cs @@ -405,11 +405,19 @@ namespace AMESCoreStudio.Web.Controllers return View(); } - public async Task QRS011AAsync(string unitNo, string itemNO, string wipNO) + /// + /// 生產進度查詢 + /// + /// 生產製程 + /// 料號 + /// 工單號碼 + /// 工單狀態:N(未完工) E(已完工) + /// + public async Task QRS011AAsync(string unitNo, string itemNO, string wipNO, string wipStatus) { ViewData["Title"] = "查詢條件 - 製程代碼 : " + unitNo + "; 料號 : " + itemNO + "; 工單號碼 : " + wipNO; - IResultModel result = await _pcsApi.GetWipInfo4QRS011(unitNo, itemNO, wipNO); + IResultModel result = await _pcsApi.GetWipInfo4QRS011(unitNo, itemNO, wipNO, wipStatus); string wipDataList = ""; if (result.DataTotal > 0) @@ -474,6 +482,23 @@ namespace AMESCoreStudio.Web.Controllers } } + // 完工站(1000)PASS資料 抓上一站PASS數 + if (rule_sation[j].StationID == 1000) + { + wip_station = await _pcsApi.GetWipStation4QRS009Group(wip_id, rule_sation[j - 1].StationID); + if (wip_station.DataTotal > 0) + { + foreach (var data in wip_station.Data) + { + JObject j0 = JObject.Parse(data.ToString()); + if (j0["ruleStatus"].ToString() == "P") + { + okQty = int.Parse(j0["firstCnt"].ToString()); + } + } + } + } + //stationQty = stationQty + "" + okQty + "/" + ngQty + ""; stationQty = stationQty + "" + okQty + "/" + ngQty + ""; @@ -994,7 +1019,7 @@ namespace AMESCoreStudio.Web.Controllers var result = await _pcsApi.GetWipInfo4QRS013(wipNO, factoryNo, page, limit); - string cols= @""; + string cols = @""; ViewBag.ColList = cols; @@ -1503,7 +1528,7 @@ namespace AMESCoreStudio.Web.Controllers { if (kp_name.StartsWith("MB") && kp_name.IndexOf("MAC") > 0) { - + kpDataList = kpDataList + " " + kp_name + ""; } else @@ -1643,7 +1668,7 @@ namespace AMESCoreStudio.Web.Controllers return View(); } - public async Task QRS018D(string wipNO,string stationID,string partNO) + public async Task QRS018D(string wipNO, string stationID, string partNO) { var station = await _basApi.GetStations(int.Parse(stationID)); diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs index 6bcd6270..c5d59a6d 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/IPCS.cs @@ -1042,7 +1042,7 @@ namespace AMESCoreStudio.Web /// /// [WebApiClient.Attributes.HttpGet("api/WipInfos/GetWipInfo4QRS011")] - ITask> GetWipInfo4QRS011(string unitNo, string itemNO, string wipNO); + ITask> GetWipInfo4QRS011(string unitNo, string itemNO, string wipNO , string wipStatus); #endregion diff --git a/AMESCoreStudio.Web/Views/QRS/QRS011.cshtml b/AMESCoreStudio.Web/Views/QRS/QRS011.cshtml index 19e564f1..39abd670 100644 --- a/AMESCoreStudio.Web/Views/QRS/QRS011.cshtml +++ b/AMESCoreStudio.Web/Views/QRS/QRS011.cshtml @@ -15,10 +15,21 @@
+
+
+ +
+ +
+
+
-
+
@@ -54,8 +65,10 @@
@section Scripts{ - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); - await Html.RenderPartialAsync("_FileinputScriptsPartial"); } + @{ + await Html.RenderPartialAsync("_ValidationScriptsPartial"); + await Html.RenderPartialAsync("_FileinputScriptsPartial"); + }