Ver código fonte

优化学区学校学校管理员

Li 2 anos atrás
pai
commit
d611fa9cf1

+ 4 - 3
TEAMModelBI/Controllers/BINormal/AreaRelevantController.cs

@@ -69,10 +69,7 @@ namespace TEAMModelBI.Controllers.BINormal
                 //    cosmosClient = _azureCosmos.GetCosmosClient(name: BIConst.Global);
                 var isManyArea = false;
                 if (!string.IsNullOrEmpty($"{_isDefalue}"))
-                {
                     isManyArea = true;
-                }
-
                 List<JoinAreaSchool> joinAreaSchools = new();
                 string sqltxt = $"SELECT c.id,c.name,c.schoolCode,c.province,c.city,c.dist,c.picture,c.period,c.areaId,c.standard,c.manyAreas FROM c WHERE c.areaId='{_areaId}'";
 
@@ -109,7 +106,10 @@ namespace TEAMModelBI.Controllers.BINormal
                             catch { }
 
                             if (!string.IsNullOrEmpty($"{joinAreaSchool.id}"))
+                            {
                                 joinAreaSchool.assists = await CommonFind.FindSchoolRoles(cosmosClient, joinAreaSchool.id, "assist");
+                                joinAreaSchool.scAdmin = await CommonFind.FindSchoolRoles(cosmosClient, joinAreaSchool.id, "admin");
+                            }
 
                             joinAreaSchools.Add(joinAreaSchool);
                         }                    
@@ -610,6 +610,7 @@ namespace TEAMModelBI.Controllers.BINormal
             public string dist { get; set; }
             public List<SchoolArea> areas { get; set; } = new List<SchoolArea>();
             public List<SchoolTeacherRoles> assists { get; set; } = new List<SchoolTeacherRoles>();
+            public List<SchoolTeacherRoles> scAdmin { get; set; } = new List<SchoolTeacherRoles>();
         }
 
     }