|
@@ -896,7 +896,7 @@ namespace TEAMModelOS.SDK
|
|
|
guardians.ForEach(async x => {
|
|
|
GuardianStudent guardianStudent = x.students.Find(s => s.id.Equals(stud.Key) && s.code.Equals(schoolId));
|
|
|
if (guardianStudent == null) {
|
|
|
- x.students.Add(new GuardianStudent { type=2,id=stud.Key,code=schoolId,name=stud.Value.name });
|
|
|
+ x.students.Add(new GuardianStudent { relation=stud.Value.guardian, type=2,id=stud.Key,code=schoolId,name=stud.Value.name });
|
|
|
}
|
|
|
await cosmosContainer.ReplaceItemAsync(x, x.id, new PartitionKey(x.code));
|
|
|
});
|
|
@@ -908,7 +908,7 @@ namespace TEAMModelOS.SDK
|
|
|
pk= "Guardian",
|
|
|
mobile=stud.Value.gPhone,
|
|
|
name = stud.Value.gName,
|
|
|
- students = new List<GuardianStudent> { new GuardianStudent { type = 2, id = stud.Key, code = schoolId, name = stud.Value.name } }
|
|
|
+ students = new List<GuardianStudent> { new GuardianStudent { relation=stud.Value.guardian, type = 2, id = stud.Key, code = schoolId, name = stud.Value.name } }
|
|
|
};
|
|
|
await cosmosContainer.CreateItemAsync(guardian, new PartitionKey(guardian.code));
|
|
|
}
|
|
@@ -1130,7 +1130,7 @@ namespace TEAMModelOS.SDK
|
|
|
GuardianStudent guardianStudent = x.students.Find(s => s.id.Equals(studCreateInfo.id) && s.code.Equals(schoolId));
|
|
|
if (guardianStudent == null)
|
|
|
{
|
|
|
- x.students.Add(new GuardianStudent { type = 2, id = studCreateInfo.id, code = schoolId, name = studCreateInfo.name });
|
|
|
+ x.students.Add(new GuardianStudent {relation=studentGuardian.relation, type = 2, id = studCreateInfo.id, code = schoolId, name = studCreateInfo.name });
|
|
|
}
|
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Student).ReplaceItemAsync(x, x.id, new PartitionKey(x.code));
|
|
|
});
|
|
@@ -1144,7 +1144,7 @@ namespace TEAMModelOS.SDK
|
|
|
pk = "Guardian",
|
|
|
mobile = studentGuardian.mobile,
|
|
|
name = studentGuardian.name,
|
|
|
- students = new List<GuardianStudent> { new GuardianStudent { type = 2, id = studCreateInfo.id, code = schoolId, name = studCreateInfo.name } }
|
|
|
+ students = new List<GuardianStudent> { new GuardianStudent { relation=studentGuardian.relation, type = 2, id = studCreateInfo.id, code = schoolId, name = studCreateInfo.name } }
|
|
|
};
|
|
|
await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Student).CreateItemAsync(guardian, new PartitionKey(guardian.code));
|
|
|
}
|
|
@@ -2385,7 +2385,7 @@ namespace TEAMModelOS.SDK
|
|
|
GuardianStudent guardianStudent = x.students.Find(s => s.id.Equals(id) && s.code.Equals(schoolId));
|
|
|
if (guardianStudent == null)
|
|
|
{
|
|
|
- x.students.Add(new GuardianStudent { type = 2, id = id, code = schoolId, name = studentInfos[id].name });
|
|
|
+ x.students.Add(new GuardianStudent { relation =gtudentGuardian.relation, type = 2, id = id, code = schoolId, name = studentInfos[id].name });
|
|
|
}
|
|
|
try { await cosmosContainer.ReplaceItemAsync(x, x.id, new PartitionKey(x.code)); } catch { }
|
|
|
});
|
|
@@ -2399,7 +2399,7 @@ namespace TEAMModelOS.SDK
|
|
|
pk = "Guardian",
|
|
|
mobile = gtudentGuardian.mobile,
|
|
|
name = gtudentGuardian.name,
|
|
|
- students = new List<GuardianStudent> { new GuardianStudent { type = 2, id = id, code = schoolId, name = studentInfos[id].name } }
|
|
|
+ students = new List<GuardianStudent> { new GuardianStudent {relation=gtudentGuardian.relation, type = 2, id = id, code = schoolId, name = studentInfos[id].name } }
|
|
|
};
|
|
|
try { await cosmosContainer.CreateItemAsync(guardian, new PartitionKey(guardian.code)); } catch { }
|
|
|
}
|