CrazyIter_Bin 3 年之前
父节点
当前提交
bafa03e114
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      TEAMModelOS/Controllers/XTest/TestController.cs

+ 7 - 5
TEAMModelOS/Controllers/XTest/TestController.cs

@@ -164,21 +164,23 @@ namespace TEAMModelOS.Controllers
                             //新区,高新,产业等非新政单位
                             foreach (var str in areaRemoveStr)
                             {
-                                x.city = x.city.Replace(str.Key, str.Value);
+                                x.name = x.name.Replace(str.Key, str.Value);
                                 //if (x.name.Length <= 6) {
                                 //    break;
                                 //}
                             }
                             //去除冗余的学校信息,只保留地名和校名关键信息
                             foreach (var str in schooRemoveStr) {
-                                 x.city = x.city.Replace(str, "");
+                                 x.name = x.name.Replace(str, "");
                                 //if (x.name.Length <= 6) {
                                 //    break;
                                 //}
                             }
-                            //替换
-                            if (x.name.Length > 6) { 
-                            
+                            //替换学校信息的副词
+                            if (x.name.Length > 6) {
+                                foreach (var str in schooReplaceStr) {
+                                    x.name = x.name.Replace(str.Key, str.Value);
+                                }
                             }
                         }
                     }