diff --git a/AMESCoreStudio.Web/AMESCoreStudio.Web.csproj b/AMESCoreStudio.Web/AMESCoreStudio.Web.csproj index eb3741b8..8d048742 100644 --- a/AMESCoreStudio.Web/AMESCoreStudio.Web.csproj +++ b/AMESCoreStudio.Web/AMESCoreStudio.Web.csproj @@ -39,6 +39,7 @@ + diff --git a/AMESCoreStudio.Web/Controllers/FQCController.cs b/AMESCoreStudio.Web/Controllers/FQCController.cs index 3f0b0f05..980f13ac 100644 --- a/AMESCoreStudio.Web/Controllers/FQCController.cs +++ b/AMESCoreStudio.Web/Controllers/FQCController.cs @@ -19,6 +19,8 @@ using System.IO; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Hosting; using System.ComponentModel.DataAnnotations; +using AspNetCore.Reporting; +using System.Text.Encodings; namespace AMESCoreStudio.Web.Controllers { @@ -1287,6 +1289,96 @@ namespace AMESCoreStudio.Web.Controllers } #endregion + #region FQC010 報表 + public ActionResult FQC010() + { + string mimeType = ""; + int extension = 1; + var path = $"{this._env.WebRootPath}\\Reports\\View.rdlc"; + LocalReport localReport = new LocalReport(path); + Dictionary param = new Dictionary(); + System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); + System.Text.Encoding.GetEncoding(1252); + var FQC010Master = new FQC010VIiew + { + DefectDescription = "N/A", + InspectionDate = "2022/06/30", + AC = "0", + Approved = "王曉明", + AQL = "2.5", + SpeciallyAdoption = "特採Specially Adoption", + BIOSVer = "2.04A CS:7672H", + ECN = "22N0202", + ECNMemo = "工單生產已是最新ECN", + Factory = "YS00", + FactoryRemark = "N/A", + InspectionInstrumentNumber = "N/A", + InspectionItems = "OS:[Win10 IoT]CPU test:[1.10G] RAM test:[4096]", + InspectionNumber = "Q944000114000001", + InspectionStatus = "廠驗", + InspectionType = "First Insp.", + Inspector = "蔡喬虎", + Judgment = "Defect Quantity", + Line = "安勤產線", + LotSize = "1", + Major = "0", + MedicalModel = "N", + Minor = "1", + Model = "CAXA0-1000A1-S01R", + ModelName = "CAXA0 w/N3350/4G RAM/64G SSD/NFC", + NOTE = @"ACC-M2 + E1589 + ESW-075R + ACC-BAT", + OrderNumber = "9440001400", + Product99 = "一般二級水準正常檢驗", + ReMajor = "1", + Sample = "5", + SamplingInspectionPlan = "ANSI/ASQZ 1.4II", + StorageLocation = "9000", + Avalue = "AVALUE", + VIP = "N", + WaiveRequisition = "XX", + Detail1 = new List{ + new FQC010Detail1 + { + ItemID = "1", + ItemName = "AA", + ItemType = "Major" + }, + new FQC010Detail1{ + ItemID = "2", + ItemName = "BB", + ItemType = "Major" + }, + new FQC010Detail1{ + ItemID = "2", + ItemName = "BB", + ItemType = "Major" + }}, + Detail2 = new List + { + new FQC010Detail2 + { + ShippingSerialNumber= "AAAAAAAAAAAAAAAA", + IsSample ="Y", + ProductionSerialNumber = "DASKJDKLFJS", + InspectionResults = "1" + }} + }; + + var FQC010Masters = new List(); + FQC010Masters.Add(FQC010Master); + + localReport.AddDataSource("DataSet1", FQC010Masters); + localReport.AddDataSource("DataSet2", FQC010Master.Detail1); + localReport.AddDataSource("DataSet3", FQC010Master.Detail2); + + var result = localReport.Execute(RenderType.Pdf, extension, param, mimeType); + return File(result.MainStream, "application/pdf"); + } + #endregion + /// /// 登入UserID /// diff --git a/AMESCoreStudio.Web/ViewModels/EFC/EFC010ViewModel.cs b/AMESCoreStudio.Web/ViewModels/EFC/EFC010ViewModel.cs new file mode 100644 index 00000000..2696caea --- /dev/null +++ b/AMESCoreStudio.Web/ViewModels/EFC/EFC010ViewModel.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using AMESCoreStudio.WebApi.Models.AMES; +using AMESCoreStudio.WebApi.Models.BAS; +using System.ComponentModel.DataAnnotations; + +namespace AMESCoreStudio.Web.ViewModels.EFC +{ + class EFC010ViewModel + { + /// + /// 舊條碼 + /// + [Required(ErrorMessage = "{0},不能空白")] + [Display(Name = "舊條碼")] + public string BarCodeNoOld { get; set; } + + /// + /// 新條碼 + /// + [Required(ErrorMessage = "{0},不能空白")] + [Display(Name = "新條碼")] + public string BarCodeNoNew { get; set; } + + /// + /// 置換類型 + /// + [Display(Name = "置換類型")] + public string ChangeType { get; set; } + + /// + /// 備註 + /// + public string Memo { get; set; } + + + } +} diff --git a/AMESCoreStudio.Web/Views/FQC/FQC010.cshtml b/AMESCoreStudio.Web/Views/FQC/FQC010.cshtml new file mode 100644 index 00000000..5b1399d7 --- /dev/null +++ b/AMESCoreStudio.Web/Views/FQC/FQC010.cshtml @@ -0,0 +1,18 @@ +@{ + ViewData["Title"] = "TEST RDLC"; + Layout = "~/Views/Shared/_AMESLayout.cshtml"; +} + +
+
+
+
+
@ViewBag.Title
+
+
+
+ +
+ +
+
\ No newline at end of file diff --git a/AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/System.Text.Encoding.CodePages.dll b/AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/System.Text.Encoding.CodePages.dll new file mode 100644 index 00000000..2df088f9 Binary files /dev/null and b/AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/System.Text.Encoding.CodePages.dll differ diff --git a/AMESCoreStudio.Web/wwwroot/Reports/View.rdlc b/AMESCoreStudio.Web/wwwroot/Reports/View.rdlc new file mode 100644 index 00000000..4b29cda9 --- /dev/null +++ b/AMESCoreStudio.Web/wwwroot/Reports/View.rdlc @@ -0,0 +1,2116 @@ + + + + + + + + 1.03188cm + 0cm + 28.14731cm + + + + + + 1.82298cm + 0cm + 28.14731cm + 1 + + + + + + 2.69081cm + 0cm + 28.14731cm + 2 + + + + + + 3.5216cm + 0cm + 28.14731cm + 3 + + + + + + 4.37885cm + 0cm + 28.14731cm + 4 + + + + + + 5.27844cm + 0cm + 28.14731cm + 5 + + + + + + 6.1251cm + 0cm + 28.14731cm + 6 + + + + + + 7.03081cm + 0.00077cm + 0cm + 28.14731cm + 7 + + + + + + 1.03188cm + 3.86292cm + 5.98804cm + 0cm + 8 + + + + + + 1.03187cm + 8.88357cm + 5.99894cm + 0cm + 9 + + + + + + 2.69081cm + 10.98021cm + 4.3291cm + 0cm + 10 + + + + + + 2.69081cm + 14.12875cm + 0.83079cm + 0cm + 11 + + + + + + 2.66868cm + 16.93214cm + 0.85292cm + 0cm + 12 + + + + + + 2.66868cm + 18.97062cm + 4.35122cm + 0cm + 13 + + + + + + 2.66868cm + 22.53721cm + 3.45642cm + 0cm + 14 + + + + + + true + true + + + + + Inspection number: + + + + Textbox1 + 1.09313cm + 0.25801cm + 0.58649cm + 3.42194cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Model Name: + + + + Textbox1 + 1.93587cm + 0.23284cm + 0.58649cm + 3.42194cm + 16 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Order number: + + + + Textbox1 + 2.76485cm + 0.25801cm + 0.58649cm + 3.42194cm + 17 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Inspection Type: + + + + Textbox1 + 3.64635cm + 0.28447cm + 0.58649cm + 3.42194cm + 18 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + sampling inspection plan: + + + + Textbox1 + 4.53535cm + 0.25801cm + 0.58649cm + 3.42194cm + 19 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 成品99: + + + + Textbox1 + 5.38422cm + 0.25801cm + 0.58649cm + 3.42194cm + 20 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Judgment: + + + + Textbox1 + 6.26793cm + 0.23812cm + 0.58649cm + 3.42194cm + 21 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lot Size: + + + + Textbox1 + 2.82928cm + 8.9894cm + 0.58649cm + 1.88497cm + 22 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + BIOS Ver: + + + + Textbox1 + 3.6781cm + 8.88357cm + 0.58649cm + 1.99081cm + 23 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Factory: + + + + Textbox1 + 4.53535cm + 8.9894cm + 0.58649cm + 1.88497cm + 24 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AQL: + + + + Textbox1 + 5.38422cm + 8.9894cm + 0.58649cm + 1.88497cm + 25 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Major: + + + + Textbox1 + 6.26793cm + 8.9894cm + 0.58649cm + 1.88497cm + 26 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Medical model: + + + + Textbox1 + 2.78474cm + 14.30514cm + 0.58649cm + 2.74901cm + 27 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sample: + + + + Textbox1 + 5.40411cm + 14.30514cm + 0.58649cm + 2.74901cm + 28 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Minor: + + + + Textbox1 + 6.26793cm + 14.32503cm + 0.58649cm + 2.74901cm + 29 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + VIP?: + + + + Textbox1 + 2.79664cm + 19.05176cm + 0.58649cm + 3.42194cm + 30 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ECN: + + + + Textbox1 + 3.64635cm + 19.05176cm + 0.58649cm + 3.42194cm + 31 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Storage Location: + + + + Textbox1 + 4.5085cm + 19.05176cm + 0.58649cm + 3.42194cm + 32 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AC: + + + + Textbox1 + 5.37893cm + 19.05176cm + 0.58649cm + 3.42194cm + 33 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =First(Fields!Product99.Value, "DataSet1") + + + 2pt + 2pt + 2pt + 2pt + + + + + + 0.87312cm + 0cm + 25.74323cm + + + + + + 1.77826cm + 0.02646cm + 0cm + 25.74323cm + 1 + + + + + + 3.60668cm + 0.01324cm + 0cm + 25.74323cm + 2 + + + + + + 4.56145cm + 0.01324cm + 0cm + 25.74323cm + 3 + + + + + + 5.00063cm + 5.53635cm + 0cm + 4 + + + + + + true + true + + + + + NOTE: + + + + Textbox33 + 1.00187cm + 0.02647cm + 0.6cm + 4.90361cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Factory remark: + + + + Textbox33 + 1.92365cm + 0.02647cm + 0.6cm + 4.90361cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ECN Memo: + + + + Textbox33 + 2.82315cm + 0.02647cm + 0.6cm + 4.90361cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Inspection instrument number: + + + + Textbox33 + 3.75693cm + 0.06175cm + 0.6cm + 4.93889cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Inspection Items: + + + + Textbox33 + 4.74697cm + 0.02647cm + 0.6cm + 4.90361cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + 2.6882cm + 0.01324cm + 0cm + 25.74323cm + 10 + + + + + + true + 7.30635cm + 0.23812cm + 5.53635cm + 25.76969cm + 35 + + + + + + true + true + + + + + Defect Description: + + + + Textbox32 + 7.38047cm + 0.26459cm + 0.6cm + 4.90361cm + 36 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.5cm + + + 2.5cm + + + 2.5cm + + + + + 0.6cm + + + + + true + true + + + + + Item ID + + + + Textbox38 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Item Name + + + + Textbox40 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Item Type + + + + Textbox42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!ItemID.Value + + + + ItemID + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ItemName.Value + + + + ItemName + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ItemType.Value + + + + ItemType + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet2 + 13.02965cm + 0.29987cm + 1.2cm + 7.5cm + 37 + + + + + + + + + 3.99547cm + + + 4.4096cm + + + 2.78679cm + + + 3.53533cm + + + + + 0.6cm + + + + + true + true + + + + + Shipping Serial Number + + + + Textbox47 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Production Serial Number + + + + Textbox49 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Is Sample + + + + Textbox51 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Inspection Results + + + + Textbox53 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!ShippingSerialNumber.Value + + + + ShippingSerialNumber + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ProductionSerialNumber.Value + + + + ProductionSerialNumber + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!IsSample.Value + + + + IsSample + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!InspectionResults.Value + + + + InspectionResults + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet3 + 14.66776cm + 0.29987cm + 1.2cm + 14.72719cm + 38 + + + + + + 16.17566cm + 0.00077cm + 0cm + 28.14731cm + 39 + + + + + + + + 2.69365cm + 0.75145cm + 0cm + + + + + + 5.78262cm + 0.75145cm + 0cm + 1 + + + + + + 8.64012cm + 0.75145cm + 0cm + 2 + + + + + + true + true + + + + + =First(Fields!Approved.Value, "DataSet1") + + + + Approved + 0.05942cm + 2.79949cm + 0.6cm + 2.84202cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =First(Fields!Inspector.Value, "DataSet1") + + + + Inspector + 0.05942cm + 8.70854cm + 0.6cm + 2.80888cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Inspector: + + + + Textbox76 + 0.05942cm + 5.72754cm + 0.6cm + 2.83989cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Approved: + + + + Textbox76 + 0.05942cm + 0.01575cm + 0.6cm + 2.60735cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 16.34131cm + 7.65271cm + 0.75145cm + 11.53011cm + 40 + + + + + + 4.37885cm + 14.12875cm + 2.64106cm + 0cm + 41 + + + + + + 5.27844cm + 16.93214cm + 1.75237cm + 0cm + 42 + + + + + + true + 0.34078cm + 0.34078cm + 17.23924cm + 28.68288cm + + + + + + 7.02357in +