From bfab0a97f8a905fbda8d8a70fdddc86d70cf91e8 Mon Sep 17 00:00:00 2001 From: ray Date: Tue, 29 Mar 2022 02:48:42 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=8A=A0=E5=85=A5=E6=9D=BF=E5=8D=A1?= =?UTF-8?q?=E8=B3=87=E8=A8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PCSController.cs | 392 +++++----- .../ViewModels/PCS/WipViewModel.cs | 3 +- AMESCoreStudio.Web/Views/PCS/PCS001.cshtml | 712 ++++++++++-------- AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml | 234 ++++-- AMESCoreStudio.Web/Views/PCS/PCS003.cshtml | 142 +++- .../Controllers/AMES/MaterialSopController.cs | 3 +- .../Controllers/AMES/WipSopController.cs | 2 +- AMESCoreStudio.WebApi/Enums/EnumPCS.cs | 137 +++- .../Models/AMES/WipBarcode.cs | 2 +- AMESCoreStudio.WebApi/Models/AMES/WipBoard.cs | 126 +++- AMESCoreStudio.WebApi/Models/AMES/WipLabel.cs | 11 + 11 files changed, 1153 insertions(+), 611 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index abb4b090..dcfa6e42 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -17,6 +17,7 @@ using System.ComponentModel.DataAnnotations; using System.IO; using System.Linq; using System.Threading.Tasks; +using AMESCoreStudio.WebApi.Enum; namespace AMESCoreStudio.Web.Controllers { @@ -480,63 +481,6 @@ namespace AMESCoreStudio.Web.Controllers ViewBag.GetWipTypeList = WipType; } - /// - /// SMD點膠 - /// - /// - private void GetSMDType() - { - var SMDType = new List(){ - new SelectListItem() { - Text = "A面全點", - Value = "0", - }, - new SelectListItem - { - Text = "B面全點單", - Value = "1", - }, - new SelectListItem - { - Text = "A面部分點膠", - Value = "2", - }, - new SelectListItem - { - Text = "B面部分點膠", - Value = "3", - } - , - new SelectListItem - { - Text = "不需點膠", - Value = "4", - } - }; - - ViewBag.GetSMDTypeList = SMDType; - } - - /// - /// DIP - /// - private void GetDIPType() - { - var DIPType = new List(){ - new SelectListItem() { - Text = "正面", - Value = "正面", - }, - new SelectListItem - { - Text = "背面", - Value = "背面", - } - }; - - ViewBag.GetDIPTypeList = DIPType; - } - /// /// 燒錄 /// @@ -593,85 +537,69 @@ namespace AMESCoreStudio.Web.Controllers } /// - /// PCB烘烤 + /// 工單資訊 板卡資訊 PCB烘烤 /// - private void GetPCBBakeType() + /// + private void GetPCBBakeTypeSelect(string SelectedValue = null) { - var PCBBakeType = new List(){ - new SelectListItem() { - Text = "依廠內規範", - Value = "0", - }, - new SelectListItem - { - Text = "125℃/2H", - Value = "1", - }, - new SelectListItem - { - Text = "120℃/1H(FPC)", - Value = "2", - }, - new SelectListItem - { - Text = "其他", - Value = "3", - } - }; + List values = new List(); + if (SelectedValue != null) + { + values = SelectedValue.Split(',').ToList(); + } + var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardPCBBakeType)).Cast() + .Select(s => new SelectListItem + { + Text = EnumPCS.GetDisplayName(s).ToString(), + Value = s.ToString() + }).ToList(); - ViewBag.GetPCBBakeTypeList = PCBBakeType; + ViewBag.GetPCBBakeTypeSelect = q; } /// - /// PCB加工 + /// 工單資訊 板卡資訊 PCB加工 /// - private void GetPCBWorkingType() + /// + private void GetPCBProcessingTypeSelect(string SelectedValue = null) { - var PCBWorkingType = new List(){ - new SelectListItem() { - Text = "噴印字樣", - Value = "噴印字樣", - }, - new SelectListItem - { - Text = "其他", - Value = "其他", - }, - new SelectListItem - { - Text = "不需加工", - Value = "不需加工", - } - }; + List values = new List(); + if (SelectedValue != null) + { + values = SelectedValue.Split(',').ToList(); + } + var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardPCBProcessingType)).Cast() + .Select(s => new SelectListItem + { + Text = EnumPCS.GetDisplayName(s).ToString(), + Value = s.ToString() + }).ToList(); - ViewBag.GetPCBWorkingTypeList = PCBWorkingType; + ViewBag.GetPCBProcessingTypeSelect = q; } /// - /// 錫膏 + /// 工單資訊 板卡資訊 錫膏 /// - private void GetSolderPaste() + /// + private void GetSolderPasteSelect(string SelectedValue = null) { - var SolderPaste = new List(){ - new SelectListItem() { - Text = "KOKI無鉛錫膏(S3X58-M406-3)", - Value = "0", - }, - new SelectListItem - { - Text = "千住無鉛錫膏(M705-221BM5-32-11.5Ka3)", - Value = "1", - }, - new SelectListItem - { - Text = "其他", - Value = "2", - } - }; + List values = new List(); + if (SelectedValue != null) + { + values = SelectedValue.Split(',').ToList(); + } + var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardSolderPasteType)).Cast() + .Select(s => new SelectListItem + { + Text = EnumPCS.GetDisplayName(s).ToString(), + Value = s.ToString() + }).ToList(); - ViewBag.GetSolderPasteList = SolderPaste; + ViewBag.GetSolderPasteSelect = q; } + /// /// 工單資訊 系統工程資訊 PMType /// @@ -683,11 +611,11 @@ namespace AMESCoreStudio.Web.Controllers { values = SelectedValue.Split(',').ToList(); } - var q = Enum.GetValues(typeof(Enums.EnumWipSystemPMType)).Cast() + var q = Enum.GetValues(typeof(EnumPCS.EnumWipSystemPMType)).Cast() .Select(s => new SelectListItem { - Text = Enums.GetDisplayName(s).ToString(), - Value = Convert.ToInt32(Enum.Parse(typeof(Enums.EnumWipSystemPMType), s.ToString())).ToString() + Text = EnumPCS.GetDisplayName(s).ToString(), + Value = Convert.ToInt32(Enum.Parse(typeof(EnumPCS.EnumWipSystemPMType), s.ToString())).ToString() }).ToList(); ViewBag.GetWipSystemPMTypeSelect = q; @@ -704,11 +632,11 @@ namespace AMESCoreStudio.Web.Controllers { values = SelectedValue.Split(',').ToList(); } - var q = Enum.GetValues(typeof(Enums.EnumWipSystemType)).Cast() + var q = Enum.GetValues(typeof(EnumPCS.EnumWipSystemType)).Cast() .Select(s => new SelectListItem { - Text = Enums.GetDisplayName(s).ToString(), - Value = Convert.ToInt32(Enum.Parse(typeof(Enums.EnumWipSystemType), s.ToString())).ToString() + Text = EnumPCS.GetDisplayName(s).ToString(), + Value = Convert.ToInt32(Enum.Parse(typeof(EnumPCS.EnumWipSystemType), s.ToString())).ToString() }).ToList(); ViewBag.GetWipSystemTypeSelect = q; @@ -725,51 +653,16 @@ namespace AMESCoreStudio.Web.Controllers { values = SelectedValue.Split(',').ToList(); } - var q = Enum.GetValues(typeof(Enums.EnumWipSopType)).Cast() + var q = Enum.GetValues(typeof(EnumPCS.EnumWipSopType)).Cast() .Select(s => new SelectListItem { - Text = Enums.GetDisplayName(s).ToString(), + Text = EnumPCS.GetDisplayName(s).ToString(), Value = s.ToString() }).ToList(); ViewBag.GetSOPTypeSelect = q; } - /// - /// PCS001 SOP相關下拉 - /// - private void GetPCSOPList() - { - var PCSOPList = new List(){ - new SelectListItem() { - Text = "SOP", - Value = "SOP", - }, - new SelectListItem - { - Text = "技術轉移", - Value = "技術轉移", - }, - new SelectListItem - { - Text = "NA", - Value = "NA", - }, - new SelectListItem - { - Text = "暫時文件", - Value = "備暫時文件", - }, - new SelectListItem - { - Text = "備註說明", - Value = "備註說明", - } - }; - - ViewBag.PCSOPList = PCSOPList; - } - /// /// 工單鎖定-鎖定類型 /// @@ -854,10 +747,10 @@ namespace AMESCoreStudio.Web.Controllers values = SelectedValue.Split(',').ToList(); } - var q = Enum.GetValues(typeof(Enums.EnumPrintMode)).Cast() + var q = Enum.GetValues(typeof(EnumPCS.EnumPrintMode)).Cast() .Select(s => new SelectListItem { - Text = Enums.GetDisplayName(s).ToString(), + Text = EnumPCS.GetDisplayName(s).ToString(), Value = s.ToString(), Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 }).ToList(); @@ -876,10 +769,10 @@ namespace AMESCoreStudio.Web.Controllers { values = SelectedValue.Split(',').ToList(); } - var q = Enum.GetValues(typeof(Enums.EnumApproveLogo)).Cast() + var q = Enum.GetValues(typeof(EnumPCS.EnumApproveLogo)).Cast() .Select(s => new SelectListItem { - Text = Enums.GetDisplayName(s).ToString(), + Text = EnumPCS.GetDisplayName(s).ToString(), Value = s.ToString(), Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 }).ToList(); @@ -899,10 +792,10 @@ namespace AMESCoreStudio.Web.Controllers values = SelectedValue.Split(',').ToList(); } - var q = Enum.GetValues(typeof(Enums.EnumCompanyLogo)).Cast() + var q = Enum.GetValues(typeof(EnumPCS.EnumCompanyLogo)).Cast() .Select(s => new SelectListItem { - Text = Enums.GetDisplayName(s).ToString(), + Text = EnumPCS.GetDisplayName(s).ToString(), Value = s.ToString(), Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 }).ToList(); @@ -918,16 +811,60 @@ namespace AMESCoreStudio.Web.Controllers values = SelectedValue.Split(',').ToList(); } - var q = Enum.GetValues(typeof(Enums.EnumWipAttr)).Cast() + var q = Enum.GetValues(typeof(EnumPCS.EnumWipAttr)).Cast() .Select(s => new SelectListItem { - Text = Enums.GetDisplayName(s).ToString(), + Text = EnumPCS.GetDisplayName(s).ToString(), Value = s.ToString(), Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 }).ToList(); ViewBag.GetCheckboxWipAttr = q; } + + /// + /// SMD點膠 + /// + /// + private void GetCheckboxSMD(string SelectedValue = null) + { + List values = new List(); + if (SelectedValue != null) + { + values = SelectedValue.Split(',').ToList(); + } + var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardSMDType)).Cast() + .Select(s => new SelectListItem + { + Text = EnumPCS.GetDisplayName(s).ToString(), + Value = s.ToString(), + Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 + }).ToList(); + + ViewBag.GetCheckboxSMD = q; + } + + /// + /// DIP + /// + /// + private void GetCheckboxDIP(string SelectedValue = null) + { + List values = new List(); + if (SelectedValue != null) + { + values = SelectedValue.Split(',').ToList(); + } + var q = Enum.GetValues(typeof(EnumPCS.EnumWipBoardDIPType)).Cast() + .Select(s => new SelectListItem + { + Text = EnumPCS.GetDisplayName(s).ToString(), + Value = s.ToString(), + Selected = values.Where(v => v.Contains(s.ToString())).Count() != 0 + }).ToList(); + + ViewBag.GetCheckboxDIP = q; + } #endregion #region resut Ajax JSON @@ -997,10 +934,10 @@ namespace AMESCoreStudio.Web.Controllers [HttpPost] public JsonResult GetSOPTypeJson(string id, string search) { - var q = Enum.GetValues(typeof(Enums.EnumWipSopType)).Cast() + var q = Enum.GetValues(typeof(EnumPCS.EnumWipSopType)).Cast() .Select(s => new SelectListItem { - Text = Enums.GetDisplayName(s).ToString(), + Text = EnumPCS.GetDisplayName(s).ToString(), Value = s.ToString() }).ToList(); @@ -1146,16 +1083,13 @@ namespace AMESCoreStudio.Web.Controllers await GetMFGType(); await GetProcessTypes(); await GetFlowRuleList(); - GetSMDType(); - GetDIPType(); GetWipSEQType(); GetBurnType(); GetPartsBakeType(); - GetPCBBakeType(); - GetPCBWorkingType(); - GetSolderPaste(); + GetPCBBakeTypeSelect(); + GetPCBProcessingTypeSelect(); + GetSolderPasteSelect(); GetWipType(); - GetPCSOPList(); GetSOPTypeSelect(); GetWipSystemTypeSelect(); GetWipSystemPMTypeSelect(); @@ -1163,6 +1097,8 @@ namespace AMESCoreStudio.Web.Controllers GetCheckboxCompanyLogo(); GetCheckboxPrintMode(); GetCheckboxWipAttr(); + GetCheckboxDIP(); + GetCheckboxSMD(); //var result = new WipAllViewModel(); //return View(result); @@ -1181,16 +1117,14 @@ namespace AMESCoreStudio.Web.Controllers await GetMFGType(); await GetProcessTypes(); await GetFlowRuleList(); - GetSMDType(); - GetDIPType(); + GetWipSEQType(); GetBurnType(); GetPartsBakeType(); - GetPCBBakeType(); - GetPCBWorkingType(); - GetSolderPaste(); + GetPCBBakeTypeSelect(); + GetPCBProcessingTypeSelect(); + GetSolderPasteSelect(); GetWipType(); - GetPCSOPList(); GetSOPTypeSelect(); GetWipSystemTypeSelect(); GetWipSystemPMTypeSelect(); @@ -1198,6 +1132,8 @@ namespace AMESCoreStudio.Web.Controllers GetCheckboxCompanyLogo(); GetCheckboxPrintMode(); GetCheckboxWipAttr(); + GetCheckboxDIP(); + GetCheckboxSMD(); #endregion IResultModel result; @@ -1212,6 +1148,8 @@ namespace AMESCoreStudio.Web.Controllers model.wipBoard.DipCarrier = model.wipBoard.DipCarrier == "true" ? "Y" : "N"; model.wipBoard.DipTape = model.wipBoard.DipTape == "true" ? "Y" : "N"; model.wipBoard.Burn = model.wipBoard.Burn == "true" ? "Y" : "N"; + model.wipBoard.SmdSolderMask = model.wipBoard.SmdSolderMask == "true" ? "Y" : "N"; + model.wipBoard.ISPartsBake = model.wipBoard.ISPartsBake == "true" ? "Y" : "N"; //系統 model.wipSystem.FinePackage = model.wipSystem.FinePackage == "true" ? "Y" : "N"; @@ -1240,7 +1178,10 @@ namespace AMESCoreStudio.Web.Controllers //板卡 model.wipBoard.DipCarrier = model.wipBoard.DipCarrier == "Y" ? "true" : "false"; model.wipBoard.DipTape = model.wipBoard.DipTape == "Y" ? "true" : "false"; + model.wipBoard.SmdSolderMask = model.wipBoard.SmdSolderMask == "Y" ? "true" : "false"; + model.wipBoard.ISPartsBake = model.wipBoard.ISPartsBake == "Y" ? "true" : "false"; model.wipBoard.Burn = model.wipBoard.Burn == "Y" ? "true" : "false"; + //系統 model.wipSystem.FinePackage = model.wipSystem.FinePackage == "Y" ? "true" : "false"; ModelState.AddModelError("error", Msg); @@ -1300,6 +1241,8 @@ namespace AMESCoreStudio.Web.Controllers { if (!string.IsNullOrWhiteSpace(model.wipBoard.BiTemperature)) { + model.wipBoard.Smd = model.wipBoard.SMDs == null ? null : string.Join(',', model.wipBoard.SMDs); + model.wipBoard.DipSide = model.wipBoard.DipSides == null ? null : string.Join(',', model.wipBoard.DipSides); model.wipBoard.ItemNo = model.wipAtt.ItemNO; model.wipBoard.WipNo = model.wipInfo.WipNO; await _pcsApi.PostWipBoard(JsonConvert.SerializeObject(model.wipBoard)); @@ -1437,16 +1380,13 @@ namespace AMESCoreStudio.Web.Controllers await GetMFGType(); await GetProcessTypes(); await GetFlowRuleList(); - GetSMDType(); - GetDIPType(); GetWipSEQType(); GetBurnType(); GetPartsBakeType(); - GetPCBBakeType(); - GetPCBWorkingType(); - GetSolderPaste(); + GetPCBBakeTypeSelect(); + GetPCBProcessingTypeSelect(); + GetSolderPasteSelect(); GetWipType(); - GetPCSOPList(); GetSOPTypeSelect(); GetWipSystemTypeSelect(); GetWipSystemPMTypeSelect(); @@ -1454,6 +1394,8 @@ namespace AMESCoreStudio.Web.Controllers GetCheckboxCompanyLogo(); GetCheckboxPrintMode(); GetCheckboxWipAttr(); + GetCheckboxDIP(); + GetCheckboxSMD(); model.wipAtt = await _pcsApi.GetWipAtt(model.wipInfo.WipNO); model.wipBarcodes = await _pcsApi.GetWipBarcode(model.wipInfo.WipNO); @@ -1497,17 +1439,23 @@ namespace AMESCoreStudio.Web.Controllers model.wipBoard = await _pcsApi.GetWipBoard(model.wipInfo.WipNO); if (model.wipBoard != null) { - var UserInof = _sysApi.GetUserInfoByUserNo(model.wipBoard.Engineer).InvokeAsync().Result; - if (UserInof != null) - model.wipBoard.Engineer_Name = UserInof.UserName; + if (!string.IsNullOrWhiteSpace(model.wipBoard.Engineer)) + { + var UserInof = _sysApi.GetUserInfoByUserNo(model.wipBoard.Engineer).InvokeAsync().Result; + if (UserInof != null) + model.wipBoard.Engineer_Name = UserInof.UserName; + } } model.wipSystem = await _pcsApi.GetWipSystem(model.wipInfo.WipNO); if (model.wipSystem != null) { - var UserInof = _sysApi.GetUserInfoByUserNo(model.wipSystem.Engineer).InvokeAsync().Result; - if (UserInof != null) - model.wipSystem.Engineer_Name = UserInof.UserName; + if (!string.IsNullOrWhiteSpace(model.wipBoard.Engineer)) + { + var UserInof = _sysApi.GetUserInfoByUserNo(model.wipSystem.Engineer).InvokeAsync().Result; + if (UserInof != null) + model.wipSystem.Engineer_Name = UserInof.UserName; + } } model.wipMAC = await _pcsApi.GetWipMAC(model.wipInfo.WipNO); @@ -1532,22 +1480,21 @@ namespace AMESCoreStudio.Web.Controllers await GetMFGType(); await GetProcessTypes(); await GetFlowRuleList(); - GetSMDType(); - GetDIPType(); GetWipSEQType(); GetBurnType(); GetPartsBakeType(); - GetPCBBakeType(); - GetPCBWorkingType(); - GetSolderPaste(); + GetPCBBakeTypeSelect(); + GetPCBProcessingTypeSelect(); + GetSolderPasteSelect(); GetWipType(); - GetPCSOPList(); GetWipSystemTypeSelect(); GetWipSystemPMTypeSelect(); GetCheckboxApproveLogo(model.wipLabel != null ? model.wipLabel.ApproveLogo : null); GetCheckboxCompanyLogo(model.wipLabel != null ? model.wipLabel.CompanyLogo : null); GetCheckboxPrintMode(model.wipLabel != null ? model.wipLabel.PrintMode : null); GetCheckboxWipAttr(model.wipLabel != null ? model.wipLabel.WipAttr : null); + GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : null); + GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : null); return View(model); } @@ -1578,13 +1525,23 @@ namespace AMESCoreStudio.Web.Controllers model.wipBoard = await _pcsApi.GetWipBoard(model.wipInfo.WipNO); if (model.wipBoard != null) { - model.wipBoard.Engineer_Name = _sysApi.GetUserInfoByUserNo(model.wipBoard.Engineer).InvokeAsync().Result.UserName; + if (!string.IsNullOrWhiteSpace(model.wipBoard.Engineer)) + { + var UserInof = _sysApi.GetUserInfoByUserNo(model.wipBoard.Engineer).InvokeAsync().Result; + if (UserInof != null) + model.wipBoard.Engineer_Name = UserInof.UserName; + } } model.wipSystem = await _pcsApi.GetWipSystem(model.wipInfo.WipNO); if (model.wipSystem != null) { - model.wipSystem.Engineer_Name = _sysApi.GetUserInfoByUserNo(model.wipSystem.Engineer).InvokeAsync().Result.UserName; + if (!string.IsNullOrWhiteSpace(model.wipBoard.Engineer)) + { + var UserInof = _sysApi.GetUserInfoByUserNo(model.wipSystem.Engineer).InvokeAsync().Result; + if (UserInof != null) + model.wipSystem.Engineer_Name = UserInof.UserName; + } } model.wipMAC = await _pcsApi.GetWipMAC(model.wipInfo.WipNO); @@ -1607,23 +1564,22 @@ namespace AMESCoreStudio.Web.Controllers await GetMFGType(); await GetProcessTypes(); await GetFlowRuleList(); - GetSMDType(); - GetDIPType(); GetWipSEQType(); GetBurnType(); GetPartsBakeType(); - GetPCBBakeType(); - GetPCBWorkingType(); - GetSolderPaste(); + GetPCBBakeTypeSelect(); + GetPCBProcessingTypeSelect(); + GetSolderPasteSelect(); GetWipType(); GetWipSystemTypeSelect(); GetWipSystemPMTypeSelect(); - GetPCSOPList(); GetSOPTypeSelect(); GetCheckboxApproveLogo(model.wipLabel != null ? model.wipLabel.ApproveLogo : null); GetCheckboxCompanyLogo(model.wipLabel != null ? model.wipLabel.CompanyLogo : null); GetCheckboxPrintMode(model.wipLabel != null ? model.wipLabel.PrintMode : null); GetCheckboxWipAttr(model.wipLabel != null ? model.wipLabel.WipAttr : null); + GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : null); + GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : null); return View(model); } [HttpPost] @@ -1639,23 +1595,23 @@ namespace AMESCoreStudio.Web.Controllers await GetMFGType(); await GetProcessTypes(); await GetFlowRuleList(); - GetSMDType(); - GetDIPType(); GetWipSEQType(); GetBurnType(); GetPartsBakeType(); - GetPCBBakeType(); - GetPCBWorkingType(); - GetSolderPaste(); + GetPCBBakeTypeSelect(); + GetPCBProcessingTypeSelect(); + GetSolderPasteSelect(); GetWipType(); GetWipSystemTypeSelect(); - GetPCSOPList(); GetSOPTypeSelect(); GetCheckboxApproveLogo(); GetCheckboxCompanyLogo(); GetCheckboxPrintMode(); GetCheckboxWipAttr(); + GetCheckboxDIP(); + GetCheckboxSMD(); GetWipSystemPMTypeSelect(); + #endregion model.ruleStations = await _pcsApi.GetRuleStationByWipNo(model.wipInfo.WipNO); @@ -1673,6 +1629,8 @@ namespace AMESCoreStudio.Web.Controllers model.wipBoard.DipCarrier = model.wipBoard.DipCarrier == "on" ? "Y" : "N"; model.wipBoard.DipTape = model.wipBoard.DipTape == "on" ? "Y" : "N"; model.wipBoard.Burn = model.wipBoard.Burn == "on" ? "Y" : "N"; + model.wipBoard.SmdSolderMask = model.wipBoard.SmdSolderMask == "on" ? "Y" : "N"; + model.wipBoard.ISPartsBake = model.wipBoard.ISPartsBake == "on" ? "Y" : "N"; //系統 model.wipSystem.FinePackage = model.wipSystem.FinePackage == "on" ? "Y" : "N"; @@ -1742,6 +1700,8 @@ namespace AMESCoreStudio.Web.Controllers { if (!string.IsNullOrWhiteSpace(model.wipBoard.BiTemperature)) { + model.wipBoard.Smd = model.wipBoard.SMDs == null ? null : string.Join(',', model.wipBoard.SMDs); + model.wipBoard.DipSide = model.wipBoard.DipSides == null ? null : string.Join(',', model.wipBoard.DipSides); model.wipBoard.ItemNo = model.wipAtt.ItemNO; model.wipBoard.WipNo = model.wipInfo.WipNO; await _pcsApi.PutWipBoard(JsonConvert.SerializeObject(model.wipBoard)); diff --git a/AMESCoreStudio.Web/ViewModels/PCS/WipViewModel.cs b/AMESCoreStudio.Web/ViewModels/PCS/WipViewModel.cs index 25b2eabe..12bf0fea 100644 --- a/AMESCoreStudio.Web/ViewModels/PCS/WipViewModel.cs +++ b/AMESCoreStudio.Web/ViewModels/PCS/WipViewModel.cs @@ -21,6 +21,7 @@ namespace AMESCoreStudio.Web.ViewModels.PCS WipOutfits = new List(); wipMAC = new WipMAC(); wipBarcodeOther = new WipBarcodeOther(); + } /// @@ -82,7 +83,7 @@ namespace AMESCoreStudio.Web.ViewModels.PCS { public WipDataViewModel() { - wipInfo = new WipInfo(); + } /// diff --git a/AMESCoreStudio.Web/Views/PCS/PCS001.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS001.cshtml index e2d2dd4e..8a5d211a 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS001.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS001.cshtml @@ -21,7 +21,8 @@
- + @**@ +
@@ -29,7 +30,7 @@
- +
@@ -77,8 +78,10 @@
- - + @* + *@ + +
@@ -140,9 +143,12 @@
- - - + @* + + *@ + + +
@@ -172,7 +178,7 @@
- +
@@ -269,6 +275,13 @@
+ +
+ +
+ +
+
@* Keypart組合sheet *@ @@ -295,370 +308,460 @@ @* 板卡-工程資訊sheet *@ -
-
-
- -
- -
+
+
+
+ +
+ +
- -
- + +
+ +
-
-
-
- -
- +
+
+ +
+ +
-
-
-
- -
- +
+ +
+
- - -
-
-
-
- -
- +
+ +
+
-
- +
+ +
+
+
- + + @* + + *@ + + +
+
+
+ +
+ +
-
-
-
- -
- +
+
+ +
+ +
+
+ +
+ +
+
+
-
- + +
+
- - +
-
-
-
- -
- +
+
+ + + +
+ +
+
+
+ +
+ + +
-
- + +
+
- +
-
-
-
- -
- +
+
+ +
+ +
-
-
-
-
- -
- - -
+
+ +
+
-
- +
+ +
+
+
- - +
-
- -
- - +
+ +
+ +
+ +
+
+ +
+
+ +
+
-
-
-
- -
- - +
+ +
+
- -
- - +
+ +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
-
-
- @* 系統-工程資訊sheet *@ -
-
-
- -
- +
+ +
+
+
- -
- +
+
+ +
+ + +
-
-
-
- -
- +
+ +
+
-
- +
+ +
+
+ +
+ + +
-
-
- -
- +
+ +
+ +
-
-
-
- -
- + @* 系統-工程資訊sheet *@ +
+
+
+ +
+
-
-
- -
- + + +
+
-
- -
- +
+ +
+
+ +
+ +
+
+
-
- -
-
-
-
-
- -
- -
-
- -
-
- -
- -
- -
- -
- +
+ +
+
-
-
-
- -
- -
-
- -
-
- +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
-
-
-
- -
- -
-
- -
-
- +
+
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+ +
-
-
-
- -
- -
-
- -
-
- +
+
+ +
+ +
+
+ +
+
+ +
-
-
-
- -
- -
-
- -
-
- +
+
+ +
+ +
+
+ +
+
+ +
-
-
-
- -
- -
-
- +
+
+ +
+ +
+
+ +
+
+ +
-
- +
+ +
+
+ +
+ +
+
+ +
+
+ +
-
-
-
- -
- +
+
+ +
+ +
+
+ +
+
+ +
- -
- +
+ +
+
+ +
+ +
+ +
+ +
-
-
-
- -
- +
+
+ +
+ +
-
-
-
- -
- +
+
+ +
+ +
-
-
-
- -
- +
+
+ +
+ +
-
-
- -
- +
+ +
+ +
-
@* 治具組合sheet *@ -
- @* - - - - - - - - - -
- 治具NO - - 治具名稱 - - 流程名稱ID -
*@ - 刷新 -
-
+
+ @* + + + + + + + + + +
+ 治具NO + + 治具名稱 + + 流程名稱ID +
*@ + 刷新 +
+
@* SOP文件 sheet *@
@@ -667,40 +770,47 @@
@* 標籤選項sheet *@ -
-
- - -
+
+
+ + +
-
- -
- -
-
+
+ +
+
+
+
-
- -
- -
+
+ +
+
-
- -
- -
+
+
+ +
+
-
- -
- -
+
+
+ +
+
+
+ +
+ +
+
+
+
@@ -718,7 +828,7 @@ @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); await Html.RenderPartialAsync("_FileinputScriptsPartial"); } - + } diff --git a/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml index 0120be5a..6752626d 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml @@ -283,62 +283,69 @@
@* 序號編碼sheet *@ -
- - - +
+ +
+ + + + + + + + + @foreach (var index in Model.wipBarcodes) + { - - - + + - - - @foreach (var index in Model.wipBarcodes) - { - - - - - } - -
+ 起始生產序號 + + 結束生產序號 +
- 起始生產序號 - - 結束生產序號 - + @index.StartNO + + @index.EndNO +
- @index.StartNO - - @index.EndNO -
+ } + + -
-
- -
- -
-
-
-
- -
+
+
+ +
+ +
+
-
+
+
+
-
-
- -
- -
-
-
-
- -
+
+
+ +
+ +
+
-
+
+
+
+ +
+ +
+
+
+ @* Keypart組合sheet *@
@@ -443,7 +450,7 @@
- +
@@ -456,20 +463,45 @@
-
- +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
-
- +
+ + + + + @* + + *@
- - +
+
+ +
+ +
+
@@ -477,7 +509,8 @@
- + + @**@
@@ -489,8 +522,17 @@
+
+ +
+ +
+
+
+ +
@@ -500,71 +542,132 @@
+
+
+ +
+ +
+
+
- +
+
+ +
+ +
+ +
+
+ +
- +
+
+ +
+ +
+
+
- +
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
- - + +
+
+
+ +
+ +
+ +
+
+ +
+
- - + +
+ +
+ +
+ +
+
@* 系統-工程資訊sheet *@ @@ -587,7 +690,7 @@
- +
@@ -766,6 +869,13 @@
+ +
+ +
+ +
+
@* SOP文件 sheet *@ diff --git a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml index 8b6a56dc..5132cefb 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml @@ -83,8 +83,8 @@
- - + +
@@ -178,7 +178,7 @@
- +
@@ -287,6 +287,13 @@
+ +
+ +
+ +
+
@* Keypart組合sheet *@ @@ -435,20 +442,45 @@
-
- +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
-
- +
+ + + + + @* + + *@
- - +
+
+ +
+ +
+
@@ -456,7 +488,8 @@
- + + @**@
@@ -468,8 +501,17 @@
+
+ +
+ +
+
+
+ +
@@ -479,72 +521,132 @@
+
+
+ +
+ +
+
+
- +
+
+ +
+ +
+ +
+
+ +
- +
+
+ +
+ +
+
+
- +
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
- - + +
+
+
+ +
+ +
+ +
+
+ +
+
- - + +
+
+ +
+ +
+
@* 系統-工程資訊sheet *@ @@ -890,6 +992,12 @@
+
+ +
+ +
+
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/MaterialSopController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/MaterialSopController.cs index 5c6f39c3..98b72c97 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/MaterialSopController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/MaterialSopController.cs @@ -8,6 +8,7 @@ using Microsoft.EntityFrameworkCore; using AMESCoreStudio.WebApi.Models.AMES; using AMESCoreStudio.CommonTools.Result; using AMESCoreStudio.WebApi.DTO.AMES; +using AMESCoreStudio.WebApi.Enum; // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 namespace AMESCoreStudio.WebApi.Controllers.AMES @@ -129,7 +130,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES }).ToListAsync(); result.Data.Select(s => - s.SopTypeName = Enums.GetDisplayName((Enums.EnumWipSopType)Enum.Parse(typeof(Enums.EnumWipSopType), s.SopType))).ToList(); + s.SopTypeName = EnumPCS.GetDisplayName((EnumPCS.EnumWipSopType)System.Enum.Parse(typeof(EnumPCS.EnumWipSopType), s.SopType))).ToList(); return result; } diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipSopController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipSopController.cs index d2d09d39..413d6f72 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/WipSopController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipSopController.cs @@ -83,7 +83,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES var result = await q.ToListAsync(); result.Select(s => s.SOPTypeName - = Enums.GetDisplayName((Enums.EnumWipSopType)Enum.Parse(typeof(Enums.EnumWipSopType), s.SOPType))).ToList(); + = Enum.EnumPCS.GetDisplayName((Enum.EnumPCS.EnumWipSopType)System.Enum.Parse(typeof(Enum.EnumPCS.EnumWipSopType), s.SOPType))).ToList(); return result; } diff --git a/AMESCoreStudio.WebApi/Enums/EnumPCS.cs b/AMESCoreStudio.WebApi/Enums/EnumPCS.cs index e3045a8a..ee71ba8e 100644 --- a/AMESCoreStudio.WebApi/Enums/EnumPCS.cs +++ b/AMESCoreStudio.WebApi/Enums/EnumPCS.cs @@ -6,9 +6,12 @@ using System.Reflection; using System.Collections.Generic; using Microsoft.AspNetCore.Mvc.Rendering; -namespace AMESCoreStudio.WebApi +namespace AMESCoreStudio.WebApi.Enum { - public class Enums + /// + /// + /// + public class EnumPCS { /// /// 列印方式 @@ -218,7 +221,7 @@ namespace AMESCoreStudio.WebApi /// A面全點 /// [Display(Name = "A面全點")] - A = 1, + A = 1 , /// /// B面全點 @@ -233,24 +236,142 @@ namespace AMESCoreStudio.WebApi C = 3, /// - /// 暫時文件 + /// B面部份點膠 /// - [Display(Name = "暫時文件")] + [Display(Name = "B面部份點膠")] D = 4, /// - /// REWORK + /// AB面部份點膠 /// - [Display(Name = "REWORK")] + [Display(Name = "AB面部份點膠")] E = 5, + + + /// + /// 不須點膠 + /// + [Display(Name = "不須點膠")] + F = 6, } + /// + /// DIP + /// + public enum EnumWipBoardDIPType + { + /// + /// A面 + /// + [Display(Name = "A面")] + A = 1, + + /// + /// B面 + /// + [Display(Name = "B面")] + B = 2, + + /// + /// NA + /// + [Display(Name = "NA")] + N = 0, + } + + /// + /// PCB烘烤 + /// + + public enum EnumWipBoardPCBBakeType + { + /// + /// 依廠內規範 + /// + [Display(Name = "依廠內規範")] + A = 1, + + /// + /// 125℃/ 2Hr + /// + [Display(Name = "125℃/ 2Hr")] + B = 2, + + /// + /// 120℃/ 1Hr (FPC) + /// + [Display(Name = "120℃/ 1Hr (FPC)")] + C = 3, + + /// + /// 其他 + /// + [Display(Name = "其他")] + D = 4, + } + + /// + /// PCB加工 + /// + + public enum EnumWipBoardPCBProcessingType + { + /// + /// 噴印字樣 (給備註填寫欄位) + /// + [Display(Name = "噴印字樣 (給備註填寫欄位)")] + A = 1, + + /// + /// 其他 + /// + [Display(Name = "其他")] + B = 2, + + /// + /// NA + /// + [Display(Name = "NA")] + N = 0, + } + + /// + /// 錫膏 + /// + + public enum EnumWipBoardSolderPasteType + { + /// + /// KOKI 無鉛錫膏(S3X58-M406-3) + /// + [Display(Name = "KOKI 無鉛錫膏(S3X58-M406-3)")] + A = 1, + + /// + /// 千住 無鉛錫膏(M705-221BM5-32-11.5K3) + /// + [Display(Name = "千住 無鉛錫膏(M705-221BM5-32-11.5K3)")] + B = 2, + + /// + /// 千住 無鹵錫膏(M705-S101ZH-S4)、無鹵錫絲(SHF RC101 F3 M705) + /// + [Display(Name = "千住 無鹵錫膏(M705-S101ZH-S4)、無鹵錫絲(SHF RC101 F3 M705)")] + C = 3, + + /// + /// 其他 + /// + [Display(Name = "其他")] + D = 4, + } + /// /// Get Enum Display /// /// /// - public static string GetDisplayName(Enum enumValue) + public static string GetDisplayName(System.Enum enumValue) { return enumValue.GetType()? .GetMember(enumValue.ToString())?.First()? diff --git a/AMESCoreStudio.WebApi/Models/AMES/WipBarcode.cs b/AMESCoreStudio.WebApi/Models/AMES/WipBarcode.cs index 6f041a8e..54944802 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/WipBarcode.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/WipBarcode.cs @@ -65,7 +65,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Column("REMARKS")] [DataMember] [Display(Name = "備註")] - public string ReMarks { get; set; } + public string Remarks { get; set; } /// /// 建立者 diff --git a/AMESCoreStudio.WebApi/Models/AMES/WipBoard.cs b/AMESCoreStudio.WebApi/Models/AMES/WipBoard.cs index 7944adf6..6fc2c1b9 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/WipBoard.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/WipBoard.cs @@ -2,6 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Runtime.Serialization; +using System.Collections.Generic; #nullable disable @@ -48,18 +49,51 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Column("SMD")] [DataMember] [Display(Name = "SMD點膠")] - public int Smd { get; set; } + public string Smd { get; set; } + + /// + /// SMD點紅膠備註 + /// + [Column("SMD_REMARKS")] + [DataMember] + [Display(Name = "SMD點膠")] + public string SmdRemarks { get; set; } + + /// + /// SMD點防焊膠(Y/N) + /// + [Required] + [Column("SMD_SOLDER_MASK")] + [StringLength(2)] + [DataMember] + public string SmdSolderMask { get; set; } + + /// + /// SMD點防焊膠備註 + /// + [Column("SMD_SM_REMARKS")] + [DataMember] + [Display(Name = "SMD點膠")] + public string SmdSMRemarks { get; set; } /// /// 正背面 /// [Required] [Column("DIP_SIDE")] - [StringLength(5)] + [StringLength(10)] [DataMember] [Display(Name = "正背面")] public string DipSide { get; set; } + /// + /// DIP正背面備註 + /// + [Column("DIP_REMARKS")] + [DataMember] + [Display(Name = "DIP正背面備註")] + public string DipRemarks { get; set; } + /// /// 是否需要CARRIER(Y/N) /// @@ -100,6 +134,23 @@ namespace AMESCoreStudio.WebApi.Models.AMES public string BurnLocation { get; set; } + /// + /// 燒錄備註 + /// + [Column("BURN_REMARKS")] + [DataMember] + + public string BurnRemarks { get; set; } + + /// + /// 零件是否需要烘烤(Y/N) + /// + [Required] + [Column("IS_PARTS_BAKE")] + [StringLength(2)] + [DataMember] + public string ISPartsBake { get; set; } + /// /// 零件烘烤溫度 /// @@ -118,6 +169,14 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Required(ErrorMessage = "{0},不能空白")] public decimal PartsBakeTime { get; set; } + /// + /// 零件烘烤備註 + /// + [Column("PARTS_BAKE_REMARKS")] + [DataMember] + + public string PartsBakeRemarks { get; set; } + /// /// PCB烘烤 /// @@ -127,6 +186,14 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Required(ErrorMessage = "{0},不能空白")] public decimal PcbBake { get; set; } + /// + /// PCB烘烤備註 + /// + [Column("PCB_BAKE_REMARKS")] + [DataMember] + + public string PcbBakeRemarks { get; set; } + /// /// PCB加工 /// @@ -135,7 +202,16 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Display(Name = "PCB加工")] [Required(ErrorMessage = "{0},不能空白")] public string PcbProcessing { get; set; } - + + + /// + /// PCB加工備註 + /// + [Column("PCB_PROCESSING_REMARKS")] + [DataMember] + + public string PcbProcessingRemarks { get; set; } + /// /// 錫膏 /// @@ -144,6 +220,14 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Display(Name = "錫膏")] public int SolderPaste { get; set; } + /// + /// 錫膏備註 + /// + [Column("SOLDER_PASTE_REMARKS")] + [DataMember] + + public string SolderPasteRemarks { get; set; } + /// /// 燒機比率 /// @@ -173,6 +257,14 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Required(ErrorMessage = "{0},不能空白")] public string BiTime { get; set; } + /// + /// 燒機備註 + /// + [Column("BI_REMARKS")] + [DataMember] + + public string BiRemarks { get; set; } + /// /// BIOS版本 /// @@ -181,6 +273,14 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Display(Name = "BIOS版本")] public decimal BiosVer { get; set; } + /// + /// BIOS備註 + /// + [Column("BIOS_REMARKS")] + [DataMember] + + public string BiosRemarks { get; set; } + /// /// Check Sum /// @@ -191,6 +291,14 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Required(ErrorMessage = "{0},不能空白")] public string Checksum { get; set; } + /// + /// Check Sum備註 + /// + [Column("CS_REMARKS")] + [DataMember] + + public string CsRemarks { get; set; } + /// /// 創建者ID /// @@ -226,5 +334,17 @@ namespace AMESCoreStudio.WebApi.Models.AMES [DataMember] public string Engineer_Name { get; set; } + /// + /// SMDs + /// + [NotMapped] + public virtual List SMDs { get; set; } + + /// + /// 正背面 + /// + [NotMapped] + public virtual List DipSides { get; set; } + } } diff --git a/AMESCoreStudio.WebApi/Models/AMES/WipLabel.cs b/AMESCoreStudio.WebApi/Models/AMES/WipLabel.cs index dc3b3deb..39a9b9ec 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/WipLabel.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/WipLabel.cs @@ -59,6 +59,14 @@ namespace AMESCoreStudio.WebApi.Models.AMES [DataMember] public string WipAttr { get; set; } + /// + /// 備註 + /// + [Column("REMARKS")] + [DataMember] + + public string Remarks { get; set; } + /// /// 建立UserID /// @@ -88,6 +96,9 @@ namespace AMESCoreStudio.WebApi.Models.AMES [DataMember] public DateTime? UpdateDate { get; set; } + /// + ///認證Logos + /// [NotMapped] public virtual List ApproveLogos { get; set; }