|
@ -255,6 +255,27 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
|
|
|
|
|
ViewBag.GetAQL_TypeSelect = q; |
|
|
ViewBag.GetAQL_TypeSelect = q; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// AQL_類型
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="SelectedValue"></param>
|
|
|
|
|
|
private void GetInspectionStatusSelect(string SelectedValue = null) |
|
|
|
|
|
{ |
|
|
|
|
|
List<string> values = new List<string>(); |
|
|
|
|
|
if (SelectedValue != null) |
|
|
|
|
|
{ |
|
|
|
|
|
values = SelectedValue.Split(',').ToList(); |
|
|
|
|
|
} |
|
|
|
|
|
var q = Enum.GetValues(typeof(EnumFQC.EnumInspection_Status)).Cast<EnumFQC.EnumInspection_Status>() |
|
|
|
|
|
.Select(s => new SelectListItem |
|
|
|
|
|
{ |
|
|
|
|
|
Text = EnumPCS.GetDisplayName(s).ToString(), |
|
|
|
|
|
Value = s.ToString() |
|
|
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
|
|
|
ViewBag.GetInspectionStatusSelect = q; |
|
|
|
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region FQC001 檢驗類別維護
|
|
|
#region FQC001 檢驗類別維護
|
|
@ -756,6 +777,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
{ |
|
|
{ |
|
|
GetInspection_TypeSelect(); |
|
|
GetInspection_TypeSelect(); |
|
|
GetAQL_TypeSelect(); |
|
|
GetAQL_TypeSelect(); |
|
|
|
|
|
GetInspectionStatusSelect(); |
|
|
var model = new FqcDto(); |
|
|
var model = new FqcDto(); |
|
|
if (!string.IsNullOrWhiteSpace(inhouseNo) && seqID != 0) |
|
|
if (!string.IsNullOrWhiteSpace(inhouseNo) && seqID != 0) |
|
|
{ |
|
|
{ |
|
@ -803,6 +825,9 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
public async Task<IActionResult> FQC007Async(FqcDto model, string action) |
|
|
public async Task<IActionResult> FQC007Async(FqcDto model, string action) |
|
|
{ |
|
|
{ |
|
|
|
|
|
GetInspection_TypeSelect(); |
|
|
|
|
|
GetAQL_TypeSelect(); |
|
|
|
|
|
GetInspectionStatusSelect(); |
|
|
if (string.IsNullOrWhiteSpace(model.InhouseNo)) |
|
|
if (string.IsNullOrWhiteSpace(model.InhouseNo)) |
|
|
{ |
|
|
{ |
|
|
ModelState.AddModelError("error", "請輸入入庫單號"); |
|
|
ModelState.AddModelError("error", "請輸入入庫單號"); |
|
@ -827,6 +852,9 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
result_FQCResultMaster.Proved = model.Proved; |
|
|
result_FQCResultMaster.Proved = model.Proved; |
|
|
result_FQCResultMaster.OutfitNo = model.OutfitNo; |
|
|
result_FQCResultMaster.OutfitNo = model.OutfitNo; |
|
|
result_FQCResultMaster.InspectionType = model.InspectionType; |
|
|
result_FQCResultMaster.InspectionType = model.InspectionType; |
|
|
|
|
|
result_FQCResultMaster.Note = model.Note; |
|
|
|
|
|
result_FQCResultMaster.ECN_Memo = model.ECN_Memo; |
|
|
|
|
|
result_FQCResultMaster.InspectionStatus = model.InspectionStatus; |
|
|
await _fqcApi.PutFqcResultMaster(JsonConvert.SerializeObject(result_FQCResultMaster)); |
|
|
await _fqcApi.PutFqcResultMaster(JsonConvert.SerializeObject(result_FQCResultMaster)); |
|
|
ModelState.AddModelError("error", "儲存成功!"); |
|
|
ModelState.AddModelError("error", "儲存成功!"); |
|
|
} |
|
|
} |
|
@ -1040,8 +1068,17 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
var result = await _fqcApi.GetFqcQuery(model.InhouseNo, model.SeqID); |
|
|
var result = await _fqcApi.GetFqcQuery(model.InhouseNo, model.SeqID); |
|
|
var fqcItem = result.Data.FirstOrDefault(); |
|
|
var fqcItem = result.Data.FirstOrDefault(); |
|
|
|
|
|
|
|
|
|
|
|
// 抽驗數量 大於 本批次送驗量
|
|
|
|
|
|
if (fqcItem.QcQty > fqcItem.InhouseQty) |
|
|
|
|
|
{ |
|
|
|
|
|
if (fqcItem.PassQty + fqcItem.FailQty != fqcItem.FailQty) |
|
|
|
|
|
{ |
|
|
|
|
|
var _msg = "抽樣數量不足,無法判定"; |
|
|
|
|
|
return RedirectToAction("Refresh", "Home", new { msg = _msg }); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
//當抽驗數量 小於 抽樣數量就離開
|
|
|
//當抽驗數量 小於 抽樣數量就離開
|
|
|
if (fqcItem.QcQty > fqcItem.PassQty + fqcItem.FailQty) |
|
|
else if (fqcItem.QcQty > fqcItem.PassQty + fqcItem.FailQty) |
|
|
{ |
|
|
{ |
|
|
var _msg = "抽樣數量不足,無法判定"; |
|
|
var _msg = "抽樣數量不足,無法判定"; |
|
|
return RedirectToAction("Refresh", "Home", new { msg = _msg }); |
|
|
return RedirectToAction("Refresh", "Home", new { msg = _msg }); |
|
@ -1412,7 +1449,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
DefectDescription = FqcQuery.QaMeno, |
|
|
DefectDescription = FqcQuery.QaMeno, |
|
|
InspectionDate = FqcQuery.EndTime, |
|
|
InspectionDate = FqcQuery.EndTime, |
|
|
AC = FqcQuery.AcQty.ToString(), |
|
|
AC = FqcQuery.AcQty.ToString(), |
|
|
Approved = "王曉明", |
|
|
Approved = FqcQuery.Supervisor_Name, |
|
|
AQL = FqcQuery.AQL.ToString(), |
|
|
AQL = FqcQuery.AQL.ToString(), |
|
|
SpeciallyAdoption = FqcQuery.SpecialPo, |
|
|
SpeciallyAdoption = FqcQuery.SpecialPo, |
|
|
BIOSVer = FqcQuery.BIOS, |
|
|
BIOSVer = FqcQuery.BIOS, |
|
@ -1425,7 +1462,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
InspectionNumber = FqcQuery.InhouseNo, |
|
|
InspectionNumber = FqcQuery.InhouseNo, |
|
|
InspectionStatus = FqcQuery.InspectionStatus, |
|
|
InspectionStatus = FqcQuery.InspectionStatus, |
|
|
InspectionType = FqcQuery.InspectionTypeName, |
|
|
InspectionType = FqcQuery.InspectionTypeName, |
|
|
Inspector = "蔡喬虎", |
|
|
Inspector = FqcQuery.UpdateUser_Name, |
|
|
Judgment = "Defect Quantity", |
|
|
Judgment = "Defect Quantity", |
|
|
Line = FqcQuery.InhouseMemo, |
|
|
Line = FqcQuery.InhouseMemo, |
|
|
LotSize = FqcQuery.InhouseQty.ToString(), |
|
|
LotSize = FqcQuery.InhouseQty.ToString(), |
|
@ -1527,12 +1564,16 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
if (resultFqcQuery.Data.Count() != 0) |
|
|
if (resultFqcQuery.Data.Count() != 0) |
|
|
{ |
|
|
{ |
|
|
var FqcQuery = resultFqcQuery.Data.FirstOrDefault(); |
|
|
var FqcQuery = resultFqcQuery.Data.FirstOrDefault(); |
|
|
|
|
|
// Enum 轉換
|
|
|
|
|
|
FqcQuery.AQLType = EnumFQC.GetDisplayName((EnumFQC.EnumAQL_Type)Enum.Parse(typeof(EnumFQC.EnumAQL_Type), FqcQuery.AQLType)); |
|
|
|
|
|
FqcQuery.InspectionStatus = EnumFQC.GetDisplayName((EnumFQC.EnumInspection_Status)Enum.Parse(typeof(EnumFQC.EnumInspection_Status), FqcQuery.InspectionStatus)); |
|
|
|
|
|
|
|
|
FQC010Master = new FQC010VIiew() |
|
|
FQC010Master = new FQC010VIiew() |
|
|
{ |
|
|
{ |
|
|
DefectDescription = FqcQuery.QaMeno, |
|
|
DefectDescription = FqcQuery.QaMeno, |
|
|
InspectionDate = FqcQuery.EndTime, |
|
|
InspectionDate = FqcQuery.EndTime, |
|
|
AC = FqcQuery.AcQty.ToString(), |
|
|
AC = FqcQuery.AcQty.ToString(), |
|
|
Approved = "王曉明", |
|
|
Approved = FqcQuery.Supervisor_Name, |
|
|
AQL = FqcQuery.AQL.ToString(), |
|
|
AQL = FqcQuery.AQL.ToString(), |
|
|
SpeciallyAdoption = FqcQuery.SpecialPo, |
|
|
SpeciallyAdoption = FqcQuery.SpecialPo, |
|
|
BIOSVer = FqcQuery.BIOS, |
|
|
BIOSVer = FqcQuery.BIOS, |
|
@ -1545,7 +1586,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
InspectionNumber = FqcQuery.InhouseNo, |
|
|
InspectionNumber = FqcQuery.InhouseNo, |
|
|
InspectionStatus = FqcQuery.InspectionStatus, |
|
|
InspectionStatus = FqcQuery.InspectionStatus, |
|
|
InspectionType = FqcQuery.InspectionTypeName, |
|
|
InspectionType = FqcQuery.InspectionTypeName, |
|
|
Inspector = "蔡喬虎", |
|
|
Inspector = FqcQuery.UpdateUser_Name, |
|
|
Judgment = "Defect Quantity", |
|
|
Judgment = "Defect Quantity", |
|
|
Line = FqcQuery.InhouseMemo, |
|
|
Line = FqcQuery.InhouseMemo, |
|
|
LotSize = FqcQuery.InhouseQty.ToString(), |
|
|
LotSize = FqcQuery.InhouseQty.ToString(), |
|
|