Просмотр исходного кода

Merge branch 'fix/outlook-report-payload-fixtures' of jyx/dcjxb.microservice into master

金逸霄 3 недель назад
Родитель
Сommit
c619ce665d

+ 37 - 43
abilities/exam-sprint/application/src/test/java/cn/yunzhixue/ability/center/examsprint/application/report/ExamSprintReportApplicationServiceTest.java

@@ -271,53 +271,47 @@ class ExamSprintReportApplicationServiceTest {
                         "当前阶段:稳态提升",
                         "核心观察:阅读词汇优于写作输出,仍需补齐同义替换。",
                         78),
-                new OutlookExamSprintReportPayload.SyllabusMasteryProfile(
+                new OutlookExamSprintReportPayload.SyllabusMasteryChart(
+                        4200,
+                        3192,
+                        1008,
                         76,
-                        "核心考纲理解较稳,长尾主题词还存在断层。",
-                        "先补齐教育、科技和环境主题词,再做套题复盘。",
-                        List.of(
-                                new OutlookExamSprintReportPayload.DimensionScore("核心考纲", 82),
-                                new OutlookExamSprintReportPayload.DimensionScore("场景迁移", 71),
-                                new OutlookExamSprintReportPayload.DimensionScore("同义替换", 68))),
-                new OutlookExamSprintReportPayload.VocabularyProfile(
-                        620,
+                        "考纲词汇掌握概览",
+                        "先补齐教育、科技和环境主题词,再做套题复盘。"),
+                new OutlookExamSprintReportPayload.PastPaperVocabularyChart(
                         800,
-                        78,
-                        "Exam 高频词识别准确,但主动输出不够稳定。",
-                        "每次精听后补 5 组同义替换并做口头复述。",
-                        List.of("cohesion", "allocate", "feasible")),
-                new OutlookExamSprintReportPayload.VocabularyProfile(
-                        1400,
-                        1800,
+                        180,
+                        120,
+                        "预计提分 5-10 分",
+                        "每次精听后补 5 组同义替换并做口头复述。"),
+                new OutlookExamSprintReportPayload.HighFrequencyVocabularyChart(
                         77,
-                        "Common 高频词覆盖较广,但易混词记忆不牢。",
-                        "围绕校园、城市、科技场景做词块复现。",
-                        List.of("sustainable", "motivate", "urban")),
-                List.of(
-                        new OutlookExamSprintReportPayload.VocabularyFrequencyBand("2k 高频", 86, 90),
-                        new OutlookExamSprintReportPayload.VocabularyFrequencyBand("3k 高频", 78, 88),
-                        new OutlookExamSprintReportPayload.VocabularyFrequencyBand("学术词", 62, 80)),
-                List.of(
-                        new OutlookExamSprintReportPayload.SprintPlanOption(
-                                "7 天提分冲刺",
-                                "1 周",
-                                "推荐",
-                                "先保阅读和听力高频正确率",
-                                List.of("晨读 30 分钟", "晚间套题复盘", "错词二次听写"),
-                                "预计把高频词稳定率拉升到 82%"),
-                        new OutlookExamSprintReportPayload.SprintPlanOption(
-                                "21 天系统巩固",
-                                "3 周",
-                                "稳妥",
-                                "补齐学术词和写作替换",
-                                List.of("主题词块复现", "周测 2 次", "口语素材改写"),
-                                "预计把学术词掌握提升到 75%")),
-                new OutlookExamSprintReportPayload.DiagnosticCaseStudy(
+                        62,
+                        "Common 高频词覆盖较广,但易混词记忆不牢。"),
+                new OutlookExamSprintReportPayload.VocabularyFrequencyBandChart(
+                        List.of(
+                                new OutlookExamSprintReportPayload.VocabularyFrequencyBar("2k 高频", 86, "优先学习", "#448aff"),
+                                new OutlookExamSprintReportPayload.VocabularyFrequencyBar("3k 高频", 78, "重点突破", "#4caf50"),
+                                new OutlookExamSprintReportPayload.VocabularyFrequencyBar("学术词", 62, "酌情学习", "#ff9800"))),
+                new OutlookExamSprintReportPayload.FrequencyPlan(
+                        List.of(
+                                new OutlookExamSprintReportPayload.FrequencyPlanCard(3, "+12 分", 78, true, "推荐", "③"),
+                                new OutlookExamSprintReportPayload.FrequencyPlanCard(2, "+8 分", 61, false, "稳妥", "②")),
+                        "💡建议策略",
+                        "7 天提分冲刺优先保证高频词正确率,再逐步覆盖中频词。",
+                        List.of(
+                                new OutlookExamSprintReportPayload.PhaseSuggestion("考前半个月·核心突击期", "围绕高频词建立记忆闭环。"),
+                                new OutlookExamSprintReportPayload.PhaseSuggestion("考前一周·强化巩固期", "结合真题错词做循环复盘。"))),
+                new OutlookExamSprintReportPayload.ScoreImprovementCaseStudy(
                         "教育类阅读题案例",
-                        "遇到 unfamiliar policy terms 时定位速度明显下降。",
-                        "说明教育政策主题词和近义替换储备不足。",
-                        "建立 policy / curriculum / assessment 词网并结合真题复现。",
-                        "先按主题建网,再回到题目验证。")));
+                        "李同学",
+                        "考前半个月·核心突击期",
+                        705,
+                        237,
+                        33.6,
+                        "70 分以下",
+                        89,
+                        19)));
     }
 
     private static class TestRepository implements ExamSprintReportRepository {

+ 44 - 50
ability-center-runtime/src/test/resources/requests/exam-sprint-outlook-report-request.json

@@ -14,61 +14,55 @@
       "keyInsight": "核心观察:阅读词汇优于写作输出,仍需补齐同义替换。",
       "readinessScore": 78
     },
