Browse Source

1.修改维修资料输入,增加判断维修过站是否成功?

PTD
Marvin 3 years ago
parent
commit
b38fb9444b
  1. 22
      AMESCoreStudio.Web/Controllers/REPController.cs

22
AMESCoreStudio.Web/Controllers/REPController.cs

@ -562,17 +562,25 @@ namespace AMESCoreStudio.Web.Controllers
inputItems = items inputItems = items
}; };
var barcode_result = new ResultModel<string>();
try try
{ {
var barcode_result = await _pcsApi.PassIngByCheck(JsonConvert.SerializeObject(barCode)); barcode_result = await _pcsApi.PassIngByCheck(JsonConvert.SerializeObject(barCode));
} }
catch { } catch { }
//更新NG_INFO if (barcode_result.Success)
//var ng_info = await _repApi.GetNgInfo((int)model.ngInfo.NgID); {
//ng_info[0].Status = 1; //更新NG_INFO
model.ngInfo.Status = 1; //var ng_info = await _repApi.GetNgInfo((int)model.ngInfo.NgID);
result = await _repApi.PutNgInfo(JsonConvert.SerializeObject(model.ngInfo)); //ng_info[0].Status = 1;
model.ngInfo.Status = 1;
result = await _repApi.PutNgInfo(JsonConvert.SerializeObject(model.ngInfo));
}
else
{
return RedirectToAction("Refresh", "Home", new { id = model.ngComponent.NgID, msg = barcode_result.Msg });
}
} }
if (result.Success) if (result.Success)
@ -583,7 +591,7 @@ namespace AMESCoreStudio.Web.Controllers
} }
else else
{ {
if (result.Errors.Count > 0) if (result.Errors != null)
{ {
ModelState.AddModelError(result.Errors[0].Id, result.Errors[0].Msg); ModelState.AddModelError(result.Errors[0].Id, result.Errors[0].Msg);
} }

Loading…
Cancel
Save