|
@@ -92,13 +92,13 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
.GetItemQueryIterator<School>(queryText: schoolSQL, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey($"Base") }))
|
|
|
{
|
|
|
schools.Add(item);
|
|
|
- }
|
|
|
+ }
|
|
|
ArtSetting artSetting= await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemAsync<ArtSetting>($"{_areaId}", new PartitionKey());
|
|
|
foreach (var school in schools) {
|
|
|
- var periods = school.period.Where(p => !string.IsNullOrWhiteSpace(p.type));
|
|
|
+ var periods = school.period.Where(p => p.type.IsNotEmpty());
|
|
|
foreach (var period in periods)
|
|
|
{
|
|
|
- var dimension = artSetting.dimensions.FindAll(x => x.type.Contains(period.type));
|
|
|
+ var dimension = artSetting.dimensions.FindAll(x => x.type.Intersect(period.type).Any());
|
|
|
var bindIds = period.subjects.Where(s => !string.IsNullOrWhiteSpace(s.bindId)).Select(x => x.bindId);
|
|
|
//该学段未同步学科的。
|
|
|
var unBindIds = dimension.Where(z => !string.IsNullOrWhiteSpace(z.subjectBind)).Select(x => x.subjectBind).ToHashSet().Except(bindIds);
|
|
@@ -146,7 +146,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
//同步知识块。
|
|
|
if (old != null)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
else {
|
|
|
|