|
|
@ -894,6 +894,61 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
return View(model); |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost] |
|
|
|
public async Task FQC007AjaxJson(FqcDto model) |
|
|
|
{ |
|
|
|
IResultModel<FqcDto> result; |
|
|
|
|
|
|
|
result = await _fqcApi.GetFqcQuery(model.InhouseNo, model.SeqID); |
|
|
|
|
|
|
|
var result_FQCResultMaster = await _fqcApi.GetFqcResultMaster(model.FqcID); |
|
|
|
|
|
|
|
if (result_FQCResultMaster != null) |
|
|
|
{ |
|
|
|
result_FQCResultMaster.OS = model.OS; |
|
|
|
result_FQCResultMaster.CPU = model.CPU; |
|
|
|
result_FQCResultMaster.RAM = model.RAM; |
|
|
|
result_FQCResultMaster.BIOS = model.BIOS; |
|
|
|
result_FQCResultMaster.Supervisor = model.Supervisor; |
|
|
|
result_FQCResultMaster.Proved = model.Proved; |
|
|
|
result_FQCResultMaster.OutfitNo = model.OutfitNo; |
|
|
|
result_FQCResultMaster.InspectionType = model.InspectionType; |
|
|
|
result_FQCResultMaster.Note = model.Note; |
|
|
|
result_FQCResultMaster.ECN_Memo = model.ECN_Memo; |
|
|
|
result_FQCResultMaster.InspectionStatus = model.InspectionStatus; |
|
|
|
result_FQCResultMaster.PLM_ECN = model.PLMECN; |
|
|
|
await _fqcApi.PutFqcResultMaster(JsonConvert.SerializeObject(result_FQCResultMaster)); |
|
|
|
ModelState.AddModelError("error", "儲存成功!"); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var fqcResultMaster = new FqcResultMaster(); |
|
|
|
fqcResultMaster.InhouseNo = model.InhouseNo; |
|
|
|
fqcResultMaster.SeqID = Convert.ToInt16(model.SeqID); |
|
|
|
fqcResultMaster.LotQty = model.InhouseQty; |
|
|
|
fqcResultMaster.WipNo = model.WipNo; |
|
|
|
fqcResultMaster.QaQty = 1; |
|
|
|
fqcResultMaster.ItemNo = model.ItemNo; |
|
|
|
fqcResultMaster.ModelNo = model.ModelNo; |
|
|
|
fqcResultMaster.StartTime = DateTime.Now; |
|
|
|
fqcResultMaster.EndTime = DateTime.Now; |
|
|
|
fqcResultMaster.CreateUserID = GetLogInUserID(); |
|
|
|
fqcResultMaster.OS = model.OS; |
|
|
|
fqcResultMaster.CPU = model.CPU; |
|
|
|
fqcResultMaster.RAM = model.RAM; |
|
|
|
fqcResultMaster.BIOS = model.BIOS; |
|
|
|
fqcResultMaster.Supervisor = model.Supervisor; |
|
|
|
fqcResultMaster.Proved = model.Proved; |
|
|
|
fqcResultMaster.OutfitNo = model.OutfitNo; |
|
|
|
fqcResultMaster.InspectionType = model.InspectionType; |
|
|
|
fqcResultMaster.Note = model.Note; |
|
|
|
fqcResultMaster.ECN_Memo = model.ECN_Memo; |
|
|
|
fqcResultMaster.InspectionStatus = model.InspectionStatus; |
|
|
|
fqcResultMaster.PLM_ECN = model.PLMECN; |
|
|
|
await _fqcApi.PostFqcResultMaster(JsonConvert.SerializeObject(fqcResultMaster)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#region 抽驗
|
|
|
|
[HttpGet] |
|
|
|
public async Task<IActionResult> FQC007C(string inhouseNo, string seq) |
|
|
@ -1072,7 +1127,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
// 抽驗數量 大於 本批次送驗量
|
|
|
|
if (fqcItem.QcQty > fqcItem.InhouseQty) |
|
|
|
{ |
|
|
|
if (fqcItem.PassQty + fqcItem.FailQty != fqcItem.FailQty) |
|
|
|
if (fqcItem.PassQty + fqcItem.FailQty != fqcItem.InhouseQty) |
|
|
|
{ |
|
|
|
var _msg = "抽樣數量不足,無法判定"; |
|
|
|
return RedirectToAction("Refresh", "Home", new { msg = _msg }); |
|
|
|