|
@@ -1274,21 +1274,24 @@ namespace TEAMModelBI.Controllers.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()
|