ソースを参照

Merge branch 'develop' of http://163.228.141.122:3000/TEAMMODEL/TEAMModelOS into develop

jeff 8 ヶ月 前
コミット
65cb74e904

+ 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.2409.11</Version>
-		<AssemblyVersion>5.2409.11.1</AssemblyVersion>
-		<FileVersion>5.2409.11.1</FileVersion>
+		<Version>5.2409.18</Version>
+		<AssemblyVersion>5.2409.18.1</AssemblyVersion>
+		<FileVersion>5.2409.18.1</FileVersion>
 		<Description>TEAMModelBI(BI)</Description>
 		<PackageReleaseNotes>BI版本说明版本切换标记2022000908</PackageReleaseNotes>
 		<PackageId>TEAMModelBI</PackageId>

+ 6 - 1
TEAMModelOS.Extension/HTEX.Test/Controllers/LessonRecordController.cs

@@ -983,7 +983,7 @@ namespace HTEX.Test.Controllers
                 {
                     if (student.attend==1) 
                     {
-                        var work = taskData.clientWorks.Find(x => x.seatID.Equals(student.seatID));
+                        var work = taskData.clientWorks.Find(x =>$"{x.seatID}".Equals(student.seatID));
                         if (work!= null)
                         {
                             student.taskRecord.itemRecords.Add(new ItemRecord { itemType="WrkSpaceLoad", itemScore=10, resultWeight=InteractWeight.T1, resultType=InteractReultType.T1, isGroup= work.isGroupItem });
@@ -1006,7 +1006,12 @@ namespace HTEX.Test.Controllers
                         student.taskRecord.itemRecords[indexTask].isGroup=true;
                     }
                 }
+                taskData.clientWorks.Find(x => x.seatID==0 && x.isGroupItem);
+
+
                 indexTask++;
+
+
             }
             return studentLessonDatas;
         }

+ 450 - 0
TEAMModelOS.Function/IESServiceBusTrigger.cs

