|
|
@ -1377,8 +1377,18 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
result = await _fqcApi.PutFqcResultMaster(JsonConvert.SerializeObject(fqcResultMaster)); |
|
|
|
if (result.Success) |
|
|
|
{ |
|
|
|
if (model.QaResult == "P") |
|
|
|
await _fqcApi.PassingByFQC(model.InhouseNo, model.SeqID, GetLogInUserID()); |
|
|
|
// 允收且不是無序號供單需要FQC過站
|
|
|
|
if (model.QaResult == "P" && fqcItem.InspectionStatus != "D") |
|
|
|
result = await _fqcApi.PassingByFQC(model.InhouseNo, model.SeqID, GetLogInUserID()); |
|
|
|
|
|
|
|
if (!result.Success) |
|
|
|
{ |
|
|
|
fqcResultMaster.QaResult = "A"; |
|
|
|
fqcInhouseMaster.Status = "A"; |
|
|
|
await _fqcApi.PutFqcInhouseMaster(JsonConvert.SerializeObject(fqcInhouseMaster)); |
|
|
|
await _fqcApi.PutFqcResultMaster(JsonConvert.SerializeObject(fqcResultMaster)); |
|
|
|
return Json(new { data = $"新增失敗,錯誤訊息:{result.Msg}", success = false }); |
|
|
|
} |
|
|
|
|
|
|
|
//FQC報表自動派送
|
|
|
|
await CheckFQCToMail(fqcInhouseMaster.ItemNo, model.QaResult, model.InhouseNo, model.SeqID); |
|
|
|