Sfoglia il codice sorgente

添加部分代码

yuanrf 1 anno fa
parent
commit
1ca972f896
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      OASystem/OASystem.Api/Controllers/BaiduOCRController.cs

+ 5 - 0
OASystem/OASystem.Api/Controllers/BaiduOCRController.cs

@@ -120,6 +120,11 @@ namespace OASystem.API.Controllers
                             string words = item.words.Replace("\\n", "");
                             string values = dicHeader[j];
 
+                            if (words.IsNullOrWhiteSpace())
+                            {
+                                continue;
+                            }
+
                             if (values.Equals("Name"))
                             {
                                 if (Regex.Matches(words, "[a-zA-Z]").Count < 1)