@@ -2305,6 +2305,456 @@ namespace TEAMModelOS.Function
             {
 
                 jsonMsg.TryGetProperty("id", out JsonElement id);
+                List<string> s = new List<string> {
+    "618383714644267008",
+    "618630854016634880",
+    "618639271695355904",
+    "618640449749520384",
+    "620623657311539200",
+    "620769989728800768",
+    "620775070238904320",
+    "620775832566239232",
+    "620776913832644608",
+    "620787217111060480",
+    "620795220476432384",
+    "620796468495781888",
+    "620796818011328512",
+    "620796996902588416",
+    "620797607958155264",
+    "620798527320231936",
+    "620798663412813824",
+    "620799211566403584",
+    "620807116025892864",
+    "620808910961512448",
+    "620809140889063424",
+    "620809163706077184",
+    "620809855023845376",
+    "620809903249952768",
+    "620809998108332032",
+    "620810231823339520",
+    "620810301507506176",
+    "620820698989989888",
+    "620821342563995648",
+    "620822046326263808",
+    "620825397654851584",
+    "620827827394187264",
+    "620852427683401728",
+    "620860204376002560",
+    "620860252375617536",
+    "620861281972391936",
+    "620861393083699200",
+    "620872932612247552",
+    "620873604166455296",
+    "620873982954049536",
+    "620875597110972416",
+    "620887684918939648",
+    "621006983390171136",
+    "621134228180045824",
+    "621140417219530752",
+    "621140419836776448",
+    "621140523113123840",
+    "621140731976880128",
+    "621140902445977600",
+    "621141275739033600",
+    "621143057429041152",
+    "621143125586481152",
+    "621157412396732416",
+    "621159069046149120",
+    "621159268762128384",
+    "621159391265165312",
+    "621159539403788288",
+    "621159910557749248",
+    "621160830200844288",
+    "621161420683350016",
+    "621163812778807296",
+    "621171574149615616",
+    "621172460670291968",
+    "621172564609339392",
+    "621173834309046272",
+    "621174044871495680",
+    "621174420630802432",
+    "621185040327512064",
+    "621189837134893056",
+    "621209903113048064",
+    "621216625554755584",
+    "621221078127218688",
+    "621222075952140288",
+    "621226486669643776",
+    "621241713205317632",
+    "621241909414858752",
+    "621242593262571520",
+    "621248963063975936",
+    "621257063040946176",
+    "621273984884936704",
+    "621495724793794560",
+    "621495850035712000",
+    "621498114712408064",
+    "621498577683877888",
+    "621502049258967040",
+    "621502108839055360",
+    "621502698155544576",
+    "621502898777493504",
+    "621503510453817344",
+    "621503555412561920",
+    "621506847777624064",
+    "621520920695148544",
+    "621521083635470336",
+    "621521363424907264",
+    "621521375567417344",
+    "621521389098242048",
+    "621521653108707328",
+    "621521660582957056",
+    "621521683827789824",
+    "621521884051279872",
+    "621521898194472960",
+    "621522476920344576",
+    "621534127023329280",
+    "621534745100161024",
+    "621535185141370880",
+    "621535527392382976",
+    "621536467751145472",
+    "621537051912835072",
+    "621545585819914240",
+    "621545749347438592",
+    "621546190210732032",
+    "621546198939078656",
+    "621546327259615232",
+    "621546608848408576",
+    "621546623889182720",
+    "621546729304625152",
+    "621546908657258496",
+    "621547271217090560",
+    "621547305165787136",
+    "621548274305863680",
+    "621548738644676608",
+    "621560315955515392",
+    "621570029082775552",
+    "621583702312488960",
+    "621585124852633600",
+    "621585130619801600",
+    "621585142753923072",
+    "621585618891313152",
+    "621585632594104320",
+    "621585771522035712",
+    "621585949750595584",
+    "621586049138823168",
+    "621586610647076864",
+    "621586659619770368",
+    "621586703425081344",
+    "621586819213037568",
+    "621587431103270912",
+    "621590758717263872",
+    "621594392976822272",
+    "621597857589366784",
+    "621598710492696576",
+    "621598756407742464",
+    "621599238425546752",
+    "621599453819834368",
+    "621599484266287104",
+    "621606663941656576",
+    "621610325862649856",
+    "621613236986449920",
+    "621621051201294336",
+    "621622557698822144",
+    "621630794242330624",
+    "621631243456483328",
+    "621839863603400704",
+    "621855326978838528",
+    "621857043967512576",
+    "621857880064266240",
+    "621858877289402368",
+    "621862082693959680",
+    "621864237685411840",
+    "621864472558047232",
+    "621864527574732800",
+    "621864798048620544",
+    "621864858887000064",
+    "621865499801817088",
+    "621865555359567872",
+    "621865835274833920",
+    "621865890400571392",
+    "621866248472498176",
+    "621866587540033536",
+    "621868088098426880",
+    "621876561452339200",
+    "621881641173913600",
+    "621882854607032320",
+    "621883068969521152",
+    "621883353146200064",
+    "621883457919913984",
+    "621883502266290176",
+    "621883800519053312",
+    "621883885965414400",
+    "621883983122272256",
+    "621884114848583680",
+    "621884263620546560",
+    "621884289134497792",
+    "621884510103015424",
+    "621885173524467712",
+    "621885336242491392",
+    "621887597106565120",
+    "621895190914928640",
+    "621895267435810816",
+    "621896772893151232",
+    "621896954112249856",
+    "621897027445460992",
+    "621897567604707328",
+    "621898107998834688",
+    "621898158200459264",
+    "621898307727396864",
+    "621899526344675328",
+    "621899907745320960",
+    "621900186205163520",
+    "621900586954133504",
+    "621902361522212864",
+    "621907255788441600",
+    "621907685201285120",
+    "621907837408382976",
+    "621907935248912384",
+    "621908115318771712",
+    "621908325801529344",
+    "621908468491751424",
+    "621908571340279808",
+    "621908735153016832",
+    "621908903726288896",
+    "621909104381792256",
+    "621909105279373312",
+    "621909121045762048",
+    "621909147788644352",
+    "621909587787911168",
+    "621911671153233920",
+    "621927305996013568",
+    "621931295357931520",
+    "621936143780417536",
+    "621944983200600064",
+    "621946012356972544",
+    "621947865941544960",
+    "621948210059022336",
+    "621948717678858240",
+    "621948780962516992",
+    "621948988794474496",
+    "621949657597218816",
+    "621950255608500224",
+    "621950550191247360",
+    "621951554739638272",
+    "621953293903597568",
+    "621960223103520768",
+    "621961256588414976",
+    "621961351497125888",
+    "621961595106496512",
+    "621961662425075712",
+    "621961687637037056",
+    "621962004848054272",
+    "621972944641462272",
+    "621973028535930880",
+    "621973421928091648",
+    "621983405936087040",
+    "621983416874831872",
+    "621990945226887168",
+    "622039347297914880",
+    "622219970734067712",
+    "622220445072101376",
+    "622220823196995584",
+    "622220907095658496",
+    "622223212322885632",
+    "622224898378567680",
+    "622225102506954752",
+    "622225609669611520",
+    "622226526473162752",
+    "622227538005069824",
+    "622227658805219328",
+    "622227856478572544",
+    "622227891815583744",
+    "622227960128212992",
+    "622227975408062464",
+    "622228052939771904",
+    "622228232720224256",
+    "622228393873772544",
+    "622228505719083008",
+    "622228860137771008",
+    "622229248001839104",
+    "622229337097244672",
+    "622230050397360128",
+    "622230265825202176",
+    "622233666738851840",
+    "622238207286841344",
+    "622240271798767616",
+    "622241089964871680",
+    "622244395906895872",
+    "622245488581808128",
+    "622245757847736320",
+    "622245884159201280",
+    "622245889892814848",
+    "622245980032602112",
+    "622246004212764672",
+    "622246022705451008",
+    "622246065927753728",
+    "622246080335187968",
+    "622246147259502592",
+    "622246192981610496",
+    "622246261495566336",
+    "622246278109204480",
+    "622246282668412928",
+    "622246483055480832",
+    "622246622339928064",
+    "622246713217912832",
+    "622246858013675520",
+    "622247047160008704",
+    "622247254035664896",
+    "622247279268597760",
+    "622247453541928960",
+    "622247491684929536",
+    "622247646895149056",
+    "622251530136981504",
+    "622251552287100928",
+    "622258462763651072",
+    "622259695020806144",
+    "622259719721062400",
+    "622259793050079232",
+    "622260041864581120",
+    "622260121753489408",
+    "622260262698881024",
+    "622260594808066048",
+    "622260655138934784",
+    "622261274935431168",
+    "622262066278961152",
+    "622262263742599168",
+    "622263672001138688",
+    "622263717878435840",
+    "622263723100344320",
+    "622269779817926656",
+    "622269797727604736",
+    "622270569076887552",
+    "622271023580057600",
+    "622271240979222528",
+    "622271452737048576",
+    "622271922943692800",
+    "622271923249876992",
+    "622272290687684608",
+    "622272351601561600",
+    "622272463929217024",
+    "622273113996005376",
+    "622273866223456256",
+    "622275106814693376",
+    "622276503392096256",
+    "622293124038922240",
+    "622299198368387072",
+    "622299566657638400",
+    "622308746101657600",
+    "622309927267995648",
+    "622310108138967040",
+    "622310282273886208",
+    "622310583643017216",
+    "622310608724955136",
+    "622311985710764032",
+    "622314395556515840",
+    "622316532587958272",
+    "622322941039874048",
+    "622323748095266816",
+    "622324453879189504",
+    "622324555704307712",
+    "622324605692022784",
+    "622324710977441792",
+    "622325020995227648",
+    "622325982782689280",
+    "622328362156822528",
+    "622334274850394112",
+    "622334637619941376",
+    "622334916306276352",
+    "622334986128855040",
+    "622335973317021696",
+    "622340107449536512",
+    "622344942609633280",
+    "622345546320973824",
+    "622345954045071360",
+    "622346791358173184",
+    "622347785412415488",
+    "622361047629697024",
+    "622405414553784320",
+    "622583006623830016",
+    "622584532436127744",
+    "622585605171318784",
+    "622586185612660736",
+    "622588372107530240",
+    "622588944613249024",
+    "622589254186438656",
+    "622589637961060352",
+    "622589842081058816",
+    "622590144456822784",
+    "622590268654358528",
+    "622590486774943744",
+    "622590764236541952",
+    "622592268297179136",
+    "622592702449586176",
+    "622592802303381504",
+    "622592966657183744",
+    "622593517155389440",
+    "622594158418333696",
+    "622594188415995904",
+    "622607181128273920",
+    "622607931682197504",
+    "622608246716370944",
+    "622608915187765248",
+    "622608915510726656",
+    "622608955004293120",
+    "622608983328428032",
+    "622608997937188864",
+    "622609215504125952",
+    "622609295036518400",
+    "622609716161417216",
+    "622609742610698240",
+    "622609827109146624",
+    "622609914099011584",
+    "622610318786433024",
+    "622611925741735936",
+    "622613074079256576",
+    "622616982373666816",
+    "622617143690792960",
+    "622620865342869504",
+    "622621344152031232",
+    "622621393175056384",
+    "622621606023401472",
+    "622621657919524864",
+    "622622042872745984",
+    "622622158262243328",
+    "622622397194964992",
+    "622622603592470528",
+    "622623080405143552",
+    "622623915684007936",
+    "622631228293648384",
+    "622632572509360128",
+    "622633696058544128",
+    "622633823452139520",
+    "622634178072154112",
+    "622634841116119040",
+    "622636899290451968",
+    "622637249405784064",
+    "622653321093713920",
+    "622657909020561408",
+    "622660365188206592",
+    "622661493611171840",
+    "622664206759628800",
+    "622672465625223168",
+    "622672985035247616",
+    "622673340770947072",
+    "622673525802668032",
+    "622675496630620160",
+    "622678171988398080",
+    "622686096526020608",
+    "622686635628302336",
+    "622691564308795392",
+    "622696936868286464",
+    "622698217171193856",
+    "622698246917197824",
+    "622698450546462720",
+    "622700153312251904",
+    "622706572044406784",
+    "622706971199541248",
+    "622707320647979008",
+    "622714029521113088",
+    "622978992772878336"};
+                if (s.Contains($"{id}"))
+                { return;}
                 jsonMsg.TryGetProperty("progress", out JsonElement progress);
                 jsonMsg.TryGetProperty("code", out JsonElement _code);
                 jsonMsg.TryGetProperty("tmdid", out JsonElement tmdid);

+ 3 - 3
TEAMModelOS.Function/TEAMModelOS.Function.csproj

@@ -5,9 +5,9 @@
     <OutputType>Exe</OutputType>
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
-	<Version>5.2409.11</Version>
-	<AssemblyVersion>5.2409.11.1</AssemblyVersion>
-	<FileVersion>5.2409.11.1</FileVersion>
+	<Version>5.2409.18</Version>
+	<AssemblyVersion>5.2409.18.1</AssemblyVersion>
+	<FileVersion>5.2409.18.1</FileVersion>
 	<PackageId>TEAMModelOS.FunctionV4</PackageId>
 	<Authors>teammodel</Authors>
 	<Company>醍摩豆(成都)信息技术有限公司</Company>

+ 1 - 1
TEAMModelOS.SDK/Models/Service/LessonService.cs

@@ -178,7 +178,7 @@ namespace TEAMModelOS.SDK.Models.Service
                 string hs = lessonBase?.report?.clientSummaryList.ToJsonString();
                 var clientSummaryLists = lessonBase?.report?.clientSummaryList?.Where(x => x.groupTaskCompleteCount != 0 || x.groupScore != 0 || x.score != 0 || x.interactScore != 0 || x.taskCompleteCount != 0);
                 IEnumerable<LessonStudent> students = new List<LessonStudent>();
-                if (clientSummaryLists.Any())
+                if (clientSummaryLists!=null && clientSummaryLists.Any())
                 {
                     var ids = clientSummaryLists.Select(x => x.seatID);
                     students = lessonBase.student.Where(x => ids.Contains(x.seatID));

+ 3 - 3
TEAMModelOS.SDK/TEAMModelOS.SDK.csproj

@@ -1,9 +1,9 @@
 <Project Sdk="Microsoft.NET.Sdk">
 	<PropertyGroup>
 		<TargetFramework>net8.0</TargetFramework>
-		<Version>5.2409.11</Version>
-		<AssemblyVersion>5.2409.11.1</AssemblyVersion>
-		<FileVersion>5.2409.11.1</FileVersion>
+		<Version>5.2409.18</Version>
+		<AssemblyVersion>5.2409.18.1</AssemblyVersion>
+		<FileVersion>5.2409.18.1</FileVersion>
 		<PackageReleaseNotes>发版</PackageReleaseNotes>
 	</PropertyGroup>
 

+ 1 - 1
TEAMModelOS/ClientApp/public/index.html

@@ -61,7 +61,7 @@
 			document.write('<script id="mathjax"  src="' + blobHost + '/0-public/js/tex-mml-svg.js"><\/script>');
 			document.write('<script id="mediaInfo"  src="' + blobHost + '/0-public/js/checkMedia.js"><\/script>');
 			document.write('<script id="e_theme_macarons"  src="<%= BASE_URL %>theme/e_theme_macarons.js"><\/script>');
-			document.write('<script id="mathjax" type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"><\/script>');
+			document.write('<script id="mathjax" type="text/javascript" src="' + blobHost + '/0-public/js/tex-chtml.js"><\/script>');
 
 			window.onload = function () {
 				let bodyElement = document.body;

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -2778,6 +2778,7 @@ const LANG_EN_US = {
         imported4: 'Key concepts',
         treeName: 'Key concept tree name',
         addTree: 'New key concept Tree',
+        addTreeTips: 'Please add the key concept tree first',
     },
     // 活动模块
     learnActivity: {

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -2777,6 +2777,7 @@ const LANG_ZH_CN = {
         imported4: '个知识点',
         treeName: '知识点树名',
         addTree: '新增知识点树',
+        addTreeTips: '请先添加知识点树',
     },
     // 活动模块
     learnActivity: {

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -2780,6 +2780,7 @@ const LANG_ZH_TW = {
         imported4: '個知識點',
         treeName: '知識點樹名',
         addTree: '新增知識點樹',
+        addTreeTips: '請先新增知識點樹',
     },
     // 活动模块
     learnActivity: {

+ 2 - 1
TEAMModelOS/ClientApp/src/view/evaluation/components/BasePoints.vue

@@ -26,7 +26,8 @@
       <Select v-model="selectTree" @on-change="getPoints">
         <Option v-for="(item, index) in treeList" :value="item.id" :key="index">{{ item.name }}</Option>
       </Select>
-      <Icon type="md-add-circle" color="#40A8F0" size="16" :title="$t('knowledge.addPoint')" style="cursor:pointer; margin-left: 5px;" @click="getKnowledgeTree()" />
+      <Icon v-if="treeList.length" type="md-add-circle" color="#40A8F0" size="16" :title="$t('knowledge.addPoint')" style="cursor:pointer; margin-left: 5px;" @click="getKnowledgeTree()" />
+      <span v-else>{{ $t('knowledge.addTreeTips') }}</span>
     </div>
 
     <div style="margin-top: 20px;">

+ 32 - 17
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -49,6 +49,7 @@ using DocumentFormat.OpenXml.Wordprocessing;
 using Microsoft.AspNetCore.Http.HttpResults;
 using DocumentFormat.OpenXml.Drawing.Charts;
 using TEAMModelOS.Models.Dto;
+using FastJSON;
 
 
 namespace TEAMModelOS.Controllers
@@ -420,6 +421,10 @@ namespace TEAMModelOS.Controllers
                             clds.Add(cla.id);
                         }
                     }
+                    if (clds.Count == 0)
+                    {
+                        return Ok(new { orderScore = Array.Empty<string>(), typeCount = Array.Empty<string>(), gradeRate = Array.Empty<string>(), pCount = 0, gradeExamAverageScore = 0, point = 0, code = 200 });
+                    }
                 }
 
                 //处理班级ID
@@ -468,8 +473,8 @@ namespace TEAMModelOS.Controllers
                 List<ExamClassResult> classResults = new();
                 List<ExamClassResult> results = new();
 
-                var point = paperSimples.FirstOrDefault().point.Sum();
-                var gradeExamAverageScore = Math.Round(averages.Select(c => c.score).Sum() / averages.Count,2);
+                var point = paperSimples.Count > 0 ? paperSimples.FirstOrDefault().point.Sum() : 0;
+                var gradeExamAverageScore = averages.Count >0 ? Math.Round(averages.Select(c => c.score).Sum() / averages.Count,2) : 0;
                 if (clas.Count == 0)
                 {
                     var queryClass = $"select value(c) from c where  c.examId in ({string.Join(",", ids.Select(o => $"'{o}'"))})";
@@ -504,7 +509,7 @@ namespace TEAMModelOS.Controllers
                         x.Key,
                         cc = x.ToList().Count,
                         students = x.ToList().SelectMany(z => z.studentIds).Distinct().ToList(),
-                        classRate = Math.Round(x.ToList().Select(z => z.average).Sum() / x.ToList().Count,2)
+                        classRate = x.ToList().Count > 0 ? Math.Round(x.ToList().Select(z => z.average).Sum() / x.ToList().Count,2) : 0
                         //score = x.ToList().Select(k => k.sum).Aggregate((current, next) => current.Zip(next, (a, b) => a + b).ToList()),
                         //gRate = Math.Round( x.ToList().SelectMany(k => k.sum).Sum() / x.ToList().Count / members.Count, 2)
                     });
@@ -527,8 +532,8 @@ namespace TEAMModelOS.Controllers
                     students = x.ToList().SelectMany(z => z.studentIds).Distinct().ToList(),
                     classRate = x.ToList().GroupBy(z => z.info.id).Select(m => new { 
                         classId = m.Key,
-                        className = groups.Where(k => k.id.Equals(m.Key)).FirstOrDefault().name,
-                        rate = Math.Round(m.ToList().Select(k => k.average).Sum() / m.ToList().Count / point,4)
+                        className = groups.Where(k => k.id.Equals(m.Key)).FirstOrDefault()?.name,
+                        rate = point > 0 ? Math.Round(m.ToList().Select(k => k.average).Sum() / m.ToList().Count / point,4) :0
                     })
                     //score = x.ToList().Select(k => k.sum).Aggregate((current, next) => current.Zip(next, (a, b) => a + b).ToList()),
                     //gRate = Math.Round(x.ToList().SelectMany(k => k.sum).Sum() / x.ToList().Count / members.Count, 2)
@@ -536,7 +541,7 @@ namespace TEAMModelOS.Controllers
                 var gradeRate = examAllScore.Select(x => new
                 {
                     subjectId = x.Key,
-                    subjectName = subs.Where(z => z.id.Equals(x.Key)).FirstOrDefault().name,
+                    subjectName = subs.Where(z => z.id.Equals(x.Key)).FirstOrDefault()?.name,
                     x.classRate
                     //x.gRate
                 });
@@ -546,20 +551,20 @@ namespace TEAMModelOS.Controllers
                     var orderScore = stuScore.Select(x => new
                     {
                         subjectId = x.sub,
-                        subjectName = subs.Where(z => z.id.Equals(x.sub)).FirstOrDefault().name,
-                        classRate = Math.Round(x.average / point, 4),
+                        subjectName = subs.Where(z => z.id.Equals(x.sub)).FirstOrDefault()?.name,
+                        classRate = point > 0 ? Math.Round(x.average / point, 4) : 0,
                         rank = x.subScore.OrderByDescending(x => x.score).Select(z => z.id).ToList().IndexOf(studentId.GetString()) + 1,
                         stuRate = x.subScore.OrderByDescending(x => x.score).Select(z => new
                         {
                             z.id,
-                            members.Where(s => s.id.Equals(z.id)).FirstOrDefault().name,
-                            rate = Math.Round(z.score / point, 4)
+                            members.Where(s => s.id.Equals(z.id)).FirstOrDefault()?.name,
+                            rate = point > 0 ? Math.Round(z.score / point, 4) :0
                         }).ToList().Take(10),
                         sper = x.subScore.Where(c => c.id.Equals(studentId.GetString())).Select(z => new
                         {
                             z.id,
-                            members.Where(s => s.id.Equals(z.id)).FirstOrDefault().name,
-                            rate = Math.Round(z.score / point, 4)
+                            members.Where(s => s.id.Equals(z.id)).FirstOrDefault()?.name,
+                            rate = point>0 ?  Math.Round(z.score / point, 4) :0
                         })
                     });
                     return Ok(new { orderScore, typeCount, gradeRate, pCount = members.Count, gradeExamAverageScore, point, code = 200 });
@@ -569,12 +574,13 @@ namespace TEAMModelOS.Controllers
                     var orderScore = stuScore.Select(x => new
                     {
                         subjectId = x.sub,
-                        subjectName = subs.Where(z => z.id.Equals(x.sub)).FirstOrDefault().name,
-                        classRate = Math.Round(x.average / point,4),
+                        subjectName = subs.Where(z => z.id.Equals(x.sub)).FirstOrDefault()?.name,
+                        classRate = point > 0 ? Math.Round(x.average / point,4) : 0,
                         stuRate = x.subScore.OrderByDescending(x => x.score).Select(z => new
                         {
                             z.id,
-                            rate = Math.Round(z.score / point, 4)
+                            members.Where(s => s.id.Equals(z.id)).FirstOrDefault()?.name,
+                            rate = point > 0 ? Math.Round(z.score / point, 4) : 0
                         }).ToList().Take(10)
                     });
                     return Ok(new { orderScore, typeCount, gradeRate, pCount = members.Count, gradeExamAverageScore, point, code = 200 });
@@ -892,8 +898,8 @@ namespace TEAMModelOS.Controllers
 
 
         [ProducesDefaultResponseType]
-        [AuthToken(Roles = "teacher,admin,student")]
 
+        [AuthToken(Roles = "teacher,admin,student")]
 #if !DEBUG
         [Authorize(Roles = "IES")]
 #endif
@@ -1064,8 +1070,17 @@ namespace TEAMModelOS.Controllers
                         }
                     }
                 }
