ソースを参照

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

jeff 1 年間 前
コミット
adf25992f7
22 ファイル変更334 行追加164 行削除
  1. 3 3
      TEAMModelBI/TEAMModelBI.csproj
  2. 1 1
      TEAMModelOS.FunctionV4/CosmosDB/TriggerArt.cs
  3. 1 1
      TEAMModelOS.FunctionV4/HttpTrigger/IESHttpTrigger.cs
  4. 13 12
      TEAMModelOS.FunctionV4/TEAMModelOS.FunctionV4.csproj
  5. 10 6
      TEAMModelOS.SDK/DI/CoreAPI/CoreAPIHttpService.cs
  6. 27 24
      TEAMModelOS.SDK/TEAMModelOS.SDK.csproj
  7. 1 1
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReportCharts/LessonTestReportCharts.vue
  8. 3 3
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperView.vue
  9. 2 2
      TEAMModelOS/ClientApp/src/view/classrecord/eventchart/PopQues.vue
  10. 70 4
      TEAMModelOS/ClientApp/src/view/classrecord/eventchart/SubjectiveAns.vue
  11. 1 1
      TEAMModelOS/ClientApp/src/view/signupActivity/createActivity.vue
  12. 1 1
      TEAMModelOS/ClientApp/src/view/signupActivity/infoComponent/skContent.vue
  13. 1 1
      TEAMModelOS/ClientApp/src/view/signupActivity/infoGoing.vue
  14. 6 1
      TEAMModelOS/ClientApp/src/view/signupActivity/processActivity.vue
  15. 13 0
      TEAMModelOS/Controllers/Common/ActivityController.cs
  16. 27 1
      TEAMModelOS/Controllers/School/ElegantController.cs
  17. 128 88
      TEAMModelOS/Controllers/System/BillController.cs
  18. 12 3
      TEAMModelOS/Controllers/System/CoreController.cs
  19. 5 2
      TEAMModelOS/Controllers/XTest/TestController.cs
  20. 7 7
      TEAMModelOS/TEAMModelOS.csproj
  21. 1 1
      TEAMModelOS/appsettings.Development.json
  22. 1 1
      TEAMModelOS/appsettings.json

+ 3 - 3
TEAMModelBI/TEAMModelBI.csproj

@@ -65,9 +65,9 @@
 		<SpaRoot>ClientApp\</SpaRoot>
 		<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
 		<UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-		<Version>5.2403.13</Version>
-		<AssemblyVersion>5.2403.13.1</AssemblyVersion>
-		<FileVersion>5.2403.13.1</FileVersion>
+		<Version>5.2403.20</Version>
+		<AssemblyVersion>5.2403.20.1</AssemblyVersion>
+		<FileVersion>5.2403.20.1</FileVersion>
 		<Description>TEAMModelBI(BI)</Description>
 		<PackageReleaseNotes>BI版本说明版本切换标记2022000908</PackageReleaseNotes>
 		<PackageId>TEAMModelBI</PackageId>

+ 1 - 1
TEAMModelOS.FunctionV4/CosmosDB/TriggerArt.cs

@@ -392,7 +392,7 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
                                 var sta = examClassResults.SelectMany(x => x.status).ToList();
                                 var ansCount = sta.Where(x => x == 0).ToList();
                                 var persent = ansCount.Count * 1.0 / sta.Count * 100;
-                                var period = scInfo.period.Where(x => x.id.Equals(art.period.id)).FirstOrDefault();
+                                var period = scInfo.period.Where(x => x.id.Equals(art.period.id))?.FirstOrDefault();
 
                                 List<StudentArtResult> studentArtResults = new();
                                 string sql = $"SELECT value c FROM c   where  c.pk='ArtResult' ";

+ 1 - 1
TEAMModelOS.FunctionV4/HttpTrigger/IESHttpTrigger.cs

@@ -84,7 +84,7 @@ namespace TEAMModelOS.FunctionV4
             string data = await new StreamReader(req.Body).ReadToEndAsync();
             var response = req.CreateResponse(HttpStatusCode.OK);
             var gmt8Time =  DateTimeOffset.UtcNow.GetGMTTime(8);
