diff --git a/Backend/Controllers/BuildInfoController.cs b/Backend/Controllers/BuildInfoController.cs index 8f580ce..f06e9bb 100644 --- a/Backend/Controllers/BuildInfoController.cs +++ b/Backend/Controllers/BuildInfoController.cs @@ -496,7 +496,7 @@ namespace Backend.Controllers try { var check = await backendRepository.GetOneAsync($@"select floor_guid from variable where floor_guid != {post.Floor_guid} and building_tag = '{post.Building_tag}' and - full_name = '{post.Full_name}';"); + full_name = '{post.Full_name}' and deleted = 0;"); if (!string.IsNullOrEmpty(check)) { apiResult.Code = "9998"; diff --git a/Backend/Controllers/SystemCategoryController.cs b/Backend/Controllers/SystemCategoryController.cs index 350acdb..a45c5e1 100644 --- a/Backend/Controllers/SystemCategoryController.cs +++ b/Backend/Controllers/SystemCategoryController.cs @@ -99,7 +99,7 @@ namespace Backend.Controllers object param = new { Deleted = 0, id = post.id }; - var check = await backendRepository.GetOneAsync($"select id from variable where id != {post.id} and system_type = '{main_system_type}' and system_value = '{post.system_value}';"); + var check = await backendRepository.GetOneAsync($"select id from variable where id != {post.id} and system_type = '{main_system_type}' and system_value = '{post.system_value}' and deleted = 0;"); if (!string.IsNullOrEmpty(check)) { apiResult.Code = "9998"; @@ -317,7 +317,7 @@ namespace Backend.Controllers try { - var check = await backendRepository.GetOneAsync($"select id from variable where id != {post.id} and system_type = '{sub_system_type}' and system_value = '{post.system_value}';"); + var check = await backendRepository.GetOneAsync($"select id from variable where id != {post.id} and system_type = '{sub_system_type}' and system_value = '{post.system_value}' and deleted = 0;"); if (!string.IsNullOrEmpty(check)) { apiResult.Code = "9998"; diff --git a/Backend/Controllers/UserInfoController.cs b/Backend/Controllers/UserInfoController.cs index 5572c93..c574434 100644 --- a/Backend/Controllers/UserInfoController.cs +++ b/Backend/Controllers/UserInfoController.cs @@ -314,7 +314,7 @@ namespace Backend.Controllers try { - var check = await backendRepository.GetOneAsync($"select role_guid from role where role_guid != '{post.Id}' and full_name = '{post.Name}';"); + var check = await backendRepository.GetOneAsync($"select role_guid from role where role_guid != '{post.Id}' and full_name = '{post.Name}' and deleted = 0;"); if (!string.IsNullOrEmpty(check)) { apiResult.Code = "9998"; diff --git a/Backend/Controllers/VariableController.cs b/Backend/Controllers/VariableController.cs index 83afaf8..7c2d97e 100644 --- a/Backend/Controllers/VariableController.cs +++ b/Backend/Controllers/VariableController.cs @@ -129,7 +129,7 @@ namespace Backend.Controllers try { var check = await backendRepository.GetOneAsync($@"select id from variable where id != {post.id} and system_type = '{post.System_type}' and system_value = '{post.system_value}' - and system_key = '{post.System_key}';"); + and system_key = '{post.System_key}' and deleted = 0;"); if (!string.IsNullOrEmpty(check)) { apiResult.Code = "9998";