|
@@ -147,7 +147,7 @@ namespace TEAMModelOS.Controllers
|
|
|
if (coreUser != null)
|
|
|
{
|
|
|
t.id = coreUser.id;
|
|
|
- t.cname = coreUser.name;
|
|
|
+ t.name = coreUser.name;
|
|
|
t.picture = coreUser.picture;
|
|
|
t.tmdid = coreUser.id;
|
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
@@ -172,7 +172,7 @@ namespace TEAMModelOS.Controllers
|
|
|
if (coreUser != null)
|
|
|
{
|
|
|
t.id = coreUser.id;
|
|
|
- t.cname = coreUser.name;
|
|
|
+ t.name = coreUser.name;
|
|
|
t.picture = coreUser.picture;
|
|
|
t.tmdid = coreUser.id;
|
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
@@ -193,7 +193,7 @@ namespace TEAMModelOS.Controllers
|
|
|
if (coreUser != null)
|
|
|
{
|
|
|
t.id = coreUser.id;
|
|
|
- t.cname = coreUser.name;
|
|
|
+ t.name = coreUser.name;
|
|
|
t.picture = coreUser.picture;
|
|
|
t.tmdid = coreUser.id;
|
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
@@ -215,7 +215,7 @@ namespace TEAMModelOS.Controllers
|
|
|
if (coreUser != null)
|
|
|
{
|
|
|
t.id = coreUser.id;
|
|
|
- t.cname = coreUser.name;
|
|
|
+ t.name = coreUser.name;
|
|
|
t.picture = coreUser.picture;
|
|
|
t.tmdid = coreUser.id;
|
|
|
if (!string.IsNullOrWhiteSpace(coreUser.mobile))
|
|
@@ -238,8 +238,8 @@ namespace TEAMModelOS.Controllers
|
|
|
tch = new ScTeacher
|
|
|
{
|
|
|
id = t.id,
|
|
|
- name = t.cname,
|
|
|
- iname = t.name,
|
|
|
+ iname = t.iname,
|
|
|
+ name = t.name,
|
|
|
picture = t.picture,
|
|
|
status = "import",
|
|
|
createTime = t.time,
|
|
@@ -256,7 +256,7 @@ namespace TEAMModelOS.Controllers
|
|
|
teachers.Add(tch);
|
|
|
}
|
|
|
else {
|
|
|
- tch.iname = t.name;
|
|
|
+ tch.iname = t.iname;
|
|
|
tch.note = t.note;
|
|
|
tch.phone = t.phone;
|
|
|
tch.email = t.email;
|
|
@@ -268,8 +268,8 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
id=t.id,
|
|
|
picture=t.picture,
|
|
|
- name=t.cname,
|
|
|
- iname = t.name,
|
|
|
+ iname=t.iname,
|
|
|
+ name = t.name,
|
|
|
status="import",
|
|
|
createTime=t.time,
|
|
|
permissionCount=0,
|
|
@@ -766,7 +766,7 @@ namespace TEAMModelOS.Controllers
|
|
|
if (response.Status == 200)
|
|
|
{
|
|
|
teacherImport = JsonDocument.Parse(response.Content).RootElement.Deserialize<TeacherImport>();
|
|
|
- var tchs = teacherImport.teachers.FindAll(x => x.name.Equals($"{_importName}") && string.IsNullOrWhiteSpace(x.id));
|
|
|
+ var tchs = teacherImport.teachers.FindAll(x => x.iname.Equals($"{_importName}") && string.IsNullOrWhiteSpace(x.id));
|
|
|
if (tchs.IsNotEmpty())
|
|
|
{
|
|
|
var tch = tchs[0];
|
|
@@ -788,7 +788,7 @@ namespace TEAMModelOS.Controllers
|
|
|
tch.status = $"{grant_type}";
|
|
|
tch.time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
|
|
tch.tmdid = teacher.id;
|
|
|
- tch.cname = teacher.name;
|
|
|
+ tch.name = teacher.name;
|
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReplaceItemAsync(teacherImport, $"{school_code}", new PartitionKey("TeacherImport"));
|
|
|
}
|
|
|
}
|
|
@@ -844,7 +844,7 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
if (!string.IsNullOrWhiteSpace($"{name}") && teacherImport!= null) {
|
|
|
//移除同名的、其中一个
|
|
|
- var ts= teacherImport.teachers.FindAll(x => string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(x.name ) && x.name.Equals($"{name}"));
|
|
|
+ var ts= teacherImport.teachers.FindAll(x => string.IsNullOrWhiteSpace(x.id) && !string.IsNullOrWhiteSpace(x.iname ) && x.iname.Equals($"{name}"));
|
|
|
if (ts.IsNotEmpty()) {
|
|
|
teacherImport.teachers.Remove(ts.First());
|
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReplaceItemAsync(teacherImport, $"{school_code}", new PartitionKey("TeacherImport"));
|