-            var appendBlob = _azureStorage.GetBlobContainerClient("0-service-log").GetAppendBlobClient($"http-log/{gmt8Time:yyyy-MM-dd}/{gmt8Time:HH}.log");
+            var appendBlob = _azureStorage.GetBlobContainerClient("0-service-log").GetAppendBlobClient($"http-log/{gmt8Time:yyyy}/{gmt8Time:MM}/{gmt8Time:dd}/{gmt8Time:HH}.log");
             if (!appendBlob.Exists())
             {
                 appendBlob.Create();

+ 13 - 12
TEAMModelOS.FunctionV4/TEAMModelOS.FunctionV4.csproj

@@ -5,9 +5,9 @@
 		<OutputType>Exe</OutputType>
 		<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
 		<SignAssembly>true</SignAssembly>
-		<Version>5.2403.13</Version>
-		<AssemblyVersion>5.2403.13.1</AssemblyVersion>
-		<FileVersion>5.2403.13.1</FileVersion>
+		<Version>5.2403.20</Version>
+		<AssemblyVersion>5.2403.20.1</AssemblyVersion>
+		<FileVersion>5.2403.20.1</FileVersion>
 		<PackageId>TEAMModelOS.FunctionV4</PackageId>
 		<Authors>teammodel</Authors>
 		<Company>醍摩豆(成都)信息技术有限公司</Company>
@@ -48,19 +48,20 @@
 		<!--<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.0.1" />-->
 		<!--<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.3.0" />-->
 		<!--<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.11.0" />-->
-		<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.15.0" />
+		<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
 		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.1.0" />
-		<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.7.0" />
+		<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.2" />
 	
-		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
-		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage" Version="5.0.1" />
-		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.7.0" />
-		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.CosmosDB" Version="4.0.0-preview2" />
+		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.1.0" />
+		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage" Version="6.3.0" />
+		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.17.0" />
+		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.CosmosDB" Version="4.7.0" />
 		<!--<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.CosmosDB" Version="3.0.9" />-->
-		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs" Version="5.0.1" />
-		<PackageReference Include="SPS.SBCompressor" Version="0.6.5" />
-		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.1.0" />
+		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs" Version="6.3.0" />
+		<PackageReference Include="SPS.SBCompressor" Version="0.8.0" />
+		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.3.0" />
 		<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
+		<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
 	</ItemGroup>
 	<ItemGroup>
 		<ProjectReference Include="..\TEAMModelOS.SDK\TEAMModelOS.SDK.csproj" />

+ 10 - 6
TEAMModelOS.SDK/DI/CoreAPI/CoreAPIHttpService.cs

@@ -389,12 +389,16 @@ lang 语系"zh-cn" ,zh-tw", "en-us"
                                 {
                                     urlAction = "https://test.teammodel.cn/core/process-notify";
                                 }
-                                byte[] byts = Encoding.Unicode.GetBytes(replaceData.ToJsonString());
-                                var  rdata=Convert.ToBase64String(byts);
-                                byte[] bs= Convert.FromBase64String(rdata);
-                                string data1 = Encoding.Unicode.GetString(bs);
-                                rdata = HttpUtility.UrlEncode(rdata, Encoding.UTF8);
-                                urlAction = $"{urlAction}?notifyCode={notifyCode}&data={rdata}";
+                                string dataJson = replaceData.ToJsonString();
+
+                                //byte[] byts = Encoding.Unicode.GetBytes(replaceData.ToJsonString());
+                                //var  rdata=Convert.ToBase64String(byts);
+                                //byte[] bs= Convert.FromBase64String(rdata);
+                                //string data1 = Encoding.Unicode.GetString(bs);
+
+
+                                dataJson = HttpUtility.UrlEncode(dataJson, Encoding.UTF8);
+                                urlAction = $"{urlAction}?notifyCode={notifyCode}&data={dataJson}";
                                 if (msgs.Count == 3)
                                 {
                                     if (msgs[2].Contains("{link}"))

+ 27 - 24
TEAMModelOS.SDK/TEAMModelOS.SDK.csproj

@@ -2,47 +2,50 @@
 
   <PropertyGroup>
     <TargetFramework>net6.0</TargetFramework>
-    <Version>5.2403.13</Version>
-    <AssemblyVersion>5.2403.13.1</AssemblyVersion>
-    <FileVersion>5.2403.13.1</FileVersion>
+    <Version>5.2403.20</Version>
+    <AssemblyVersion>5.2403.20.1</AssemblyVersion>
+    <FileVersion>5.2403.20.1</FileVersion>
     <PackageReleaseNotes>发版</PackageReleaseNotes>
   </PropertyGroup>
 
   <ItemGroup>
+    <PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
     <PackageReference Include="CHTCHSConv" Version="1.0.0" />
-    <PackageReference Include="AspectCore.Extensions.Reflection" Version="2.2.0" />
+    <PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
     <PackageReference Include="Azure.Cosmos" Version="4.0.0-preview3" />
-    <PackageReference Include="Azure.Identity" Version="1.5.0" />
-    <PackageReference Include="Azure.Messaging.ServiceBus" Version="7.7.0" />
-    <PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.2.0" />
-    <PackageReference Include="Azure.Storage.Blobs.Batch" Version="12.8.0" />
-    <PackageReference Include="Azure.Storage.Queues" Version="12.9.0" />
+    <PackageReference Include="Azure.Identity" Version="1.10.4" />
+    <PackageReference Include="Azure.Messaging.ServiceBus" Version="7.17.4" />
+    <PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.6.0" />
+    <PackageReference Include="Azure.Storage.Blobs.Batch" Version="12.16.1" />
+    <PackageReference Include="Azure.Storage.Queues" Version="12.17.1" />
     <PackageReference Include="ClouDASLibx" Version="1.3.2" />
     <PackageReference Include="DinkToPdf" Version="1.0.8" />
-    <PackageReference Include="DocumentFormat.OpenXml" Version="2.15.0" />
+    <PackageReference Include="DocumentFormat.OpenXml" Version="3.0.2" />
     <PackageReference Include="HTEXLib" Version="5.2401.1024" />
-    <PackageReference Include="HtmlAgilityPack" Version="1.11.42" />
-    <PackageReference Include="Lib.AspNetCore.ServerSentEvents" Version="8.2.0" />
-    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.3" />
+    <PackageReference Include="HtmlAgilityPack" Version="1.11.59" />
+    <PackageReference Include="Lib.AspNetCore.ServerSentEvents" Version="9.0.0" />
+    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.28" />
     <PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
-    <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.3" />
-    <PackageReference Include="Microsoft.Azure.SignalR.Management" Version="1.18.0" />
-    <PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="7.0.5" />
-    <PackageReference Include="Microsoft.Identity.Client" Version="4.39.0" />
-    <PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
+    <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.28" />
+    <PackageReference Include="Microsoft.Azure.SignalR.Management" Version="1.25.1" />
+    <PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="8.0.3" />
+    <PackageReference Include="Microsoft.Identity.Client" Version="4.59.0" />
+    <PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.24" />
+    <PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
     <PackageReference Include="NUnit" Version="3.13.2" />
     <PackageReference Include="PinYinConverterCore" Version="1.0.2" />
-    <PackageReference Include="StackExchange.Redis" Version="2.6.45" />
-    <PackageReference Include="SvgNet" Version="2.2.2" />
+    <PackageReference Include="StackExchange.Redis" Version="2.7.33" />
+    <PackageReference Include="SvgNet" Version="3.0.0" />
     <PackageReference Include="System.Drawing.Common" Version="6.0.0" />
     <PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="2.0.0-preview" />
-    <PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
+    <PackageReference Include="System.Net.Http.Json" Version="6.0.1" />
     <PackageReference Include="NPinyin.Core" Version="3.0.0" />
     <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
+    <PackageReference Include="System.ServiceModel.Primitives" Version="6.2.0" />
     <PackageReference Include="VueCliMiddleware" Version="6.0.0" />
-	<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.10.0" />
-	<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.1.0" />
-	<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
+	<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.21.0" />
+	<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.3.0" />
+	<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.1.0" />
   </ItemGroup>
 
 

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReportCharts/LessonTestReportCharts.vue

@@ -37,7 +37,7 @@
                 </Card>
             </i-col>
         </Row>
-        <Row :gutter="20" v-show="chartsData.cloudas">
+        <Row :gutter="20" v-if="chartsData.cloudas">
             <!-- 落点图 -->
             <i-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" :xxl="12">
                 <Card style="margin-bottom: 20px;">

+ 3 - 3
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/PaperView.vue

@@ -91,7 +91,7 @@
                                 <!-- <div class="title-rect" /> -->
                                 <!-- <h2 class="title-rect-name">{{$t("studentWeb.exam.subjectNow")}}:{{chooseData.subject.name}}</h2> -->
                                 <LessonTestReport :paperInfo="selectData" :examInfo="chooseData" :chartsData="chartsData"
-                                        :average="average[activeIndex]" :quData="quData" :isPrint="isPrint" />
+                                        :average="average[0]" :quData="quData" :isPrint="isPrint" />
                             </div>
                             
                             <div class="scoreboard" v-if="(nowActive.type === 'Art' && !examLists.length)">
@@ -376,11 +376,11 @@
                                 let subjectScatter = []
                                 res.subjectScatter.forEach(item => {
                                     let myScatter = undefined
-                                    let scatter = item.value.map(value => {
+                                    let scatter = item.value ? item.value.map(value => {
                                         value.value.id = value.key
                                         if(value.value.id === this.userInfo.sub) myScatter = value.value
                                         return value.value
-                                    })
+                                    }) : []
                                     // 由于多个学生相同,会导致当前学生被遮挡,因此将他放在最后渲染
                                     scatter = scatter.filter(i => i.id !== this.userInfo.sub)
                                     scatter.push(myScatter)

+ 2 - 2
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/PopQues.vue

@@ -14,10 +14,10 @@
                 <OptionCount v-if="quType === 'single' || quType === 'multiple' || quType === 'judge'" :optionCount="optionData" :answer="answer"></OptionCount>
                 <!-- 填空题(文字题) -->
                 <CompleteAns v-else-if="quType === 'complete'" :answer="answerData" :students="students"></CompleteAns>
-                <!-- 如果有设置正确答案的正确率统计 -->
-                <CorrectRate :correctData="correctData" v-if="hasAnswer"></CorrectRate>
                 <!-- 问答题(文字、图片、音频) -->
                 <SubjectiveAns v-else-if="quType === 'subjective'" :answer="answerData" :students="students" :recordInfo="recordInfo" :blobInfo="blobInfo" :answerType="answerType" />
+                <!-- 如果有设置正确答案的正确率统计 -->
+                <CorrectRate :correctData="correctData" v-if="hasAnswer"></CorrectRate>
             </div>
             <div v-else>
                 <p v-for="key in Object.keys(optionData)" :key="key">

+ 70 - 4
TEAMModelOS/ClientApp/src/view/classrecord/eventchart/SubjectiveAns.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="text-answer-item">
-        <div v-for="(student) in fullData" :key="student.seatID" @click="handleShowContent(student)">
+        <div v-for="(student) in fullData" :key="student.seatID">
             <span class="student-name">{{ student.name }}:</span>
             <div v-for="(item, index) in student.answer" :key="index">
                 <!-- 文本、画记 -->
@@ -11,15 +11,27 @@
                     <div v-if="item.type === 'image'" class="popques-img">
                         <img :src="item.url" alt="" @click="viewImage(item.url)">
                     </div>
-                    <div v-if="item.type === 'audio'">
+                    <div v-else-if="item.type === 'audio'">
                         <audio controls>
                             <source :src="item.url">
                             {{$t('teachContent.notAudio')}}
                         </audio>
                     </div>
-                    <div v-if="item.type === 'video'">
+                    <div v-else-if="item.type === 'video'">
                         <video :src="item.url" width="870" controls="controls" style="max-height: 800px;"></video>
                     </div>
+                    <div v-else class="repair-link-wrap-item-box">
+                        <div class="file-icon">
+                            <img :src="$tools.getFileThum(item.type, item.name)"/>
+                        </div>
+                        <div class="file-info">
+                            <p class="file-name">{{ item.name }}</p>
+                            <div>
+                                <span @click="onPreview(item)">{{ $t('ability.review.preview')}}</span>
+                                <span @click="onDownload(item)">{{ $t('ability.review.download')}}</span>
+                            </div>
+                        </div>
+                    </div>
                 </template>
             </div>
         </div>
@@ -71,7 +83,8 @@ export default {
                                 // 示例: "/Clients/202106001/Ans/1-1709794642933001.png"
                                 let url = {
                                     type: '',
-                                    url: `${this.blobInfo.blob_uri}/records/${this.recordInfo.id}${item}${this.blobInfo.blob_sas}`
+                                    url: `${this.blobInfo.blob_uri}/records/${this.recordInfo.id}${item}${this.blobInfo.blob_sas}`,
+                                    name: item.substr(item.lastIndexOf("/Ans/") + 5)
                                 }
                                 if(this.answerType === 'file') {
                                     let suffix = item.substr(item.lastIndexOf(".") + 1)
@@ -103,6 +116,25 @@ export default {
         viewImage(url) {
             this.$hevueImgPreview(url)
         },
+        /* 预览 */
+        async onPreview(item){
+            let url = item.url
+            if (this.$tools.getSuffix(item.name) === 'pdf') {
+                window.open('/web/viewer.html?file=' + encodeURIComponent(url));
+            } else if(item.type === 'doc') {
+                window.open('https://view.officeapps.live.com/op/view.aspx?src=' + escape(url));
+            } else if(item.type === 'image') {
+                this.$hevueImgPreview(url)
+            } else if(item.type === 'link') {
+				window.open(/^(http:|https:)/i.test(url) ? url : "http://" + url)
+            } else {
+                this.$hevueImgPreview(url)
+            }
+        },
+        /* 下载 */
+        async onDownload(item){
+            this.$tools.doDownloadByUrl(item.url, item.name)
+        },
     }
 }
 </script>
@@ -121,6 +153,40 @@ export default {
             color: #2b85e4;
         }
     }
+    
+    .repair-link-wrap-item-box {
+        display: flex;
+        position: relative;
+        // background-color: #e3e3e3;
+        border-radius: 5px;
+        padding: 10px 0;
+        font-size: 14px;
+
+        &:hover {
+            background-color: #ebe9e9;
+        }
+
+        .file-icon {
+            img {
+                width: 45px !important;
+            }
+        }
+
+        .file-info {
+            margin-left: 10px;
+
+            .file-name {
+                font-weight: bold;
+                margin-bottom: 5px;
+            }
+
+            span {
+                color: #16a3b5;
+                margin-right: 15px;
+                cursor: pointer;
+            }
+        }
+    }
 }
 .popques-img img{
     cursor: pointer;

+ 1 - 1
TEAMModelOS/ClientApp/src/view/signupActivity/createActivity.vue

@@ -31,7 +31,7 @@
                                 <Input v-special-char v-model="createData.address" :placeholder="$t('activity.placeholder.field3')" />
                             </FormItem>
                             <FormItem :label="$t('ability.video.time')" prop="stime">
-                                <DatePicker :value="actAllTime[0]" :editable="false" @on-open-change="(type) => dateOpenChange(type, 0)" @on-change="(date, type) => setActTime(date, type, 0)" type="datetimerange" :options="beforeToday" format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('train.create.timeHolder')" style="width: 500px"></DatePicker>
+                                <DatePicker :value="actAllTime[0]" :editable="false" @on-open-change="(type) => dateOpenChange(type, 0)" @on-change="(date, type) => setActTime(date, type, 0)" type="datetimerange" :options="beforeToday" format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('cusMgt.acTime')" style="width: 500px"></DatePicker>
                             </FormItem>
                             <FormItem :label="$t('activity.host')" class="unit-box">
                                 <div v-for="(item, index) in createData.zb" :key="index">

+ 1 - 1
TEAMModelOS/ClientApp/src/view/signupActivity/infoComponent/skContent.vue

@@ -253,7 +253,7 @@
             </div>
         </Drawer>
         <Drawer :title="$t('activity.modal.text8')" :width="25" v-model="workDrawer">
-            <template v-if="processList[proIndex].uploads">
+            <template v-if="processList[proIndex] && processList[proIndex].uploads">
                 <div v-for="(item, index) in processList[proIndex].uploads" :key="item.id" style="font-size: 18px; margin-bottom: 10px;">
                     {{ item.name }}
                     <span v-show="item.score != -1">

+ 1 - 1
TEAMModelOS/ClientApp/src/view/signupActivity/infoGoing.vue

@@ -51,7 +51,7 @@
                             </p>
                             <p>{{ $t('activity.disclaimer') }}:{{ actInfo.mzsm || '-' }}</p>
                             <div style="display: flex;">
-                                <p style="min-width: 50px;">{{ $t('activity.module.title') }}:</p>
+                                <p style="min-width: 50px;">{{ $t('cusMgt.rcd.file') }}:</p>
                                 <div v-if="actInfo.attachment.length">
                                     <p v-for="item in actInfo.attachment" :key="item.blob" @click="onPreview(item)" class="attach-name">{{ item.name }}</p>
                                 </div>

+ 6 - 1
TEAMModelOS/ClientApp/src/view/signupActivity/processActivity.vue

@@ -37,7 +37,12 @@
                             <p>{{ $t('td.td59') }}:{{ item.subject }}</p>
                             <p>{{ $t('td.td61') }}:{{ item.address }}</p>
                             <p>{{ $t('td.td60') }}:{{ item.startTime }} - {{ item.endTime }}</p>
-                            <p>{{ $t('activity.host') }}:{{ item.zb.length }}</p>
+                            <p>{{ $t('activity.host') }}:
+                                <span v-if="!item.zb.length">-</span>
+                                <span v-else>
+                                    <span v-for="(zb, index) in item.zb" :key="index" style="margin-right: 10px;">{{ zb || '-' }}</span>
+                                </span>
+                            </p>
                             <!-- <p>简介:{{ item.jianjie }}</p> -->
                             <div class="process-type">
                                 <template v-if="item.needConfirmed">

+ 13 - 0
TEAMModelOS/Controllers/Common/ActivityController.cs

@@ -3729,6 +3729,19 @@ namespace TEAMModelOS.Controllers
                                             }
                                             else { return Ok(new { code = 2, msg = "请以学校教师身份参加本次活动!" }); }
                                         }
+                                        else if (activity.scope.Equals("area")  && activity.confirmedSchools.IsNotEmpty()) {
+                                            if (!string.IsNullOrWhiteSpace(enrollData.schoolId))
+                                            {
+                                                if (!activity.confirmedSchools.Exists(z => z.id.Equals(enrollData.schoolId)  && z.status==1))
+                                                {
+                                                    return Ok(new { code = 4, msg = "学校未确认参与本次活动!" });
+                                                }
+                                                else {
+                                                    code=200;
+                                                }
+                                            }
+                                            else { return Ok(new { code = 2, msg = "请以学校教师身份参加本次活动!" }); }
+                                        }
                                         else
                                         {
                                             await _dingDing.SendBotMsg($"{_option.Location},活动类型错误:{activity.id}", GroupNames.成都开发測試群組);

+ 27 - 1
TEAMModelOS/Controllers/School/ElegantController.cs

@@ -297,7 +297,33 @@ namespace TEAMModelOS.Controllers
                     itemKeys.Add(new ItemCommentKeyCount { id= item.id, keyCounts=keyCounts});
                 }
             }
-            return Ok(new { schoolDatas, videoCount, imageCount,otherCount,docCount , itemKeys, items = items.Select(z=>new {z.id ,z.pid,z.count,z.videoCount,z.docCount,z.imageCount,z.otherCount })});
+            /*List<string> clds = elegants.SelectMany(c => c.classes).ToList();
+            string classSql = $"select c.id, c.name from c where c.pk = 'Class' and c.id in ({string.Join(",", clds.Select(o => $"'{o}'"))})";
+            List<(string id, string name)> classInfos = new();
+            await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School)
+                .GetItemQueryStreamIterator(queryText: classSql))
+            {
+                using var sc_json = await JsonDocument.ParseAsync(item.ContentStream);
+                if (sc_json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
+                {
+                    var accounts = sc_json.RootElement.GetProperty("Documents").EnumerateArray();
+                    while (accounts.MoveNext())
+                    {
+                        JsonElement account = accounts.Current;
+                        classInfos.Add((account.GetProperty("id").GetString(), account.GetProperty("name").GetString()));
+                    }
+                }
+            }
+
+            var lel =  elegants.Select(c => new { 
+                c.title,
+                c.content,
+                type = string.Join("-", c.bizType.Select(o => $"'{o}'")),
+                schoolName = schools.Where(z => z.id.Equals(c.school)).FirstOrDefault().name,
+                classId = c.classes,
+                className = c.classes.Count > 0 ? classInfos.Where(z => z.id.Equals(c.classes[0])).FirstOrDefault().name : "",
+            });*/
+            return Ok(new {schoolDatas, videoCount, imageCount,otherCount,docCount , itemKeys, items = items.Select(z=>new {z.id ,z.pid,z.count,z.videoCount,z.docCount,z.imageCount,z.otherCount })});
         }
 
         private  List<ClassifiedItem> ClassifyHierarchy(List<Elegant> inputArray)

