|
@@ -1437,11 +1437,15 @@ namespace TEAMModelOS.Controllers
|
|
|
int asize = obj.size;
|
|
|
teacher.size = obj.size;
|
|
|
List<IdNameCode> nameCodes = new List<IdNameCode> { new IdNameCode { id = obj.id, name = obj.name, code = obj.lang } };
|
|
|
- var schoolData = obj.schools.Find(z => z.schoolId.Equals($"{school_code}"));
|
|
|
- _coreAPIHttpService.PushNotify(nameCodes, "teacher_space-change", Constant.NotifyType_IES5_Management,
|
|
|
- new Dictionary<string, object> { { "tmdname", teacher.name }, { "tmdid", teacher.id }, { "schoolName", schoolData.name },{ "bsize", bsize }, { "asize", asize } }
|
|
|
- , _option.Location, _configuration, _dingDing, "");
|
|
|
+
|
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<SchoolTeacher>(teacher, obj.id, new PartitionKey($"Teacher-{school_code}"));
|
|
|
+ var schoolData = obj.schools.Find(z => z.schoolId.Equals($"{school_code}"));
|
|
|
+ if (schoolData != null)
|
|
|
+ {
|
|
|
+ _coreAPIHttpService.PushNotify(nameCodes, "teacher_space-change", Constant.NotifyType_IES5_Management,
|
|
|
+ new Dictionary<string, object> { { "tmdname", teacher.name }, { "tmdid", teacher.id }, { "schoolName", schoolData.name }, { "bsize", bsize }, { "asize", asize } }
|
|
|
+ , _option.Location, _configuration, _dingDing, "");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|