-    "syllabusMasteryProfile": {
+    "syllabusMasteryChart": {
+      "totalWordCount": 4200,
+      "masteredWordCount": 3192,
+      "unmasteredWordCount": 1008,
       "masteryPercent": 76,
-      "diagnosis": "核心考纲理解较稳,长尾主题词还存在断层。",
-      "recommendation": "先补齐教育、科技和环境主题词,再做套题复盘。",
-      "dimensionScores": [
-        {"label": "核心考纲", "score": 82},
-        {"label": "场景迁移", "score": 71},
-        {"label": "同义替换", "score": 68}
-      ]
+      "summaryLabel": "考纲词汇掌握概览",
+      "recommendation": "先补齐教育、科技和环境主题词,再做套题复盘。"
     },
-    "pastPaperVocabularyProfile": {
-      "masteredWordCount": 620,
+    "pastPaperVocabularyChart": {
       "totalWordCount": 800,
-      "masteryPercent": 78,
-      "diagnosis": "Exam 高频词识别准确,但主动输出不够稳定。",
-      "recommendation": "每次精听后补 5 组同义替换并做口头复述。",
-      "sampleWords": ["cohesion", "allocate", "feasible"]
+      "unknownWordCountBeforeSprint": 180,
+      "unknownWordCountAfterSprint": 120,
+      "projectedScoreGainLabel": "预计提分 5-10 分",
+      "recommendation": "每次精听后补 5 组同义替换并做口头复述。"
+    },
+    "highFrequencyVocabularyChart": {
+      "basicCorePercent": 77,
+      "highScorePercent": 62,
+      "highlightLabel": "Common 高频词覆盖较广,但易混词记忆不牢。"
+    },
+    "vocabularyFrequencyBandChart": {
+      "bars": [
+        {"bandLabel": "2k 高频", "currentValue": 86, "priorityLabel": "优先学习", "themeColor": "#448aff"},
+        {"bandLabel": "3k 高频", "currentValue": 78, "priorityLabel": "重点突破", "themeColor": "#4caf50"},
+        {"bandLabel": "学术词", "currentValue": 62, "priorityLabel": "酌情学习", "themeColor": "#ff9800"}
+      ]
     },
-    "highFrequencyVocabularyProfile": {
-      "masteredWordCount": 1400,
-      "totalWordCount": 1800,
-      "masteryPercent": 77,
-      "diagnosis": "Common 高频词覆盖较广,但易混词记忆不牢。",
-      "recommendation": "围绕校园、城市、科技场景做词块复现。",
-      "sampleWords": ["sustainable", "motivate", "urban"]
+    "frequencyPlan": {
+      "cards": [
+        {"cadencePerWeek": 3, "scoreGainLabel": "+12 分", "winRatePercent": 78, "recommended": true, "badgeLabel": "推荐", "emphasisIcon": "③"},
+        {"cadencePerWeek": 2, "scoreGainLabel": "+8 分", "winRatePercent": 61, "recommended": false, "badgeLabel": "稳妥", "emphasisIcon": "②"}
+      ],
+      "recommendationTitle": "💡建议策略",
+      "recommendationSummary": "7 天提分冲刺优先保证高频词正确率,再逐步覆盖中频词。",
+      "phaseSuggestions": [
+        {"title": "考前半个月·核心突击期", "description": "围绕高频词建立记忆闭环。"},
+        {"title": "考前一周·强化巩固期", "description": "结合真题错词做循环复盘。"}
+      ]
     },
-    "vocabularyFrequencyBands": [
-      {"bandLabel": "2k 高频", "masteryPercent": 86, "targetPercent": 90},
-      {"bandLabel": "3k 高频", "masteryPercent": 78, "targetPercent": 88},
-      {"bandLabel": "学术词", "masteryPercent": 62, "targetPercent": 80}
-    ],
-    "sprintPlanOptions": [
-      {
-        "planName": "7 天提分冲刺",
-        "cadenceLabel": "1 周",
-        "tagLabel": "推荐",
-        "focus": "先保阅读和听力高频正确率",
-        "actionItems": ["晨读 30 分钟", "晚间套题复盘", "错词二次听写"],
-        "expectedOutcome": "预计把高频词稳定率拉升到 82%"
-      },
-      {
-        "planName": "21 天系统巩固",
-        "cadenceLabel": "3 周",
-        "tagLabel": "稳妥",
-        "focus": "补齐学术词和写作替换",
-        "actionItems": ["主题词块复现", "周测 2 次", "口语素材改写"],
-        "expectedOutcome": "预计把学术词掌握提升到 75%"
-      }
-    ],
-    "diagnosticCaseStudy": {
-      "title": "教育类阅读题案例",
-      "context": "遇到 unfamiliar policy terms 时定位速度明显下降。",
-      "diagnosis": "说明教育政策主题词和近义替换储备不足。",
-      "strategy": "建立 policy / curriculum / assessment 词网并结合真题复现。",
-      "keyTakeaway": "先按主题建网,再回到题目验证。"
+    "scoreImprovementCaseStudy": {
+      "headline": "教育类阅读题案例",
+      "learnerName": "李同学",
+      "studyPeriodLabel": "考前半个月·核心突击期",
+      "memorizedWordCount": 705,
+      "examHitWordCount": 237,
+      "hitRatePercent": 33.6,
+      "baselineScoreLabel": "70 分以下",
+      "finalScore": 89,
+      "scoreGain": 19
     }
   }
 }