+ 128 - 88
TEAMModelOS/Controllers/System/BillController.cs

@@ -97,119 +97,131 @@ namespace TEAMModelOS.Controllers
 
             List<ApiVist> apiVists = new List<ApiVist>();
             List<string> times = json.GetProperty("times").ToObject<List<string>>();
-            foreach (var time in times)
+            foreach (var timeDate in times)
             {
-                var BlobClient = _azureStorage.GetBlobContainerClient("0-service-log").GetBlobClient($"http-log/{time}/index.json");
-                string nowMonth = DateTimeOffset.Now.GetGMTTime(8).ToString("yyyy-MM-dd");
-                string force = json.GetProperty("force").GetString();
-                if (BlobClient.Exists() && !force.Equals("1") && !nowMonth.Equals(time))
-                {
-                    BlobDownloadResult result = await _azureStorage.GetBlobContainerClient("0-service-log").GetBlobClient($"http-log/{time}/index.json").DownloadContentAsync();
-                    var vist = result.Content.ToObjectFromJson<List<ApiVist>>();
-                }
-                else
-                {
-                    List<ApiVist> vistsDay = new List<ApiVist>();
-                    List<(string uuid, HttpLog httpLog, List<string> tmdid, List<string> school)> uuidInfos = new List<(string uuid, HttpLog httpLog, List<string> tmdid, List<string> school)>();
-                    List<string> files = await _azureStorage.GetBlobContainerClient("0-service-log").List($"http-log/{time}");
-                    //List<HttpLog> logs = new List<HttpLog>();
-                    ConcurrentBag<HttpLog> logs = new ConcurrentBag<HttpLog>();
-                   // object lockObj = new object();
-                    await Parallel.ForEachAsync(files, async (file, _) => {
-                        if (!file.Contains("index.json"))
-                        {
-                            //string hour = DateTimeOffset.Now.GetGMTTime(8).ToString("HH");
-                            ////当前小时的不保存
-                            //if (!file.EndsWith($"{hour}.json"))
-                            //{
 
-                            //}
-                            BlobDownloadResult result = await _azureStorage.GetBlobContainerClient("0-service-log").GetBlobClient(file).DownloadContentAsync();
-                            var content = result.Content.ToString();
-                            content= content.Substring(0, content.Length-2);
-                            if (content.EndsWith("}"))
+                if (DateTimeOffset.TryParse(timeDate, out DateTimeOffset date)) {
+                    var BlobClient = _azureStorage.GetBlobContainerClient("0-service-log").GetBlobClient($"http-log/{date:yyyy}/{date:MM}/{date:dd}/index.json");
+                    string nowMonth = DateTimeOffset.Now.GetGMTTime(8).ToString("yyyy-MM-dd");
+                    string force = json.GetProperty("force").GetString();
+                    if (BlobClient.Exists() && !force.Equals("1") && !nowMonth.Equals(date.ToString("yyyy-MM-dd")))
+                    {
+                        BlobDownloadResult result = await _azureStorage.GetBlobContainerClient("0-service-log").GetBlobClient($"http-log/{date:yyyy}/{date:MM}/{date:dd}/index.json").DownloadContentAsync();
+                        var vist = result.Content.ToObjectFromJson<List<ApiVist>>();
+                    }
+                    else
+                    {
+                        List<ApiVist> vistsDay = new List<ApiVist>();
+                        List<(string uuid, HttpLog httpLog, List<string> tmdid, List<string> school)> uuidInfos = new List<(string uuid, HttpLog httpLog, List<string> tmdid, List<string> school)>();
+                        List<string> files = await _azureStorage.GetBlobContainerClient("0-service-log").List($"http-log/{date:yyyy}/{date:MM}/{date:dd}");
+                        //List<HttpLog> logs = new List<HttpLog>();
+                        ConcurrentBag<HttpLog> logs = new ConcurrentBag<HttpLog>();
+                        // object lockObj = new object();
+
+                        files.Find(x => x.Contains("index.json"));
+                        await Parallel.ForEachAsync(files, async (file, _) => {
+                            if (!file.Contains("index.json"))
                             {
-                                content=$"[{content}]";
+                                //string hour = DateTimeOffset.Now.GetGMTTime(8).ToString("HH");
+                                ////当前小时的不保存
+                                //if (!file.EndsWith($"{hour}.json"))
+                                //{
+
+                                //}
+                                BlobDownloadResult result = await _azureStorage.GetBlobContainerClient("0-service-log").GetBlobClient(file).DownloadContentAsync();
+                                var content = result.Content.ToString();
+                                content= content.Substring(0, content.Length-2);
+                                if (content.EndsWith("}"))
+                                {
+                                    content=$"[{content}]";
+                                }
+                                else
+                                {
+                                    content=$"[{content}}}]";
+                                }
+                                var paths = file.Split("/");
+                                var hour = paths[paths.Length-1].Replace(".log", "");
+                                var httpLogs = content.ToObject<List<HttpLog>>();
+                                Parallel.ForEach(httpLogs, item =>
+                                {
+                                    item.year = $"{date:yyyy}";
+                                    item.month = $"{date:MM}";
+                                    item.day = $"{date:dd}";
+                                    item.hour = hour;
+                                    logs.Add(item);
+                                });
                             }
-                            else
+                        });
+                        (ConcurrentBag<ApiVist> vists, ConcurrentBag<(string uuid, HttpLog httpLog, List<string> tmdid, List<string> school)> uuidInfo)   =   Convert(logs);
+                        vistsDay.AddRange(vists);
+                        uuidInfos.AddRange(uuidInfo);
+                        vistsDay.FindAll(x => x.path.Contains("common/exam/upsert-record"));
+                        List<(string tmd, bool exists, string scope)> tmdexists = new List<(string tmd, bool exists, string scope)>();
+                        List<(string sch, bool exists)> schexists = new List<(string sch, bool exists)>();
+                        var tmds = uuidInfos.SelectMany(x => x.tmdid).ToHashSet();
+                        if (tmds.Any())
+                        {
+                            foreach (var tmd in tmds)
                             {
-                                content=$"[{content}}}]";
+                                var exists = await _azureRedis.GetRedisClient().KeyExistsAsync($"Blob:Catalog:{tmd}");
+                                if (exists)
+                                {
+                                    tmdexists.Add((tmd, exists, "teacher"));
+                                }
+                                else
+                                {
+                                    exists = await _azureRedis.GetRedisClient().KeyExistsAsync($"Login:School:hbcn:student:{tmd}");
+                                    tmdexists.Add((tmd, exists, "student"));
+                                }
                             }
-                            var httpLogs = content.ToObject<List<HttpLog>>();
-                            Parallel.ForEach(httpLogs, item =>
-                            {
-                                logs.Add( item);
-                            });
                         }
-                    });
-                    (ConcurrentBag<ApiVist> vists, ConcurrentBag<(string uuid, HttpLog httpLog, List<string> tmdid, List<string> school)> uuidInfo)   =   Convert(logs);
-                    vistsDay.AddRange(vists);
-                    uuidInfos.AddRange(uuidInfo);
-                    vistsDay.FindAll(x => x.path.Contains("common/exam/upsert-record"));
-                    List<(string tmd, bool exists, string scope)> tmdexists = new List<(string tmd, bool exists, string scope)>();
-                    List<(string sch, bool exists)> schexists = new List<(string sch, bool exists)>();
-                    var tmds = uuidInfos.SelectMany(x => x.tmdid).ToHashSet();
-                    if (tmds.Any())
-                    {
-                        foreach (var tmd in tmds)
+                        var schs = uuidInfos.SelectMany(x => x.school).ToHashSet();
+                        if (schs.Any())
                         {
-                            var exists = await _azureRedis.GetRedisClient().KeyExistsAsync($"Blob:Catalog:{tmd}");
-                            if (exists)
-                            {
-                                tmdexists.Add((tmd, exists, "teacher"));
-                            }
-                            else
+                            foreach (var sch in schs)
                             {
-                                exists = await _azureRedis.GetRedisClient().KeyExistsAsync($"Login:School:hbcn:student:{tmd}");
-                                tmdexists.Add((tmd, exists, "student"));
+                                var exists = await _azureRedis.GetRedisClient().KeyExistsAsync(sch);
+                                schexists.Add((sch, exists));
                             }
                         }
-                    }
-                    var schs = uuidInfos.SelectMany(x => x.school).ToHashSet();
-                    if (schs.Any())
-                    {
-                        foreach (var sch in schs)
+                        foreach (var item in uuidInfos)
                         {
-                            var exists = await _azureRedis.GetRedisClient().KeyExistsAsync(sch);
-                            schexists.Add((sch, exists));
-                        }
-                    }
-                    foreach (var item in uuidInfos)
-                    {
-                        foreach (var tmd in item.tmdid)
-                        {
-                            var tmdext = tmdexists.Find(x => x.tmd.Equals(tmd));
-                            if (tmdext.tmd!= null  && tmdext.exists)
+                            foreach (var tmd in item.tmdid)
                             {
-                                var vist = vistsDay.Find(x => x.id.Equals(item.uuid));
-                                if (vist!= null)
+                                var tmdext = tmdexists.Find(x => x.tmd.Equals(tmd));
+                                if (tmdext.tmd!= null  && tmdext.exists)
                                 {
-                                    vist.userId=tmd;
-                                    if (string.IsNullOrWhiteSpace(vist.scope))
+                                    var vist = vistsDay.Find(x => x.id.Equals(item.uuid));
+                                    if (vist!= null)
                                     {
-                                        vist.scope=tmdext.scope;
+                                        vist.userId=tmd;
+                                        if (string.IsNullOrWhiteSpace(vist.scope))
+                                        {
+                                            vist.scope=tmdext.scope;
+                                        }
                                     }
+                                    break;
                                 }
-                                break;
                             }
-                        }
 
-                        foreach (var sch in item.school)
-                        {
-                            var schext = schexists.Find(x => x.sch.Equals(sch));
-                            if (schext.sch!= null  && schext.exists)
+                            foreach (var sch in item.school)
                             {
-                                var vist = vistsDay.Find(x => x.id.Equals(item.uuid));
-                                if (vist!= null)
+                                var schext = schexists.Find(x => x.sch.Equals(sch));
+                                if (schext.sch!= null  && schext.exists)
                                 {
-                                    vist.school=sch;
+                                    var vist = vistsDay.Find(x => x.id.Equals(item.uuid));
+                                    if (vist!= null)
+                                    {
+                                        vist.school=sch;
+                                    }
+                                    break;
                                 }
-                                break;
                             }
                         }
+                        apiVists.AddRange(vistsDay);
                     }
-                    apiVists.AddRange(vistsDay);
                 }
+               
             }
             return Ok(new { apiVists });
         }
@@ -226,7 +238,20 @@ namespace TEAMModelOS.Controllers
                 string uuid = Guid.NewGuid().ToString();
                 List<string> schoolMatch = new List<string>();
                 List<string> useridMatch = new List<string>();
-                var vist = new ApiVist() { id=uuid, ip=log.ip, tid=log.tid, time= log.time, userId= log.id, school= log.school, tname= log.name, path = log.path };
+                var vist = new ApiVist() {
+                    id=uuid,
+                    ip=log.ip,
+                    tid=log.tid,
+                    time= log.time,
+                    userId= log.id,
+                    school= log.school,
+                    tname= log.name,
+                    path = log.path,
+                    year=log.year,
+                    month=log.month,
+                    day=log.day,
+                    hour=log.hour
+                };
                 if (string.IsNullOrWhiteSpace(vist.userId))
                 {
 
@@ -1355,8 +1380,14 @@ namespace TEAMModelOS.Controllers
         /// <summary>
         /// 细分
         /// ies5 ,hiteach,hita,cc,bi,contest,open,aclassone,sokrates,ability,art
+        /// 产品端
         /// </summary>
         public string client { get; set; }
+        /// <summary>
+        /// 具体功能
+        /// </summary>
+        public string func {  get; set; }
+
         public string userId { get; set; }
         public string scope { get; set; }
         public string tname { get; set; }
@@ -1376,6 +1407,10 @@ namespace TEAMModelOS.Controllers
         /// tokenid
         /// </summary>
         public string tid { get; set; }
+        public string year { get; set; }
+        public string month { get; set; }
+        public string day { get; set; }
+        public string hour { get; set; }
         public RegionLngLat point { get; set; }
     }
 
@@ -1396,6 +1431,11 @@ namespace TEAMModelOS.Controllers
         // public string ua { get; set; }
         // public string referer { get; set;  }
         public string scope { get; set; }
+        public string year { get; set; }
+        public string month { get; set; }
+        public string day { get; set; }
+        public string hour { get; set; }
+
     }
     public record RegionLngLat
     {

+ 12 - 3
TEAMModelOS/Controllers/System/CoreController.cs

@@ -121,15 +121,24 @@ namespace TEAMModelOS.Controllers
                     opttmdid = jwt.Payload.Sub;
                     scope = "IES";
                 }
+                Dictionary<string, object> dict = new Dictionary<string, object>();
                 if (string.IsNullOrWhiteSpace(opttmdid)) {
                     code = 1; 
                     msg = "参数异常";
                     msg = status.TryGetProperty($"code{code}", out JsonElement text) ? $"{text}" : msg;
                 }
                 var rdata = HttpUtility.UrlDecode(notifyData.data, Encoding.UTF8);
-                var dataByte = Convert.FromBase64String(rdata);
-                string data = Encoding.Unicode.GetString(dataByte);
-                Dictionary<string, object> dict = data.ToObject<Dictionary<string, object>>();
+                //取消base64,但是旧数据需要处理
+                var d= rdata.Replace("\\", "");
+                try {
+                    dict = d.ToObject<Dictionary<string, object>>();
+                }
+                catch {
+                   
+                    var dataByte = Convert.FromBase64String(rdata);
+                    string data = Encoding.Unicode.GetString(dataByte);
+                    data.ToObject<Dictionary<string, object>>();
+                }
                 dict.TryGetValue("schoolId", out object _schoolId);
                 dict.TryGetValue("tmdid", out object _tmdid);
                 if (!string.IsNullOrWhiteSpace($"{_schoolId}") && !string.IsNullOrWhiteSpace($"{_tmdid}") && !string.IsNullOrWhiteSpace(opttmdid))

+ 5 - 2
TEAMModelOS/Controllers/XTest/TestController.cs

@@ -64,6 +64,7 @@ using TEAMModelOS.SDK.Models.Service.BI;
 using TEAMModelOS.SDK.Services;
 using Top.Api;
 using static SKIT.FlurlHttpClient.Wechat.TenpayV3.Models.CreateBrandProfitSharingOrderRequest.Types;
+using static TEAMModelOS.Controllers.FixDataController;
 using static TEAMModelOS.SDK.Models.Teacher;
 using static TEAMModelOS.SDK.SchoolService;
 
@@ -118,9 +119,11 @@ namespace TEAMModelOS.Controllers
         [RequestSizeLimit(102_400_000_00)] //最大10000m左右
         public async Task<IActionResult> RemoveStuCourse(JsonElement json)
         {
+            _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id="1535418750",name="醍摩豆研发", nickname="醍摩豆研发" } }, $"invite_school", Constant.NotifyType_IES5_Management,
+                                 new Dictionary<string, object> {  { "schoolName", "醍摩豆学校" }, { "schoolId", $"hbcn" } }, _option.Location, _configuration, _dingDing, _environment.ContentRootPath);
 
