报错修改

This commit is contained in:
何美荣 2025-11-03 17:04:52 +08:00
parent 211bfd2b65
commit 7a12f77e45

View File

@ -512,7 +512,7 @@ namespace APT.SK.WebApi.Controllers.Api
{
item.CHECK_RESULT = SKCheckResultEnum.None;
}
if (item.CHECK_RESULT == SKCheckResultEnum.None || item.CHECK_RESULT == SKCheckResultEnum.NA)
if (item.CHECK_RESULT != SKCheckResultEnum.Yes)
{
item.HIDDEN_LEVEL = null;
}
@ -526,7 +526,7 @@ namespace APT.SK.WebApi.Controllers.Api
{
throw new Exception("有隐患必须上传隐患照片");
}
var noExsists = details.FirstOrDefault(t => t.CHECK_RESULT != SKCheckResultEnum.None && (t.CHECK_QUESTION_ID != null|| t.HIDDEN_LEVEL != null || t.HIDDEN_PLACE != null));
var noExsists = details.FirstOrDefault(t => t.CHECK_RESULT != SKCheckResultEnum.Yes && (t.CHECK_QUESTION_ID != null|| t.HIDDEN_LEVEL != null || t.HIDDEN_PLACE != null));
if (noExsists != null)
{
throw new Exception("无隐患、不涉及无需填写隐患描述和隐患等级隐患地点,请确认检查情况");