OnePsycho 3 년 전
부모
커밋
a261020687
2개의 변경된 파일29개의 추가작업 그리고 29개의 파일을 삭제
  1. 21 21
      TEAMModelOS/ClientApp/src/locale/lang/en-US/answerSheet.js
  2. 8 8
      TEAMModelOS/Controllers/Analysis/ClassAnalysisController.cs

+ 21 - 21
TEAMModelOS/ClientApp/src/locale/lang/en-US/answerSheet.js

@@ -1,26 +1,26 @@
 export default {
 	dp:{
-		secret:'絕密 ★ 啟用前',
-		editTip:'點擊編輯內容',
-		edit:'編輯內容',
-		download:'下載試卷',
-		settings:'試卷設置',
-		setting1:'左側密封線',
-		setting2:'考試信息欄',
-		setting3:'自定義內容',
-		setting4:'密封標識',
-		setting5:'答案與解析',
-		totalScore:'考試總分',
-		score:'',
-		tip1:'註意事項',
-		tip2:'答題前填寫好自己的姓名、班級、考號等信息',
-		tip3:'請將答案正確填寫在答題卡上',
-		loading:'試卷生成中',
-		school:'學校',
-		className:'班級',
-		name:'姓名',
-		id:'學號',
-		lineTip:'-------密-------封-------線-------內-------不-------要-------答-------題-------'
+		secret:'Secret',
+		editTip:'edit content',
+		edit:'edit content',
+		download:'Download',
+		settings:'Settings',
+		setting1:'left sealing line',
+		setting2:'Test Information',
+		setting3:' Custom content',
+		setting4:'Seal label',
+		setting5:'Answer and Analysis',
+		totalScore:'Total score',
+		score:'score',
+		tip1:'Tips',
+		tip2:'Fill in your name, class level, test number and other information before answering the question.',
+		tip3:'Fill in the answer correctly on the answer card.',
+		loading:'Volume generation in progress',
+		school:'School',
+		className:'Class',
+		name:'Name',
+		id:'ID',
+		lineTip:'Do not answer in the dashed line area.'
 	},
 	sheetTip1:'Note',
 	sheetTip2:'1. The height of subjective question answer area can be quickly adjusted by clicking and dragging on the lower border.',

+ 8 - 8
TEAMModelOS/Controllers/Analysis/ClassAnalysisController.cs

@@ -756,7 +756,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 var client = _azureCosmos.GetCosmosClient();
                 List<LessonRecord> records = new List<LessonRecord>();
                 StringBuilder sql = new StringBuilder($"select value(c) from c where c.school = '{code}' and c.periodId = '{periodId}'");
-                if (request.TryGetProperty("tmdname", out JsonElement tmdname))
+                /*if (request.TryGetProperty("tmdname", out JsonElement tmdname))
                 {
                     sql.Append($" and c.tmdname='{tmdname}'");
                 }
@@ -771,8 +771,8 @@ namespace TEAMModelOS.Controllers.Analysis
                 if (request.TryGetProperty("subjectId", out JsonElement subjectId))
                 {
                     sql.Append($" and c.subjectId='{subjectId}'");
-                }
-                string continuationToken = string.Empty;
+                }*/
+                /*string continuationToken = string.Empty;
                 string token = default;
                 //是否需要进行分页查询,默认不分页
                 bool iscontinuation = false;
@@ -789,9 +789,9 @@ namespace TEAMModelOS.Controllers.Analysis
                     {
                         topcout = data;
                     }
-                }
+                }*/
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(
-                    queryText: sql.ToString(), continuationToken: token, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"LessonRecord-{code}") }))
+                    queryText: sql.ToString(), requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"LessonRecord-{code}") }))
                 {
                     using var json = await JsonDocument.ParseAsync(item.ContentStream);
                     if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
@@ -801,11 +801,11 @@ namespace TEAMModelOS.Controllers.Analysis
                             records.Add(obj.ToObject<LessonRecord>());
                         }
                     }
-                    if (iscontinuation)
+                    /*if (iscontinuation)
                     {
                         continuationToken = item.GetContinuationToken();
                         break;
-                    }
+                    }*/
                 }
                 double total = records.Count;
                 double teachCount = records.Where((x, i) => records.FindIndex(z => z.tmdid == x.tmdid) == i).ToList().Count;
@@ -814,7 +814,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 double interactCount = records.Select(c => c.clientInteractionCount).Sum();
                 List<(string name, double count)> rc = await getRecordCount(client, records, stime.GetInt64(), etime.GetInt64(), code.GetString(), "", periodId.GetString());
                 double semester = rc.Where(r => r.name.Equals("semester")).FirstOrDefault().count;
-                return Ok(new { records, total, teachCount, taskCount, workCount, interactCount, semester });
+                return Ok(new {total, teachCount, taskCount, workCount, interactCount, semester });
             }
             catch (Exception ex)
             {