-            Accumulate accumulate= json.ToObject<Accumulate>();
-            await SystemService.RecordAccumulateData(_azureRedis,_dingDing, accumulate);
+            //Accumulate accumulate= json.ToObject<Accumulate>();
+            //await SystemService.RecordAccumulateData(_azureRedis,_dingDing, accumulate);
             return Ok();
         }
 

+ 7 - 7
TEAMModelOS/TEAMModelOS.csproj

@@ -6,11 +6,11 @@
   <ItemGroup>
     <PackageReference Include="DotNetZip" Version="1.16.0" />
 	<PackageReference Include="DinkToPdf" Version="1.0.8" />
-	<PackageReference Include="EPPlus" Version="6.2.6" />
+	<PackageReference Include="EPPlus" Version="7.0.10" />
 	<PackageReference Include="IP2Region.Net" Version="2.0.2" />
 	<PackageReference Include="JsonPath.Net" Version="1.0.0" />
-    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
-	<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="2.20.0" />
+    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0-preview.2.24128.5" />
+	<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.1.0" />
 	<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.1" />
   </ItemGroup>
   <ItemGroup>
@@ -79,11 +79,11 @@
     <SpaRoot>ClientApp\</SpaRoot>
     <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
     <UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-    <Version>5.2403.13</Version>
