diff --git a/.gitignore b/.gitignore index b8307228..36c0f7a6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /AMES功能確認Check List_驗證狀況20230217.xlsx /其他專案資料 /HG_Layui 框架介紹 +/AMESCoreStudio.Web/logs diff --git a/.vs/AMESCoreStudio/config/applicationhost.config b/.vs/AMESCoreStudio/config/applicationhost.config index 9742bd6d..a465bb90 100644 --- a/.vs/AMESCoreStudio/config/applicationhost.config +++ b/.vs/AMESCoreStudio/config/applicationhost.config @@ -163,7 +163,7 @@ - + diff --git a/.vs/AMESCoreStudio/v16/.suo b/.vs/AMESCoreStudio/v16/.suo index 184db68d..49d69323 100644 Binary files a/.vs/AMESCoreStudio/v16/.suo and b/.vs/AMESCoreStudio/v16/.suo differ diff --git a/AMESCoreStudio.CommonTools/bin/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.dll b/AMESCoreStudio.CommonTools/bin/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.dll index c16fc351..6efce073 100644 Binary files a/AMESCoreStudio.CommonTools/bin/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.dll and b/AMESCoreStudio.CommonTools/bin/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.dll differ diff --git a/AMESCoreStudio.CommonTools/bin/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.pdb b/AMESCoreStudio.CommonTools/bin/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.pdb index 0f7e6cb0..b6758a50 100644 Binary files a/AMESCoreStudio.CommonTools/bin/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.pdb and b/AMESCoreStudio.CommonTools/bin/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.pdb differ diff --git a/AMESCoreStudio.CommonTools/obj/AMESCoreStudio.CommonTools.csproj.nuget.dgspec.json b/AMESCoreStudio.CommonTools/obj/AMESCoreStudio.CommonTools.csproj.nuget.dgspec.json index 7bb101c4..351e7006 100644 --- a/AMESCoreStudio.CommonTools/obj/AMESCoreStudio.CommonTools.csproj.nuget.dgspec.json +++ b/AMESCoreStudio.CommonTools/obj/AMESCoreStudio.CommonTools.csproj.nuget.dgspec.json @@ -1,21 +1,28 @@ { "format": 1, "restore": { - "D:\\安勤\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj": {} + "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj": {} }, "projects": { - "D:\\安勤\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj": { + "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "D:\\安勤\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", + "projectUniqueName": "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", "projectName": "AMESCoreStudio.CommonTools", - "projectPath": "D:\\安勤\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", - "packagesPath": "C:\\Users\\user\\.nuget\\packages\\", - "outputPath": "D:\\安勤\\AMESCoreStudio.CommonTools\\obj\\", + "projectPath": "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", + "packagesPath": "C:\\Users\\yiruwang\\.nuget\\packages\\", + "outputPath": "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\obj\\", "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + ], "configFilePaths": [ - "C:\\Users\\user\\AppData\\Roaming\\NuGet\\NuGet.Config", - "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + "C:\\Users\\yiruwang\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" ], "originalTargetFrameworks": [ "netcoreapp3.1" diff --git a/AMESCoreStudio.CommonTools/obj/AMESCoreStudio.CommonTools.csproj.nuget.g.props b/AMESCoreStudio.CommonTools/obj/AMESCoreStudio.CommonTools.csproj.nuget.g.props index 02234898..228f2cd7 100644 --- a/AMESCoreStudio.CommonTools/obj/AMESCoreStudio.CommonTools.csproj.nuget.g.props +++ b/AMESCoreStudio.CommonTools/obj/AMESCoreStudio.CommonTools.csproj.nuget.g.props @@ -5,12 +5,15 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\user\.nuget\packages\ + C:\Users\yiruwang\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder PackageReference 5.11.4 - + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) diff --git a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.GeneratedMSBuildEditorConfig.editorconfig b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.GeneratedMSBuildEditorConfig.editorconfig index a196e6b5..e35b99ce 100644 --- a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.GeneratedMSBuildEditorConfig.editorconfig +++ b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.GeneratedMSBuildEditorConfig.editorconfig @@ -1,3 +1,3 @@ is_global = true build_property.RootNamespace = AMESCoreStudio.CommonTools -build_property.ProjectDir = D:\安勤\AMESCoreStudio.CommonTools\ +build_property.ProjectDir = C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\ diff --git a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.assets.cache b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.assets.cache index f2aacae2..ae79c549 100644 Binary files a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.assets.cache and b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.assets.cache differ diff --git a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.csproj.AssemblyReference.cache b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.csproj.AssemblyReference.cache index 3cbdae15..f5e894ae 100644 Binary files a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.csproj.AssemblyReference.cache and b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.csproj.AssemblyReference.cache differ diff --git a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.csproj.FileListAbsolute.txt b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.csproj.FileListAbsolute.txt index 436a111d..629f416f 100644 --- a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.csproj.FileListAbsolute.txt +++ b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.csproj.FileListAbsolute.txt @@ -18,3 +18,13 @@ D:\SFIS_WEB\安勤\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreSt D:\SFIS_WEB\安勤\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.csproj.CoreCompileInputs.cache D:\SFIS_WEB\安勤\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.dll D:\SFIS_WEB\安勤\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.pdb +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\bin\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.deps.json +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\bin\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.dll +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\bin\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.pdb +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.csproj.AssemblyReference.cache +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.AssemblyInfoInputs.cache +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.AssemblyInfo.cs +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.csproj.CoreCompileInputs.cache +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.dll +C:\Users\yiruwang\Desktop\AMES\AMESCoreStudio_ST\AMESCoreStudio_Git\AMES\AMESCoreStudio.CommonTools\obj\Debug\netcoreapp3.1\AMESCoreStudio.CommonTools.pdb diff --git a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.dll b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.dll index c16fc351..6efce073 100644 Binary files a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.dll and b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.dll differ diff --git a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.pdb b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.pdb index 0f7e6cb0..b6758a50 100644 Binary files a/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.pdb and b/AMESCoreStudio.CommonTools/obj/Debug/netcoreapp3.1/AMESCoreStudio.CommonTools.pdb differ diff --git a/AMESCoreStudio.CommonTools/obj/project.assets.json b/AMESCoreStudio.CommonTools/obj/project.assets.json index 93129657..a41f662f 100644 --- a/AMESCoreStudio.CommonTools/obj/project.assets.json +++ b/AMESCoreStudio.CommonTools/obj/project.assets.json @@ -8,20 +8,30 @@ ".NETCoreApp,Version=v3.1": [] }, "packageFolders": { - "C:\\Users\\user\\.nuget\\packages\\": {} + "C:\\Users\\yiruwang\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}, + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}, + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {} }, "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "D:\\安勤\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", + "projectUniqueName": "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", "projectName": "AMESCoreStudio.CommonTools", - "projectPath": "D:\\安勤\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", - "packagesPath": "C:\\Users\\user\\.nuget\\packages\\", - "outputPath": "D:\\安勤\\AMESCoreStudio.CommonTools\\obj\\", + "projectPath": "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", + "packagesPath": "C:\\Users\\yiruwang\\.nuget\\packages\\", + "outputPath": "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\obj\\", "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + ], "configFilePaths": [ - "C:\\Users\\user\\AppData\\Roaming\\NuGet\\NuGet.Config", - "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + "C:\\Users\\yiruwang\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" ], "originalTargetFrameworks": [ "netcoreapp3.1" diff --git a/AMESCoreStudio.CommonTools/obj/project.nuget.cache b/AMESCoreStudio.CommonTools/obj/project.nuget.cache index f2f58d41..81b713c8 100644 --- a/AMESCoreStudio.CommonTools/obj/project.nuget.cache +++ b/AMESCoreStudio.CommonTools/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "nixE2583+o2Lb6Ol8XqrOCPqnwJXWrJ+bfZDDbKg9h01hAdu6Y8HnzRmocn5u6NW76OvleIWm7oOkX7gvAA7MA==", + "dgSpecHash": "2fIHsumIkVxB9cxkVDgXQ+h//IUaMqrhb6BgAuaYSrYPblP7jR7MMNCYa/+JQPOy86bq+CIg7wBrFfw7Pcyswg==", "success": true, - "projectFilePath": "D:\\安勤\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", + "projectFilePath": "C:\\Users\\yiruwang\\Desktop\\AMES\\AMESCoreStudio_ST\\AMESCoreStudio_Git\\AMES\\AMESCoreStudio.CommonTools\\AMESCoreStudio.CommonTools.csproj", "expectedPackageFiles": [], "logs": [] } \ No newline at end of file diff --git a/AMESCoreStudio.Web/Controllers/BASController.cs b/AMESCoreStudio.Web/Controllers/BASController.cs index da3fdcf9..99342ef3 100644 --- a/AMESCoreStudio.Web/Controllers/BASController.cs +++ b/AMESCoreStudio.Web/Controllers/BASController.cs @@ -2675,7 +2675,7 @@ namespace AMESCoreStudio.Web.Controllers model.SnLen = 4; } - + model.MCode = "0"; result = await _basApi.PostSerialRule(JsonConvert.SerializeObject(model)); @@ -2742,6 +2742,7 @@ namespace AMESCoreStudio.Web.Controllers { model.SnLen = 4; } + model.MCode = "0"; result = await _basApi.PutSerialRule(model.SerialRuleID, JsonConvert.SerializeObject(model)); diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 579a30f6..2d5ab495 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -975,6 +975,29 @@ namespace AMESCoreStudio.Web.Controllers ViewBag.GetCheckboxWipAttr = q; } + /// + /// LN列印 + /// + /// + private void GetCheckboxWipLN(string SelectedValue = null) + { + List values = new List(); + if (SelectedValue != null) + { + values = SelectedValue.Split(',').ToList(); + } + + var q = Enum.GetValues(typeof(EnumPCS.EnumLN)).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.GetCheckboxLN = q; + } + /// /// SMD點紅膠 /// @@ -2489,6 +2512,7 @@ namespace AMESCoreStudio.Web.Controllers GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : null); GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : null); GetCheckboxSMDSolderMa(model.wipBoard != null ? model.wipBoard.SmdSolderMask : null); + GetCheckboxWipLN(model.wipLabel != null ? model.wipLabel.LN : "N"); return View(model); } @@ -2644,6 +2668,7 @@ namespace AMESCoreStudio.Web.Controllers GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : ""); GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : ""); GetCheckboxSMDSolderMa(model.wipBoard != null ? model.wipBoard.SmdSolderMask : ""); + GetCheckboxWipLN(model.wipLabel != null ? model.wipLabel.LN : "N"); return View(model); } @@ -2667,6 +2692,7 @@ namespace AMESCoreStudio.Web.Controllers GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : ""); GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : ""); GetCheckboxSMDSolderMa(model.wipBoard != null ? model.wipBoard.SmdSolderMask : ""); + GetCheckboxWipLN(model.wipLabel != null ? model.wipLabel.LN : "N"); #endregion model.ruleStations = await _pcsApi.GetRuleStationByWipNo(model.wipInfo.WipNO); @@ -2995,6 +3021,7 @@ namespace AMESCoreStudio.Web.Controllers GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : ""); GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : ""); GetCheckboxSMDSolderMa(model.wipBoard != null ? model.wipBoard.SmdSolderMask : ""); + GetCheckboxWipLN(model.wipLabel != null ? model.wipLabel.LN : "N"); return View(model); } @@ -3018,6 +3045,7 @@ namespace AMESCoreStudio.Web.Controllers GetCheckboxDIP(model.wipBoard != null ? model.wipBoard.DipSide : ""); GetCheckboxSMD(model.wipBoard != null ? model.wipBoard.Smd : ""); GetCheckboxSMDSolderMa(model.wipBoard != null ? model.wipBoard.SmdSolderMask : ""); + GetCheckboxWipLN(model.wipLabel != null ? model.wipLabel.LN : "N"); #endregion model.ruleStations = await _pcsApi.GetRuleStationByWipNo(model.wipInfo.WipNO); @@ -9920,7 +9948,7 @@ namespace AMESCoreStudio.Web.Controllers - + #region PCS041 生產注意事項 @@ -10115,7 +10143,7 @@ namespace AMESCoreStudio.Web.Controllers }; await _pcsApi.PostProductionNoticeBlob(JsonConvert.SerializeObject(productNoticeBlob)); } - } + } //Get Data from database await GetStation(); diff --git a/AMESCoreStudio.Web/Controllers/SPCController.cs b/AMESCoreStudio.Web/Controllers/SPCController.cs index 441e4322..532ef4d6 100644 --- a/AMESCoreStudio.Web/Controllers/SPCController.cs +++ b/AMESCoreStudio.Web/Controllers/SPCController.cs @@ -997,6 +997,7 @@ namespace AMESCoreStudio.Web.Controllers public async Task SPC005C(int id) { var result = await _spcApi.GetInspectionForm(id); + ViewBag.InspectionTypeID = result[0].InspectionTypeID; var master = await _spcApi.GetInspectionResultMastersNewID(); ViewBag.FormID = result[0].InspectionFormID; ViewBag.MasterID = master; @@ -1038,6 +1039,8 @@ namespace AMESCoreStudio.Web.Controllers { return View(); } + var result1 = await _spcApi.GetInspectionForm(result.Select(s=>s.InspectionFormID).FirstOrDefault()); + ViewBag.InspectionTypeID = result1[0].InspectionTypeID; return View(result[0]); } [HttpGet] @@ -1055,6 +1058,8 @@ namespace AMESCoreStudio.Web.Controllers var user = await _sysApi.GetUserInfo(result[0].CreateUserID); var userName = user[0].UserName; ViewBag.UserName = userName; + var result1 = await _spcApi.GetInspectionForm(result.Select(s => s.InspectionFormID).FirstOrDefault()); + ViewBag.InspectionTypeID = result1[0].InspectionTypeID; return View(result[0]); } @@ -1418,20 +1423,28 @@ namespace AMESCoreStudio.Web.Controllers #endregion #region SPC005 報表 - public async Task SPC005_PDF(int id) + public async Task SPC005_PDF(int id,string Types) { string mimeType = ""; int extension = 1; Dictionary param = new Dictionary(); - var localReport = GetReprot(id); - var result = localReport.Result.Execute(RenderType.Pdf, extension, param, mimeType); - return File(result.MainStream, "application/pdf"); + if (Types == "IPQC") + { + var localReport = GetReprot(id); + var result = localReport.Result.Execute(RenderType.Pdf, extension, param, mimeType); + return File(result.MainStream, "application/pdf"); + } + else + { + var localReport = GetFAIReprot(id); + var result = localReport.Result.Execute(RenderType.Pdf, extension, param, mimeType); + return File(result.MainStream, "application/pdf"); + } } /// - /// 產生FQC報表 + /// 產生IPQC報表 /// - /// FQC單號 - /// FQC單號_編號 + /// IPQC報表 /// private async Task GetReprot(int id) { @@ -1576,6 +1589,114 @@ namespace AMESCoreStudio.Web.Controllers return localReport; } + /// + /// 產生首件報表 + /// + /// 首件單號 + /// + private async Task GetFAIReprot(int id) + { + var path = $"{this._env.WebRootPath}\\Reports\\SPC005ViewFAI.rdlc"; + LocalReport localReport = new LocalReport(path); + + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); + System.Text.Encoding.GetEncoding(1252); + var SPC005Master = new SPC005VIiew(); + IResultModel resultIpqcQuery; + resultIpqcQuery = _spcApi.GetFaiQuery(id).InvokeAsync().Result; + + + if (resultIpqcQuery.Data.Count() != 0) + { + var IPQCQuery = resultIpqcQuery.Data.FirstOrDefault(); + + SPC005Master = new SPC005VIiew() + { + InspectionNumber = IPQCQuery.InspectionNo, + OrderNumber = IPQCQuery.WipNo, + InspectionDate = IPQCQuery.InspectionDate.ToString("yyyy-MM-dd"), + ItemNo = IPQCQuery.ItemNo, + PlanQTY = IPQCQuery.PlanQTY.ToString(), + MedicalModel = IPQCQuery.CustomerMedical, + VIP = IPQCQuery.CustomerVIP, + BIOSVer = IPQCQuery.BIOS, + Approved = "陳信志", + Inspector = IPQCQuery.UpdateUser_Name, + ItemNoDesc = IPQCQuery.ItemNoDesc + + }; + + foreach (var item in IPQCQuery.IpqcDetail_ASSY) + { + SPC005Master.Detail1_ASSY.Add(new SPC005Detail1 + { + BarcodeNO = item.BarcodeNO, + Result = item.Result == "P" ? "PASS" : "FAIL", + Defect = item.Defect, + Station = item.Station + }); + } + + foreach (var item in IPQCQuery.qcItemDtos_ASSY) + { + SPC005Master.Detail2_ASSY.Add(new SPC005Detail2 + { + + SEQ = item.Seq.ToString(), + InspectionItemDesc = item.InspectionItemDesc, + InspectionResults = item.InspectionResult + }); + } + + + + #region 圖檔轉BASE64 + string ApprovedSign = null; + string InspectorSign = null; + if (System.IO.File.Exists($"{this._env.WebRootPath}/images/ElectronicSignature/{SPC005Master.Approved}.png")) + { + using (var b = new System.Drawing.Bitmap($"{this._env.WebRootPath}/images/ElectronicSignature/{SPC005Master.Approved}.png")) + { + using (var ms = new MemoryStream()) + { + b.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); + ApprovedSign = Convert.ToBase64String(ms.ToArray()); + } + } + } + if (System.IO.File.Exists($"{this._env.WebRootPath}/images/ElectronicSignature/{SPC005Master.Inspector}.png")) + { + using (var b = new System.Drawing.Bitmap($"{this._env.WebRootPath}/images/ElectronicSignature/{SPC005Master.Inspector}.png")) + { + using (var ms = new MemoryStream()) + { + b.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); + InspectorSign = Convert.ToBase64String(ms.ToArray()); + } + } + } + + SPC005Master.ApprovedSignImg = ApprovedSign; + SPC005Master.InspectorSignImg = InspectorSign; + #endregion + } + + var SPC005Masters = new List(); + SPC005Masters.Add(SPC005Master); + + + localReport.AddDataSource("DataSet1", SPC005Masters); + localReport.AddDataSource("DataSet2", SPC005Master.Detail1_ASSY); + localReport.AddDataSource("DataSet3", SPC005Master.Detail2_ASSY); + + localReport.AddDataSource("DataSet2_TEST", SPC005Master.Detail1_TEST); + localReport.AddDataSource("DataSet3_TEST", SPC005Master.Detail2_TEST); + + localReport.AddDataSource("DataSet2_PACK", SPC005Master.Detail1_PACK); + localReport.AddDataSource("DataSet3_PACK", SPC005Master.Detail2_PACK); + return localReport; + } + #endregion diff --git a/AMESCoreStudio.Web/HttpApis/AMES/ISPC.cs b/AMESCoreStudio.Web/HttpApis/AMES/ISPC.cs index b81750ea..2674928b 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/ISPC.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/ISPC.cs @@ -282,6 +282,12 @@ namespace AMESCoreStudio.Web ITask> GetIpqcQuery(int InspectionID); + /// + /// IPQC資料 + /// + /// + [WebApiClient.Attributes.HttpGet("api/InspectionResultMasters/FaiQuery/{InspectionID}")] + ITask> GetFaiQuery(int InspectionID); /// /// 根據ID獲取指定巡檢結果Masters /// diff --git a/AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml b/AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml index c75f830f..05819c69 100644 --- a/AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml +++ b/AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml @@ -35,10 +35,14 @@ + + + + diff --git a/AMESCoreStudio.Web/Views/BAS/BAS019U.cshtml b/AMESCoreStudio.Web/Views/BAS/BAS019U.cshtml index 44ed1ae6..3e3ca819 100644 --- a/AMESCoreStudio.Web/Views/BAS/BAS019U.cshtml +++ b/AMESCoreStudio.Web/Views/BAS/BAS019U.cshtml @@ -44,8 +44,10 @@
+ + diff --git a/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml index e08e5d9b..5f6d23b4 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS001R.cshtml @@ -1065,7 +1065,6 @@
-
@@ -1075,7 +1074,12 @@
- +
+ +
+ +
+
diff --git a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml index 49633912..6313ab3f 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS003.cshtml @@ -1114,7 +1114,6 @@
-
@@ -1124,6 +1123,12 @@
+
+ +
+ +
+
diff --git a/AMESCoreStudio.Web/Views/PCS/PCS034.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS034.cshtml index 08036d14..8d8c0173 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS034.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS034.cshtml @@ -1096,7 +1096,6 @@
-
@@ -1106,6 +1105,12 @@
+
+ +
+ +
+
diff --git a/AMESCoreStudio.Web/Views/SPC/SPC004.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC004.cshtml index 845d9f18..e6f2877f 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC004.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC004.cshtml @@ -220,12 +220,14 @@ }, { field: 'itemNo', - title: '料號' + title: '料號', + sort: true }, { field: 'statusNo', width: 100, - title: '狀態' + title: '狀態', + sort: true }, { field: 'createDate', @@ -242,7 +244,8 @@ else return "P"; // return "Total:" + d.detailItem + " Pass:" + d.detailPass + " Fail:" + d.detailFail + " N/A:" + d.detailNA; - } + }, + sort: true }, //{ // field: 'detailItem1', diff --git a/AMESCoreStudio.Web/Views/SPC/SPC005.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC005.cshtml index 72579ae6..5f2b914e 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC005.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC005.cshtml @@ -156,6 +156,7 @@ if (result.data) { $("#Form").empty(); $('#Form').append(new Option("請選擇", "")); + $('#Form').append(new Option("全部", "0")); var count = 0; $.each(result.data, function (index, item) { if (item.inspectionTypeID == data) { @@ -219,11 +220,13 @@ }, { field: 'itemNo', - title: '料號' + title: '料號', + sort: true }, { field: 'statusNo', - title: '狀態' + title: '狀態', + sort: true }, { field: 'createDate', @@ -240,7 +243,8 @@ else return "P"; // return "Total:" + d.detailItem + " Pass:" + d.detailPass + " Fail:" + d.detailFail + " N/A:" + d.detailNA; - } + }, + sort: true }, { align: 'center', title: '操作', width: 150, fixed: 'right', @@ -255,6 +259,9 @@ if ($("#Type").val() == 1001) { btns = btns + 'PDF '; } + if ($("#Type").val() == 1000 || $("#Type").val() == 1002) { + btns = btns + 'PDF '; + } } @@ -266,7 +273,13 @@ function PDF(obj) { if (obj.data.inspectionID) { - hg.open('PDF', '/SPC/SPC005_PDF?id=' + obj.data.inspectionID , '', '', true); + hg.open('PDF', '/SPC/SPC005_PDF?id=' + obj.data.inspectionID +"&Types=IPQC" , '', '', true); + } + } + + function PDF_FAI(obj) { + if (obj.data.inspectionID) { + hg.open('PDF', '/SPC/SPC005_PDF?id=' + obj.data.inspectionID + "&Types=FAI", '', '', true); } } @@ -312,7 +325,7 @@ class: 'layui-btn-normal', handler: function () { var form = $("#Form").val(); - if (form != -99) { + if (form != -99 && form != 0) { hg.open('新增巡檢結果', '/SPC/SPC005C/' + form, '', '', true); } else { diff --git a/AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml index a24f8ec4..7b81d5b6 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml @@ -121,6 +121,10 @@
*@
+ @if (ViewBag.InspectionTypeID == 1000) + { + QO4-067 + }
diff --git a/AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml index 71dd54dd..1371396c 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml @@ -126,6 +126,10 @@ *@
+ @if (ViewBag.InspectionTypeID == 1000) + { + QO4-067 + }
diff --git a/AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml index 762ee785..4f1796c7 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml @@ -57,6 +57,10 @@ @Html.ValidationMessage("error")
+ @if (ViewBag.InspectionTypeID == 1000) + { + QO4-067 + }
diff --git a/AMESCoreStudio.Web/wwwroot/Reports/SPC005ViewFAI.rdlc b/AMESCoreStudio.Web/wwwroot/Reports/SPC005ViewFAI.rdlc new file mode 100644 index 00000000..bcdfde68 --- /dev/null +++ b/AMESCoreStudio.Web/wwwroot/Reports/SPC005ViewFAI.rdlc @@ -0,0 +1,1530 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + e0dcb4ed-57fb-41b0-a865-d53383fc0026 + + + + + + Accessory + /* Local Query */ + + + + Approved + System.String + + + Inspector + System.String + + + PlanQTY + System.String + + + BIOSVer + System.String + + + InspectionDate + System.String + + + InspectionNumber + System.String + + + MedicalModel + System.String + + + ItemNo + System.String + + + ItemNoDesc + System.String + + + OrderNumber + System.String + + + VIP + System.String + + + ApprovedSignImg + System.String + + + InspectorSignImg + System.String + + + + Accessory + FQC010VIiew + Accessory.FQC010VIiew, Accessory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + Accessory + /* Local Query */ + + + + BarcodeNO + System.String + + + Result + System.String + + + Defect + System.String + + + Station + System.String + + + + Accessory + FQC010VIiew + Detail1 + Accessory.FQC010VIiew, Accessory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + Accessory + /* Local Query */ + + + + InspectionResults + System.String + + + InspectionItemDesc + System.String + + + SEQ + System.String + + + + Accessory + FQC010VIiew + Detail2 + Accessory.FQC010VIiew, Accessory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + Accessory + /* Local Query */ + + + + BarcodeNO + System.String + + + Result + System.String + + + Defect + System.String + + + + Accessory + FQC010VIiew + Detail1 + Accessory.FQC010VIiew, Accessory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + Accessory + /* Local Query */ + + + + InspectionResults + System.String + + + InspectionItemDesc + System.String + + + SEQ + System.String + + + + Accessory + FQC010VIiew + Detail2 + Accessory.FQC010VIiew, Accessory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + Accessory + /* Local Query */ + + + + BarcodeNO + System.String + + + Result + System.String + + + Defect + System.String + + + + Accessory + FQC010VIiew + Detail1 + Accessory.FQC010VIiew, Accessory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + Accessory + /* Local Query */ + + + + InspectionResults + System.String + + + InspectionItemDesc + System.String + + + SEQ + System.String + + + + Accessory + FQC010VIiew + Detail2 + Accessory.FQC010VIiew, Accessory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + + + + + + + + + true + true + + + + + Inspection Date: + + + + Textbox1 + 1.36409cm + 0.30622cm + 0.60324cm + 4.68409cm + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 工單/委外廠單號: + + + + + + + Textbox1 + 1.96733cm + 0.30622cm + 0.60324cm + 4.68409cm + 1 + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 料號: + + + + + + + Textbox1 + 2.57057cm + 0.30622cm + 0.60324cm + 4.68409cm + 2 + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 數量: + + + + + + + Textbox1 + 3.17381cm + 0.30622cm + 0.60324cm + 4.68409cm + 3 + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 產品首件檢查表 + + + + + + + Textbox44 + 0.10583cm + 9.15951cm + 1.24355cm + 9.71299cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + QQ4-067 + + + + + + + Textbox45 + 0.5147cm + 21.48352cm + 0.61419cm + 2.4633cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Rev.A7 + + + + + + + Textbox45 + 0.5147cm + 26.8639cm + 0.61419cm + 1.81031cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =First(Fields!InspectionDate.Value, "DataSet1") + + + + + 0.5pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =First(Fields!OrderNumber.Value, "DataSet1") + + 0.5pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =First(Fields!ItemNo.Value, "DataSet1") + + + + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =First(Fields!PlanQTY.Value, "DataSet1") + + + + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + avalue + FitProportional + 0.10583cm + 1.92953cm + 1.14483cm + 5.40124cm + 11 + + + + + + true + true + + + + + =First(Fields!Station.Value, "DataSet2") + + + + + + + Textbox45 + 4.19762cm + 0.30622cm + 0.61419cm + 28.36799cm + 12 + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + DodgerBlue + 2pt + 2pt + 2pt + 2pt + + + + + + + 7.97752cm + + + 2.8473cm + + + 17.54318cm + + + + + 0.62117cm + + + + + true + true + + + + + 抽驗序號 + + + + Textbox38 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 檢驗結果 + + + + Textbox40 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Defect description + + + + Textbox42 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.62117cm + + + + + true + true + + + + + =Fields!BarcodeNO.Value + + + + ItemID + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Result.Value + + + + ItemName + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Defect.Value + + + + ItemType + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet2 + 5.15641cm + 0.30622cm + 1.24234cm + 28.368cm + 13 + + + + + + + + + 2.06048cm + + + 12.45692cm + + + 1.74015cm + + + + + 0.6cm + + + + + true + true + + + + + =Fields!SEQ.Value + + + + ProductionSerialNumber1 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!InspectionItemDesc.Value + + + + ShippingSerialNumber + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!InspectionResults.Value + + + + InspectionResults + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + DataSet3 + 6.78923cm + 6.27126cm + 0.6cm + 16.25755cm + 14 + + + + + + true + true + + + + + Inspector: + + + + + + + Textbox76 + 8.57413cm + 17.11939cm + 1.00557cm + 3.14055cm + 15 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + Database + =First(Fields!InspectorSignImg.Value, "DataSet1") + image/png + FitProportional + 8.57413cm + 22.75795cm + 1.00557cm + 5.06959cm + 16 + + + + + + true + + + + + Approved: + + + + + + + Textbox76 + 8.57413cm + 7.31026cm + 1.00557cm + 2.99263cm + 17 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =First(Fields!Approved.Value, "DataSet1") + + + + + + + 8.57413cm + 10.26761cm + 1.00557cm + 4.594cm + 18 + + =iif(IsNothing(First(Fields!ApprovedSignImg.Value, "DataSet1")),False,True) + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + Database + =First(Fields!ApprovedSignImg.Value, "DataSet1") + image/png + FitProportional + 8.57413cm + 12.27991cm + 1.00557cm + 4.60783cm + 19 + + + + + + true + true + + + + + =First(Fields!Inspector.Value, "DataSet1") + + + + + + + 8.57413cm + 20.40104cm + 1.00557cm + 4.594cm + 20 + + =iif(IsNothing(First(Fields!ApprovedSignImg.Value, "DataSet1")), False, True) + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =First(Fields!ItemNoDesc.Value, "DataSet1") + + + + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + 2pt + 2pt + 2pt + 2pt + + + + true + 0.30801cm + 0.19832cm + 10.18936cm + 29.26494cm + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + Black + + 0.5pt + + + + + 4.24086in +