+                School schoolBase = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemAsync<School>(code.GetString(), new PartitionKey("Base"));
+                var periodInfo = schoolBase.period.Find(x => x.id.Equals($"{period}"));
+                List<GroupListDto> allClasses = new List<GroupListDto>();
+                //获取该学校某学段全部行政班级
+                allClasses = await GroupListService.GetGroupListByType(_azureCosmos.GetCosmosClient(), "class", schoolBase, periodInfo, 0);
+                var classData = allClasses.Select(x => new { 
+                    x.id,
+                    x.name
+                });
                 var groups = exams.Where(e => null != e.examType && !string.IsNullOrWhiteSpace(e.examType.id)).GroupBy(x => x.examType.name).Select(y => new { key = y.Key, count = y.ToList().Count }).ToList();
-                return Ok(new { examInfo, token = token, year, count = exams.Count, groups });
+                return Ok(new { examInfo, token, year, count = exams.Count, groups, classData });
             }
             catch (Exception e)
             {

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

@@ -85,8 +85,18 @@ namespace TEAMModelOS.Controllers
         [HttpGet("test-str")]
         [RequestSizeLimit(102_400_000_00)] //最大10000m左右
         public async Task<IActionResult> Tes1t() {
-           var a =  _azureStorage.GetBlobServiceClient();
-            return Ok(1);
+            string sql = "SELECT value c  FROM c  where c.code='LessonRecord-xcfx'   and c.expire>0  and c.startTime>1725120000000  and c.startTime <1726625780897 and c.status=0";
+            var  result =  await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).GetList<LessonRecord>(sql, "LessonRecord-xcfx");
+            List<LessonRecord> list = result.list;
+            List<string> ids= new   List<string>();
+            foreach (var item in list)
+            {
+                item.expire=-1;
+                item.status=0;
+                var result1 = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).UpsertItemAsync<LessonRecord>(item,new PartitionKey(item.code));
+                ids.Add(item.id);
+            }
+            return Ok(ids);
         }
 
         /// <summary>

+ 4 - 4
TEAMModelOS/TEAMModelOS.csproj

@@ -80,11 +80,11 @@
 		<SpaRoot>ClientApp\</SpaRoot>
 		<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
 		<UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-		<Version>5.2409.11</Version>
-		<AssemblyVersion>5.2409.11.1</AssemblyVersion>
-		<FileVersion>5.2409.11.1</FileVersion>
+		<Version>5.2409.18</Version>
+		<AssemblyVersion>5.2409.18.1</AssemblyVersion>
+		<FileVersion>5.2409.18.1</FileVersion>
 		<Description>TEAMModelOS(IES5)</Description>
-		<PackageReleaseNotes>IES版本说明版本切换标记5.2409.11.1</PackageReleaseNotes>
+		<PackageReleaseNotes>IES版本说明版本切换标记5.2409.18.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.2409.11.1"
+    "Version": "5.2409.18.1"
   },
   "Azure": {
     // 测试站数据库

+ 1 - 1
TEAMModelOS/appsettings.json

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