-    <AssemblyVersion>5.2403.13.1</AssemblyVersion>
-    <FileVersion>5.2403.13.1</FileVersion>
+    <Version>5.2403.20</Version>
+    <AssemblyVersion>5.2403.20.1</AssemblyVersion>
+    <FileVersion>5.2403.20.1</FileVersion>
     <Description>TEAMModelOS(IES5)</Description>
-    <PackageReleaseNotes>IES版本说明版本切换标记5.2403.13.1</PackageReleaseNotes>
+    <PackageReleaseNotes>IES版本说明版本切换标记5.2403.20.1</PackageReleaseNotes>
     <PackageId>TEAMModelOS</PackageId>
     <Authors>teammodel</Authors>
     <Company>醍摩豆(成都)信息技术有限公司</Company>

+ 1 - 1
TEAMModelOS/appsettings.Development.json

@@ -18,7 +18,7 @@
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "HttpTrigger": "https://teammodelosfunction-test.chinacloudsites.cn/api/",
     //"HttpTrigger": "http://localhost:7071/api/"
-    "Version": "5.2403.13.1"
+    "Version": "5.2403.20.1"
   },
   "Azure": {
 

+ 1 - 1
TEAMModelOS/appsettings.json

@@ -18,7 +18,7 @@
     "Exp": 86400,
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "HttpTrigger": "https://teammodelosfunction.chinacloudsites.cn/api/",
-    "Version": "5.2403.13.1"
+    "Version": "5.2403.20.1"
   },
   "Azure": {
     "Storage": {