Преглед на файлове

处理检查数据接口。

Li преди 2 години
родител
ревизия
4fea05a60f
променени са 1 файла, в които са добавени 16 реда и са изтрити 13 реда
  1. 16 13
      TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs

+ 16 - 13
TEAMModelBI/Controllers/BISchool/BatchSchoolController.cs

@@ -1274,21 +1274,24 @@ namespace TEAMModelBI.Controllers.BISchool
                         noAccounts.Add(bISchool);
                         noAccounts.Add(bISchool);
                 });
                 });
 
 
-                //查询区是否存在
-                var respAreaId = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemStreamAsync($"{bISchool.areaId}", new PartitionKey("Base-Area"));
-                if (respAreaId.Status != 200)
+                if (!string.IsNullOrEmpty(bISchool.areaId))
                 {
                 {
-                    noAreaIds.Add(bISchool);
-                }
+                    //查询区是否存在
+                    var respAreaId = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemStreamAsync($"{bISchool.areaId}", new PartitionKey("Base-Area"));
+                    if (respAreaId.Status != 200)
+                    {
+                        noAreaIds.Add(bISchool);
+                    }
 
 
-                //查询去是否同步省平台
-                var responseSet = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemStreamAsync($"{bISchool.areaId}", new PartitionKey("AreaSetting"));
-                if (responseSet.Status == 200)
-                {
-                    using var fileJson = await JsonDocument.ParseAsync(responseSet.ContentStream);
-                    AreaSetting delSet = fileJson.ToObject<AreaSetting>();
-                    if (!string.IsNullOrEmpty(delSet.accessConfig))
-                        synPro.Add(bISchool);
+                    //查询去是否同步省平台
+                    var responseSet = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemStreamAsync($"{bISchool.areaId}", new PartitionKey("AreaSetting"));
+                    if (responseSet.Status == 200)
+                    {
+                        using var fileJson = await JsonDocument.ParseAsync(responseSet.ContentStream);
+                        AreaSetting delSet = fileJson.ToObject<AreaSetting>();
+                        if (!string.IsNullOrEmpty(delSet.accessConfig))
+                            synPro.Add(bISchool);
+                    }
                 }
                 }
 
 
                 CreateSchoolInfo createSchoolInfo = new CreateSchoolInfo()
                 CreateSchoolInfo createSchoolInfo = new CreateSchoolInfo()