Pārlūkot izejas kodu

[BI]學區加入學校後追加BI中間件變更

jeff 2 gadi atpakaļ
vecāks
revīzija
b6a07e5f03

+ 1 - 0
TEAMModelBI/Controllers/BISchool/SchoolController.cs

@@ -311,6 +311,7 @@ namespace TEAMModelBI.Controllers.BISchool
                                 await cosmosClient.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<Teacher>(item, item.id, new PartitionKey("Base"));
                             }
                             await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReplaceItemAsync<School>(school, school.id, new PartitionKey(school.code));
+                            await BIStats.SetSchoolBIRelation(cosmosClient, blobClient, tableClient, _dingDing, school);
                         }
                     }
                 }

+ 11 - 0
TEAMModelBI/Controllers/Census/SchoolController.cs

@@ -1414,6 +1414,17 @@ namespace TEAMModelBI.Controllers.Census
                 scInfos.Add(item);
             }
 
+            //虛擬學校 [需與學校修正做配套,先封印]
+            //StringBuilder sqlV = new($"select value(c) from c");
+            //if (!string.IsNullOrEmpty($"{areaId}") && !string.IsNullOrEmpty($"{role}"))
+            //{
+            //    sqlV.Append($" where c.areaId ='{areaId}'");
+            //}
+            //await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<BIRelation>(queryText: sqlV.ToString(), requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("VirtualBase") }))
+            //{
+            //    scInfos.Add(item);
+            //}
+
             return Ok(new { state = RespondCode.Ok, allCnt = scInfos.Count, scInfos });
         }
 

+ 2 - 2
TEAMModelOS/TEAMModelOS.csproj

@@ -104,13 +104,13 @@
     <!-- Build Target: Restore NPM packages using npm -->
     <Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
 
-    <Exec WorkingDirectory="$(SpaRoot)" Command="cnpm install" />
+    <Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
   </Target>
 
   <Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
     <!-- Build Target: Run webpack dist build -->
     <Message Importance="high" Text="Running npm build..." />
-    <Exec WorkingDirectory="$(SpaRoot)" Command="cnpm run build" />
+    <Exec WorkingDirectory="$(SpaRoot)" Command="npm run build" />
 
     <!-- Include the newly-built files in the publish output -->
     <ItemGroup>