|
@@ -514,12 +514,15 @@ namespace TEAMModelAPI.Controllers
|
|
}
|
|
}
|
|
|
|
|
|
List<GroupListDto> groupListDtos= await GroupListService.GetGroupListListids(_azureCosmos.GetCosmosClient(), _dingDing, groupIds, school);
|
|
List<GroupListDto> groupListDtos= await GroupListService.GetGroupListListids(_azureCosmos.GetCosmosClient(), _dingDing, groupIds, school);
|
|
- IEnumerable<string> unexistGroupIds = groupIds.Except(groupListDtos.Select(x=>x.id));
|
|
|
|
- //移除不存在的名单id
|
|
|
|
- import_schedules_hastime.RemoveAll(x => unexistGroupIds.Contains(x.classId));
|
|
|
|
- import_schedules_hastime.RemoveAll(x => unexistGroupIds.Contains(x.stulist));
|
|
|
|
- import_schedules_nottime.RemoveAll(x => unexistGroupIds.Contains(x.classId));
|
|
|
|
- import_schedules_nottime.RemoveAll(x => unexistGroupIds.Contains(x.stulist));
|
|
|
|
|
|
+ IEnumerable<string> unexistGroupIds = null;
|
|
|
|
+ if (groupListDtos.IsNotEmpty()) {
|
|
|
|
+ unexistGroupIds = groupIds.Except(groupListDtos.Select(x => x.id));
|
|
|
|
+ //移除不存在的名单id
|
|
|
|
+ import_schedules_hastime.RemoveAll(x => unexistGroupIds.Contains(x.classId));
|
|
|
|
+ import_schedules_hastime.RemoveAll(x => unexistGroupIds.Contains(x.stulist));
|
|
|
|
+ import_schedules_nottime.RemoveAll(x => unexistGroupIds.Contains(x.classId));
|
|
|
|
+ import_schedules_nottime.RemoveAll(x => unexistGroupIds.Contains(x.stulist));
|
|
|
|
+ }
|
|
|
|
|
|
HashSet<Course> update_course = new HashSet<Course>();
|
|
HashSet<Course> update_course = new HashSet<Course>();
|
|
HashSet<string> unexistTimeIds = new HashSet<string>();
|
|
HashSet<string> unexistTimeIds = new HashSet<string>();
|