From b77644be05edaa52be42ef802b9ddabf6b54930d Mon Sep 17 00:00:00 2001 From: ray Date: Sun, 15 Jan 2023 21:17:24 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=96=B0=E5=A2=9ESOP=E7=B6=AD=E8=AD=B7?= =?UTF-8?q?=E9=A0=85=E7=9B=AE-=E5=B7=AE=E7=95=B0SOP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/PCSController.cs | 15 +++++++++++++++ AMESCoreStudio.WebApi/Enums/EnumPCS.cs | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 1427d37e..aeee2dd4 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -6196,6 +6196,21 @@ namespace AMESCoreStudio.Web.Controllers }); } } + // 差異SOP F + if (wipSOP.Where(w => w.UnitNo == stationUnit && w.SOPType == "F").Any()) + { + var wipSOPTypeF = wipSOP.Where(w => w.UnitNo == stationUnit && w.SOPType == "F") + .OrderByDescending(w => w.UpdateTime).FirstOrDefault(); + var Esop = await _pcsApi.GetDocEsopViewByNo(wipSOPTypeF.SOPName); + if (Esop.Count != 0) + { + model.Sops.Add(new PCS021ViewModel_SOP + { + SopName = "差異SOP", + SopPath = $@"/DocEsop/{Esop.FirstOrDefault().file_path}" + }); + } + } // 暫行SOP D if (wipSOP.Where(w => w.UnitNo == stationUnit && w.SOPType == "D").Any()) { diff --git a/AMESCoreStudio.WebApi/Enums/EnumPCS.cs b/AMESCoreStudio.WebApi/Enums/EnumPCS.cs index 075de1b7..2d712cd7 100644 --- a/AMESCoreStudio.WebApi/Enums/EnumPCS.cs +++ b/AMESCoreStudio.WebApi/Enums/EnumPCS.cs @@ -344,6 +344,12 @@ namespace AMESCoreStudio.WebApi.Enum /// [Display(Name = "REWORK")] E = 5, + + /// + /// 差異SOP + /// + [Display(Name = "差異SOP")] + F = 6, } ///