CrazyIter_Bin пре 3 година
родитељ
комит
ef55eeb4b1

+ 14 - 3
TEAMModelOS.SDK/Models/Service/StatisticsService.cs

@@ -567,7 +567,7 @@ namespace TEAMModelOS.SDK
            
             }
             await foreach (var item in client.GetContainer("TEAMModelOS", "Normal")
-                .GetItemQueryIterator<Ability>(queryText: $"select c.id,c.name,c.currency,c.no,c.dimension,c.hour,c.stds from c {insql} ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Ability-{area.standard}") }))
+                .GetItemQueryIterator<Ability>(queryText: $"select c.id,c.name,c.currency,c.no,c.dimension,c.hour,c.stds,c.abilityCount from c {insql} ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Ability-{area.standard}") }))
             {
                 abilities.Add(item);
 
@@ -595,16 +595,27 @@ namespace TEAMModelOS.SDK
                         }
                         currencyAll.uploadDone += item.uploads.Count;
                     }
+                    //通过能力点自测
                     if (item.exerciseScore > 0)
                     {
                         if (currencyInt == 1)
                         {
                             currency.exerciseAbility += 1;
-                            currency.learnAbility += item.abilityCount;
+                            //并且完全看完视频和文档。
+                            if (item.allDone) {
+                                currency.learnAbility += ability.abilityCount;
+                            }
+                            
+                        }
+                        //并且完全看完视频和文档。
+                        if (item.allDone)
+                        {
+                            currencyAll.learnAbility += ability.abilityCount;
                         }
                         currencyAll.exerciseAbility += 1;
-                        currencyAll.learnAbility += item.abilityCount;
+                        
                     }
+
                     List<TeacherHprecord> hprecords = new List<TeacherHprecord>();
                     TeacherAility teacherAility = new Models.TeacherAility
                     {

+ 1 - 1
TEAMModelOS/Controllers/Research/AbilitySubController.cs

@@ -513,7 +513,7 @@ namespace TEAMModelOS.Controllers
                             abilitySub.exerciseScore = int.Parse($"{_exercise}");
                             await client.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<AbilitySub>(abilitySub, $"{_abilityId}", new PartitionKey(code));
                             status = 1;
-                            await StatisticsService.SendServiceBus($"{standard}", $"{_tmdid}", $"{_school}", StatisticsService.TeacherAility, 0, _configuration, _serviceBus);
+                            await StatisticsService.SendServiceBus($"{standard}", $"{_tmdid}", $"{_school}", StatisticsService.TeacherAility, 1, _configuration, _serviceBus);
                             return Ok(new { status });
                         }
                         else

+ 3 - 3
TEAMModelOS/TEAMModelOS.csproj

@@ -37,9 +37,9 @@
     <SpaRoot>ClientApp\</SpaRoot>
     <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
     <UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-    <Version>5.2111.28</Version>
-    <AssemblyVersion>5.2111.28.1</AssemblyVersion>
-    <FileVersion>5.2111.28.1</FileVersion>
+    <Version>5.2111.29</Version>
+    <AssemblyVersion>5.2111.29.1</AssemblyVersion>
+    <FileVersion>5.2111.29.1</FileVersion>
     <Description>TEAMModelOS(IES5)</Description>
     <PackageReleaseNotes>版本说明</PackageReleaseNotes>
   </PropertyGroup>

+ 4 - 4
TEAMModelOS/appsettings.Development.json

@@ -22,12 +22,12 @@
   "Azure": {
     //
     "Storage": {
-      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelstorage;AccountKey=Yq7D4dE6cFuer2d2UZIccTA/i0c3sJ/6ITc8tNOyW+K5f+/lWw9GCos3Mxhj47PyWQgDL8YbVD63B9XcGtrMxQ==;EndpointSuffix=core.chinacloudapi.cn"
-      //"ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelos;AccountKey=Dl04mfZ9hE9cdPVO1UtqTUQYN/kz/dD/p1nGvSq4tUu/4WhiKcNRVdY9tbe8620nPXo/RaXxs+1F9sVrWRo0bg==;EndpointSuffix=core.chinacloudapi.cn"
+      //"ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelstorage;AccountKey=Yq7D4dE6cFuer2d2UZIccTA/i0c3sJ/6ITc8tNOyW+K5f+/lWw9GCos3Mxhj47PyWQgDL8YbVD63B9XcGtrMxQ==;EndpointSuffix=core.chinacloudapi.cn"
+      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelos;AccountKey=Dl04mfZ9hE9cdPVO1UtqTUQYN/kz/dD/p1nGvSq4tUu/4WhiKcNRVdY9tbe8620nPXo/RaXxs+1F9sVrWRo0bg==;EndpointSuffix=core.chinacloudapi.cn"
     },
     "Cosmos": {
-      "ConnectionString": "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;"
-      //"ConnectionString": "AccountEndpoint=https://teammodelos.documents.azure.cn:443/;AccountKey=clF73GwPECfP1lKZTCvs8gLMMyCZig1HODFbhDUsarsAURO7TcOjVz6ZFfPqr1HzYrfjCXpMuVD5TlEG5bFGGg==;"
+      //"ConnectionString": "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;"
+      "ConnectionString": "AccountEndpoint=https://teammodelos.documents.azure.cn:443/;AccountKey=clF73GwPECfP1lKZTCvs8gLMMyCZig1HODFbhDUsarsAURO7TcOjVz6ZFfPqr1HzYrfjCXpMuVD5TlEG5bFGGg==;"
     },
     "Redis": {
       "ConnectionString": "52.130.252.100:6379,password=habook,ssl=false,abortConnect=False,writeBuffer=10240"