diff --git a/AMESCoreStudio.Web/Controllers/FQCController.cs b/AMESCoreStudio.Web/Controllers/FQCController.cs index f97f5ffd..c4426d2a 100644 --- a/AMESCoreStudio.Web/Controllers/FQCController.cs +++ b/AMESCoreStudio.Web/Controllers/FQCController.cs @@ -647,11 +647,11 @@ namespace AMESCoreStudio.Web.Controllers return View("FQC005U", model); } - [ResponseCache(Duration = 0)] + [HttpGet] - public async Task FQC005QueryAsync(int quotID = 0, int page = 0, int limit = 10) + public async Task FQC005QueryAsync(int quotID = 0 , string AQLType = "", int QCQty = 0, int page = 0, int limit = 10) { - var result = await _fqcApi.GetQcCriterionQuery(quotID, page, limit); + var result = await _fqcApi.GetQcCriterionQuery(quotID, AQLType, QCQty , page, limit); if (result.Data.Count() != 0) { @@ -1270,6 +1270,22 @@ namespace AMESCoreStudio.Web.Controllers } #endregion + #region FQC細項資料 + /// + /// QC 抽驗細項 + /// + /// AQL類型 + /// 批量檢驗數 + /// + [HttpGet] + public IActionResult FQC007E(string AQLType, int QCQty) + { + ViewBag.AQLType = AQLType; + ViewBag.QCQty = QCQty; + return View(); + } + #endregion + #endregion #region FQC008 FQC查詢 diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IFQC.cs b/AMESCoreStudio.Web/HttpApis/AMES/IFQC.cs index ee45fbae..fe74b5b4 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/IFQC.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/IFQC.cs @@ -204,11 +204,13 @@ namespace AMESCoreStudio.Web /// 查詢抽驗標準維護 /// /// 抽驗係數ID + /// AQL類型 + /// 批量 /// 頁數 /// /// [WebApiClient.Attributes.HttpGet("api/QcCriterion/QcCriterionQuery")] - ITask> GetQcCriterionQuery(int quotID, int page, int limit); + ITask> GetQcCriterionQuery(int quotID, string AQLType , int QCQty, int page, int limit); /// /// 查詢抽驗標準維護 ID diff --git a/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml b/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml index 3dfa9856..57137e1e 100644 --- a/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml +++ b/AMESCoreStudio.Web/Views/FQC/FQC007.cshtml @@ -31,9 +31,10 @@ @**@ - - SMS異常紀錄 - QAZone異常紀錄 + @@ -123,10 +124,19 @@
- + +
+ +
+ +
- +
@@ -550,6 +560,29 @@ }); } + // OpenQC + function openQC() { + layui.use('layer', function () { + var layer = layui.layer; + layer.open({ + title: 'QC', + type: 2, + area: ['700px', '500px'], + btn:['確定','取消'], + fixed: false, //不固定 + maxmin: false, + content: '/FQC/FQC007E?AQLType=@Model.AQLType&QCQty=@Model.InhouseQty', + yes: function (index, layero) { + //var body = layer.getChildFrame('body', index); + var obj = layero.find("iframe")[0].contentWindow; + //@Model.AQL = obj.$("#aql").val(); + console.log(obj.$("#critID").val()); + layer.close(index); + } + }); + }); + } + $(document).ready(function () { var error = '@Html.ValidationMessage("error")'; $("#CustomerMedical").attr("disabled", "disabled"); diff --git a/AMESCoreStudio.Web/Views/FQC/FQC007E.cshtml b/AMESCoreStudio.Web/Views/FQC/FQC007E.cshtml new file mode 100644 index 00000000..1c2fa046 --- /dev/null +++ b/AMESCoreStudio.Web/Views/FQC/FQC007E.cshtml @@ -0,0 +1,93 @@ +@{ + Layout = "~/Views/Shared/_AMESLayout.cshtml"; } + + + +
+
+ + + + + + + + +
+ +
+
+ + @Html.ValidationMessage("error") + @*
+
+ +
+
*@ + +
+
+ +@section Scripts { + @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); + await Html.RenderPartialAsync("_FileinputScriptsPartial"); } + + +} diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs index f16b73ab..feeb5fbd 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs @@ -216,9 +216,6 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES ModelNo = q1.ModelNo, InhouseQty = q1.InhouseQty, SpecialPo = q2.SpecialPo, - QcQty = q3.QcQty, - AcQty = q3.AcQty, - ReQty = q3.ReQty, StatusName = q1.Status == "P" ? "允收Pass" : q1.Status == "R" ? "批退Reject" : "", FqcID = q2.WipNo == null ? 0 : q2.FqcID, InhouseMemo = q2.InhouseMemo, @@ -242,8 +239,19 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES InspectionType = q2.InspectionType, MajorQty = q2.MajorQty, MinorQty = q2.MinorQty, - EndTime = q2.EndTime.ToString("yyyy/MM/dd") - + WipECN = q4.GetWipAtt.ECN, + EndTime = q2.EndTime.ToString("yyyy/MM/dd"), + //QuotDescription = q3.GetQcQuot.QuotDescription, + CritID = q3.CritID, + QcQty = q3.QcQty, + AcQty = q3.AcQty, + ReQty = q3.ReQty, + //AQL = q3.GetQcQuot.Aql, + //AQLType = q3.GetQcQuot.AqlType, + PLMECN = q2.PLM_ECN, + ECN_Memo = q2.ECN_Memo, + Note = q2.Note, + InspectionStatus = q2.InspectionStatus }; var query = await q.Distinct().ToListAsync(); diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/QcCriterionController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/QcCriterionController.cs index edf2902a..c89bbaf9 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/QcCriterionController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/QcCriterionController.cs @@ -79,8 +79,17 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES return 0; } + /// + /// 查詢抽驗標準維護 + /// + /// 抽驗係數ID + /// AQL類型 + /// 批量 + /// 頁數 + /// + /// [HttpGet("QcCriterionQuery")] - public async Task> GetQcCriterionQuery(int quotID = 0, int page = 0, int limit = 10) + public async Task> GetQcCriterionQuery(int quotID = 0, string AQLType = "", int QCQty = 0, int page = 0, int limit = 10) { ResultModel result = new ResultModel(); @@ -97,6 +106,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES AcQty = q2.AcQty, ReQty = q2.ReQty, QcQty = q2.QcQty, + QcStart = q2.QcStart, + QcEnd = q2.QcEnd, IntervalNumber = q2.QcStart + " ~ " + q2.QcEnd, QuotName = q2.GetQcQuot.QuotName, CreateDate = q2.CreateDate, @@ -108,6 +119,12 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES if (quotID != 0) q = q.Where(w => w.QuotID == quotID); + if (!string.IsNullOrWhiteSpace(AQLType)) + q = q.Where(w => w.AqlType == AQLType); + + if (QCQty != 0) + q = q.Where(w => w.QcStart <= QCQty && w.QcEnd >= QCQty); + // 紀錄筆數 result.DataTotal = q.Count(); @@ -119,8 +136,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES result.Data = await q.ToListAsync(); result.Data.Select(s => s.AqlType = - EnumFQC.GetDisplayName((EnumFQC.EnumAQL_Type)System.Enum.Parse(typeof(EnumFQC.EnumAQL_Type), s.AqlType))) - .ToList(); + EnumFQC.GetDisplayName((EnumFQC.EnumAQL_Type)System.Enum.Parse(typeof(EnumFQC.EnumAQL_Type), s.AqlType))) + .ToList(); return result; } diff --git a/AMESCoreStudio.WebApi/DTO/AMES/FqcDto.cs b/AMESCoreStudio.WebApi/DTO/AMES/FqcDto.cs index fb08a97e..960c5634 100644 --- a/AMESCoreStudio.WebApi/DTO/AMES/FqcDto.cs +++ b/AMESCoreStudio.WebApi/DTO/AMES/FqcDto.cs @@ -115,7 +115,6 @@ namespace AMESCoreStudio.WebApi.DTO.AMES [Display(Name = "PASS數量")] public int PassQty { get; set; } = 0; - /// /// 不良數 /// @@ -123,6 +122,34 @@ namespace AMESCoreStudio.WebApi.DTO.AMES [Display(Name = "不良數")] public int FailQty { get; set; } = 0; + /// + /// CritID + /// + [DataMember] + [Display(Name = "抽驗係數ID")] + public int CritID { get; set; } = 0; + + /// + /// AQL + /// + [DataMember] + [Display(Name = "AQL")] + public double AQL { get; set; } = 0; + + /// + /// AQL 描述 + /// + [DataMember] + [Display(Name = "AQL 描述")] + public string QuotDescription { get; set; } + + /// + /// AQL類型 + /// + [DataMember] + [Display(Name = "AQL類型")] + public string AQLType { get; set; } + /// /// 允收數量 /// @@ -194,7 +221,6 @@ namespace AMESCoreStudio.WebApi.DTO.AMES ///
[DataMember] [Display(Name = "OS")] - [StringLength(20)] public string OS { get; set; } /// @@ -293,6 +319,41 @@ namespace AMESCoreStudio.WebApi.DTO.AMES [DataMember] public int MinorQty { get; set; } + /// + /// Wip_ECN + /// + [NotMapped] + [DataMember] + public string WipECN { get; set; } + + /// + /// PLM_ECN + /// + [NotMapped] + [DataMember] + public string PLMECN { get; set; } + + /// + /// ECN_Memo + /// + [NotMapped] + [DataMember] + public string ECN_Memo { get; set; } + + /// + /// NOTE + /// + [NotMapped] + [DataMember] + public string Note { get; set; } + + /// + /// 檢驗地方 A:廠驗 B:委外 C:免驗 + /// + [NotMapped] + [DataMember] + public string InspectionStatus { get; set; } + public List fqcDetails { get; set; } /// diff --git a/AMESCoreStudio.WebApi/DTO/AMES/QcCriterionDto.cs b/AMESCoreStudio.WebApi/DTO/AMES/QcCriterionDto.cs index 00fd5fa6..7f8cbb95 100644 --- a/AMESCoreStudio.WebApi/DTO/AMES/QcCriterionDto.cs +++ b/AMESCoreStudio.WebApi/DTO/AMES/QcCriterionDto.cs @@ -44,7 +44,17 @@ namespace AMESCoreStudio.WebApi.DTO.AMES public string CritNo { get; set; } /// - /// 抽樣點數 + /// 抽樣_起始數量 + /// + public int QcStart { get; set; } + + /// + /// 抽樣_結束數量 + /// + public int QcEnd { get; set; } + + /// + /// 抽樣點數 起始數量 ~ 結束數量 /// public string IntervalNumber { get; set; } diff --git a/AMESCoreStudio.WebApi/Models/AMES/FqcResultMaster.cs b/AMESCoreStudio.WebApi/Models/AMES/FqcResultMaster.cs index 454f3172..9f4250db 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/FqcResultMaster.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/FqcResultMaster.cs @@ -306,5 +306,37 @@ namespace AMESCoreStudio.WebApi.Models.AMES [Required(ErrorMessage = "{0},不能空白")] [Column("MINOR_QTY")] public int MinorQty { get; set; } = 0; + + /// + /// NOTE + /// + [DataMember] + [Display(Name = "NOTE")] + [Column("NOTE")] + public string Note { get; set; } + + /// + /// ECN_MEMO + /// + [DataMember] + [Display(Name = "ECN_MEMO")] + [Column("ECN_MEMO")] + public string ECN_Memo { get; set; } + + /// + /// PLM_ECN + /// + [DataMember] + [Display(Name = "PLM_ECN")] + [Column("PLM_ECN")] + public string PLM_ECN { get; set; } + + /// + /// 檢驗地方 A:廠驗 B:委外 C:免驗 + /// + [DataMember] + [Display(Name = "PLM_ECN")] + [Column("INSPECTION_STATUS")] + public string InspectionStatus { get; set; } } } diff --git a/AMESCoreStudio.WebApi/Models/AMES/QcCriterion.cs b/AMESCoreStudio.WebApi/Models/AMES/QcCriterion.cs index b2961e9a..2b33e8d6 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/QcCriterion.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/QcCriterion.cs @@ -125,6 +125,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES /// 抽驗係數資料 /// [ForeignKey("QuotID")] + [NotMapped] public virtual QcQuot GetQcQuot { get; set; } } } diff --git a/開發文件/QC/DB異動/Table更新.txt b/開發文件/QC/DB異動/Table更新.txt index 71325e80..e06c2ecb 100644 --- a/開發文件/QC/DB異動/Table更新.txt +++ b/開發文件/QC/DB異動/Table更新.txt @@ -1,16 +1,17 @@ QC_ITEM == TYPE 類型 +--------------------------------------------- ALTER TABLE QC_ITEM -ADD TYPE VARCHAR2(10) ); +ADD TYPE VARCHAR2(10); COMMENT ON COLUMN QC_ITEM.TYPE IS '類型'; - +--------------------------------------------- FQC_RESULT_MASTER == 批退紀錄 Major 數量 Minor 數量 FQC_RESULT_MASTER == 抽樣計畫允收標準 - +--------------------------------------------- ALTER TABLE FQC_RESULT_MASTER ADD (INSPECTION_TYPE VARCHAR2(10) DEFAULT 'A' ); @@ -26,4 +27,26 @@ ADD (MINOR_QTY NUMBER DEFAULT 0 NOT NULL); COMMENT ON COLUMN FQC_RESULT_MASTER.MAJOR_QTY IS '主要的'; -COMMENT ON COLUMN FQC_RESULT_MASTER.MINOR_QTY IS '輕微的'; \ No newline at end of file +COMMENT ON COLUMN FQC_RESULT_MASTER.MINOR_QTY IS '輕微的'; + +---------------------------------------------- + +ALTER TABLE FQC_RESULT_MASTER +ADD (NOTE VARCHAR2(500) ); + +ALTER TABLE FQC_RESULT_MASTER +ADD (ECN_MEMO VARCHAR2(500) ); + +ALTER TABLE FQC_RESULT_MASTER +ADD (PLM_ECN VARCHAR2(100) ); + +ALTER TABLE FQC_RESULT_MASTER +ADD (INSPECTIONSTATUS VARCHAR2(20) NOT NULL); + +COMMENT ON COLUMN FQC_RESULT_MASTER.NOTE IS 'NOTE'; + +COMMENT ON COLUMN FQC_RESULT_MASTER.ECN_MEMO IS 'ECN_MEMO'; + +COMMENT ON COLUMN FQC_RESULT_MASTER.PLM_ECN IS 'PLM_ECN'; + +COMMENT ON COLUMN FQC_RESULT_MASTER.INSPECTIONSTATUS IS '檢驗地方 A:廠驗 B:委外 C:免驗'; \ No newline at end of file