diff --git a/AMESCoreStudio.Web/Controllers/FQCController.cs b/AMESCoreStudio.Web/Controllers/FQCController.cs index 0464d6c9..b8189b17 100644 --- a/AMESCoreStudio.Web/Controllers/FQCController.cs +++ b/AMESCoreStudio.Web/Controllers/FQCController.cs @@ -2230,6 +2230,19 @@ namespace AMESCoreStudio.Web.Controllers public async Task FQC012DAsync(string inhouseNo, int seq) { + var FqcResultMaster = await _fqcApi.GetFqcResultMasterByInhouseNo(inhouseNo, seq); + if (FqcResultMaster.Count > 0) + { + int FQCID = FqcResultMaster.Select(s => s.FqcID).FirstOrDefault(); + var FqcResultDetail = await _fqcApi.GetFqcResultDetail(FQCID); + foreach (var item in FqcResultDetail) + { + await _fqcApi.DeleteFqcResultDetail(item.BarcodeNo, inhouseNo, seq, item.BoxNo); + } + + await _fqcApi.DeleteFqcResultMaster(FQCID); + + } var result = await _fqcApi.DeleteFqcInhouseDetail(inhouseNo, seq); var resultMaster = await _fqcApi.DeleteFqcInhouseMaster(inhouseNo, seq); diff --git a/AMESCoreStudio.Web/Controllers/PDSController.cs b/AMESCoreStudio.Web/Controllers/PDSController.cs index 4479cb8a..a5007dd6 100644 --- a/AMESCoreStudio.Web/Controllers/PDSController.cs +++ b/AMESCoreStudio.Web/Controllers/PDSController.cs @@ -13,6 +13,7 @@ using AMESCoreStudio.WebApi.DTO.AMES; using AMESCoreStudio.Web.Models; using Newtonsoft.Json.Linq; using AMESCoreStudio.WebApi.Models.BAS; +using System.Linq; namespace AMESCoreStudio.Web.Controllers { @@ -66,6 +67,24 @@ namespace AMESCoreStudio.Web.Controllers } ViewBag.FlowRuleList = FlowRuleItems; } + private async Task GetFactoryInfo() + { + var result = await _pcsApi.GetFactoryInfo(); + + var FactoryInfo = new List(); + result = result.Where(w => w.StatusNo == "A").OrderBy(o => o.FactoryID).ToList(); + for (int i = 0; i < result.Count; i++) + { + FactoryInfo.Add(new SelectListItem(result[i].FactoryNo + "-" + result[i].FactoryNameCh, result[i].FactoryID.ToString())); + } + + if (FactoryInfo.Count == 0) + { + FactoryInfo.Add(new SelectListItem("N/A", null)); + } + + ViewBag.FactoryInfoList = FactoryInfo; + } [HttpPost] public async Task GetUnitLineJson(string unit_no) @@ -97,6 +116,26 @@ namespace AMESCoreStudio.Web.Controllers return View(); } + public async Task PDS012() + { + await GetFactoryInfo(); + + + return View(); + } + public async Task PDS013() + { + await GetFactoryInfo(); + + return View(); + } + public async Task PDS014() + { + await GetFactoryInfo(); + + return View(); + } + [HttpPost] public async Task PDS003SaveAsync(string unitNo,int lineId,int flowId,IFormFile formFile) { diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IFQC.cs b/AMESCoreStudio.Web/HttpApis/AMES/IFQC.cs index 0635fe5c..16fda0cd 100644 --- a/AMESCoreStudio.Web/HttpApis/AMES/IFQC.cs +++ b/AMESCoreStudio.Web/HttpApis/AMES/IFQC.cs @@ -500,6 +500,14 @@ namespace AMESCoreStudio.Web /// [WebApiClient.Attributes.HttpDelete("api/FqcResultDetail")] ITask> DeleteFqcResultDetail(string id, string inhouseNo, int seqID, string boxNo); + + /// + /// 刪除 FQC抽驗資料 + /// + /// FQCID + /// + [WebApiClient.Attributes.HttpDelete("api/FqcResultMaster/{id}")] + ITask> DeleteFqcResultMaster(int id); #endregion #region FQC008 FQC查詢 diff --git a/AMESCoreStudio.Web/Views/PDS/PDS012.cshtml b/AMESCoreStudio.Web/Views/PDS/PDS012.cshtml new file mode 100644 index 00000000..41b87301 --- /dev/null +++ b/AMESCoreStudio.Web/Views/PDS/PDS012.cshtml @@ -0,0 +1,333 @@ +@{ + ViewData["Title"] = "PTD入庫、出貨確認"; + Layout = "~/Views/Shared/_AMESLayout.cshtml"; +} + + + + +
+
+
+
+
@ViewBag.Title
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + + +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ + +
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+ +@section Scripts{ + +} diff --git a/AMESCoreStudio.Web/Views/PDS/PDS013.cshtml b/AMESCoreStudio.Web/Views/PDS/PDS013.cshtml new file mode 100644 index 00000000..670becb2 --- /dev/null +++ b/AMESCoreStudio.Web/Views/PDS/PDS013.cshtml @@ -0,0 +1,379 @@ +@{ + ViewData["Title"] = "PTD備貨"; + Layout = "~/Views/Shared/_AMESLayout.cshtml"; +} + + + + +
+
+
+
+
@ViewBag.Title
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+
+
+
+ + +
+
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+ +
+
+
+
+
+
+ +
+ + + +
+ +
+
+ + +
+
+ +
+ +
+ +
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+
+ +@section Scripts{ + +} diff --git a/AMESCoreStudio.Web/Views/PDS/PDS014.cshtml b/AMESCoreStudio.Web/Views/PDS/PDS014.cshtml new file mode 100644 index 00000000..48172712 --- /dev/null +++ b/AMESCoreStudio.Web/Views/PDS/PDS014.cshtml @@ -0,0 +1,299 @@ +@{ + ViewData["Title"] = "PTD查詢"; + Layout = "~/Views/Shared/_AMESLayout.cshtml"; +} + + + + +
+
+
+
+
@ViewBag.Title
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +@section Scripts{ + +} diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseDetailController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseDetailController.cs index dbf7e42d..557a2f2c 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseDetailController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseDetailController.cs @@ -278,19 +278,20 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES { ResultModel result = new ResultModel(); - var fqcInhouseDetail = await _context.FqcInhouseDetails.Where(p => p.InhouseNo == no && p.SeqID == seq).FirstOrDefaultAsync(); + var fqcInhouseDetail = await _context.FqcInhouseDetails.Where(p => p.InhouseNo == no && p.SeqID == seq).ToListAsync(); if (fqcInhouseDetail == null) { - return fqcInhouseDetail; + return fqcInhouseDetail.FirstOrDefault(); } - _context.FqcInhouseDetails.Remove(fqcInhouseDetail); + _context.FqcInhouseDetails.RemoveRange(fqcInhouseDetail); await _context.SaveChangesAsync(); - return fqcInhouseDetail; + return fqcInhouseDetail.FirstOrDefault(); } + private bool FqcInhouseDetailExists(string id) { return _context.FqcInhouseDetails.Any(e => e.InhouseNo == id); diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs index 5402744e..676ceabd 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs @@ -516,7 +516,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES //YIRU ADD ----------------------------------------------------------------------------------------------------------------------------------------------- /// - /// FQC查詢 by Table + /// FQC查詢 by TableD /// /// 內部序號 /// 工單號碼 diff --git a/AMESCoreStudio.WebApi/Controllers/BLL/RPTController.cs b/AMESCoreStudio.WebApi/Controllers/BLL/RPTController.cs index 5f0b89b4..50ea7419 100644 --- a/AMESCoreStudio.WebApi/Controllers/BLL/RPTController.cs +++ b/AMESCoreStudio.WebApi/Controllers/BLL/RPTController.cs @@ -92,7 +92,9 @@ namespace AMESCoreStudio.WebApi.Controllers.BLL result.abnormalTime = double.Parse(errTime.ToString("0.00")); //直通率:GetWipStation4QRS014GroupALL - var d = await new WipStationController(_context).GetWipStation4QRS014GroupALL(null, sDate, eDate, null, null, null); + //2023-07-11 BB.Wang Modify 安勤 Jason反映只要查安勤產線即可 + //var d = await new WipStationController(_context).GetWipStation4QRS014GroupALL(null, sDate, eDate, null, null, null); + var d = await new WipStationController(_context).GetWipStation4QRS014GroupALL(null, sDate, eDate, null, "YS00", null); if (d.DataTotal > 0) { double sum_rate = 100.0; @@ -225,7 +227,9 @@ namespace AMESCoreStudio.WebApi.Controllers.BLL //FQC - var f = await new FqcResultMasterController(_context).GetFQCHeaderData4QRS016(null, null, null, sDate, eDate, null); + //2023-07-11 BB.Wang Modify 安勤 Jason反映只要查安勤產線即可 + //var f = await new FqcResultMasterController(_context).GetFQCHeaderData4QRS016(null, null, null, sDate, eDate, null); + var f = await new FqcResultMasterController(_context).GetFQCHeaderData4QRS016(null, null, null, sDate, eDate, "1001"); if (f.DataTotal > 0) { int sumFqcCnt = 0, sumFqcPassCnt = 0, sumFqcFailCnt = 0;