|
@@ -90,14 +90,14 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
new PastPaperVocabularyChart(
|
|
new PastPaperVocabularyChart(
|
|
|
payload.testPaperWordCount(),
|
|
payload.testPaperWordCount(),
|
|
|
payload.testPaperUnMasterWords().size(),
|
|
payload.testPaperUnMasterWords().size(),
|
|
|
- payload.testPaperUnMasterWords().size(),
|
|
|
|
|
|
|
+ sprintUnknownWordCount(payload.testPaperUnMasterWords().size()),
|
|
|
"预计提分5-15分",
|
|
"预计提分5-15分",
|
|
|
- "先压降真题生词占比。"),
|
|
|
|
|
|
|
+ null),
|
|
|
new HighFrequencyVocabularyChart(
|
|
new HighFrequencyVocabularyChart(
|
|
|
roundedMasteryPercent(words, 0, basicUpper),
|
|
roundedMasteryPercent(words, 0, basicUpper),
|
|
|
roundedMasteryPercent(words, basicUpper, frequentUpper),
|
|
roundedMasteryPercent(words, basicUpper, frequentUpper),
|
|
|
roundedMasteryPercent(words, frequentUpper, stageVocabulary),
|
|
roundedMasteryPercent(words, frequentUpper, stageVocabulary),
|
|
|
- "拉分词是提分核心突破项"),
|
|
|
|
|
|
|
+ null),
|
|
|
new VocabularyFrequencyBandChart(
|
|
new VocabularyFrequencyBandChart(
|
|
|
List.of(
|
|
List.of(
|
|
|
new VocabularyFrequencyBar(
|
|
new VocabularyFrequencyBar(
|
|
@@ -117,6 +117,10 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
.toList();
|
|
.toList();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private int sprintUnknownWordCount(int unknownWordCountBeforeSprint) {
|
|
|
|
|
+ return (int) Math.round(unknownWordCountBeforeSprint * 0.75d);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private int roundedMasteryPercent(List<OutlookExamSprintReportPayload.StudentWordLatest> words,
|
|
private int roundedMasteryPercent(List<OutlookExamSprintReportPayload.StudentWordLatest> words,
|
|
|
int lowerExclusive,
|
|
int lowerExclusive,
|
|
|
int upperInclusive) {
|
|
int upperInclusive) {
|
|
@@ -141,7 +145,6 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
private FrequencyPlan staticFrequencyPlan() {
|
|
private FrequencyPlan staticFrequencyPlan() {
|
|
|
return new FrequencyPlan(
|
|
return new FrequencyPlan(
|
|
|
List.of(
|
|
List.of(
|
|
|
- new FrequencyPlanCard(1, "+5分", 38, false, "稳健", "①"),
|
|
|
|
|
new FrequencyPlanCard(2, "+10分", 55, false, "均衡", "②"),
|
|
new FrequencyPlanCard(2, "+10分", 55, false, "均衡", "②"),
|
|
|
new FrequencyPlanCard(3, "+15分", 72, true, "推荐", "③"),
|
|
new FrequencyPlanCard(3, "+15分", 72, true, "推荐", "③"),
|
|
|
new FrequencyPlanCard(5, "+20分", 88, false, "冲刺", "④")),
|
|
new FrequencyPlanCard(5, "+20分", 88, false, "冲刺", "④")),
|
|
@@ -250,7 +253,8 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
double unmasteredPercent = percentage(chart.unmasteredWordCount(), chart.totalWordCount());
|
|
double unmasteredPercent = percentage(chart.unmasteredWordCount(), chart.totalWordCount());
|
|
|
double endAngle = -90 + (Math.max(0d, Math.min(100d, masteredPercent)) * 3.6);
|
|
double endAngle = -90 + (Math.max(0d, Math.min(100d, masteredPercent)) * 3.6);
|
|
|
|
|
|
|
|
- return new StringBuilder()
|
|
|
|
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
|
|
+ builder
|
|
|
.append("<div class='card'>")
|
|
.append("<div class='card'>")
|
|
|
.append("<h3 class='card-title'>考纲词汇掌握情况</h3>")
|
|
.append("<h3 class='card-title'>考纲词汇掌握情况</h3>")
|
|
|
.append("<div class='chart-box'>")
|
|
.append("<div class='chart-box'>")
|
|
@@ -273,25 +277,27 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
.append("未掌握:<span class='highlight'>").append(chart.unmasteredWordCount())
|
|
.append("未掌握:<span class='highlight'>").append(chart.unmasteredWordCount())
|
|
|
.append("词(").append(formatTwoDecimals(unmasteredPercent)).append("%)</span>")
|
|
.append("词(").append(formatTwoDecimals(unmasteredPercent)).append("%)</span>")
|
|
|
.append("</div>")
|
|
.append("</div>")
|
|
|
- .append("</div>")
|
|
|
|
|
- .toString();
|
|
|
|
|
|
|
+ .append("</div>");
|
|
|
|
|
+ return builder.toString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private String renderPastPaperVocabularyChart(PastPaperVocabularyChart chart) {
|
|
private String renderPastPaperVocabularyChart(PastPaperVocabularyChart chart) {
|
|
|
- int axisMax = roundUpToStep(Math.max(chart.totalWordCount(), chart.unknownWordCountBeforeSprint()), 250);
|
|
|
|
|
|
|
+ int axisMax = chart.totalWordCount();
|
|
|
|
|
+ int yAxisTickStep = axisMax <= 0 ? 1 : axisMax;
|
|
|
int totalHeight = barHeight(chart.totalWordCount(), axisMax);
|
|
int totalHeight = barHeight(chart.totalWordCount(), axisMax);
|
|
|
int unknownHeight = barHeight(chart.unknownWordCountBeforeSprint(), axisMax);
|
|
int unknownHeight = barHeight(chart.unknownWordCountBeforeSprint(), axisMax);
|
|
|
double beforePercent = percentage(chart.unknownWordCountBeforeSprint(), chart.totalWordCount());
|
|
double beforePercent = percentage(chart.unknownWordCountBeforeSprint(), chart.totalWordCount());
|
|
|
double afterPercent = percentage(chart.unknownWordCountAfterSprint(), chart.totalWordCount());
|
|
double afterPercent = percentage(chart.unknownWordCountAfterSprint(), chart.totalWordCount());
|
|
|
|
|
|
|
|
- return new StringBuilder()
|
|
|
|
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
|
|
+ builder
|
|
|
.append("<div class='card'>")
|
|
.append("<div class='card'>")
|
|
|
.append("<h3 class='card-title'>真题试卷词汇掌握情况</h3>")
|
|
.append("<h3 class='card-title'>真题试卷词汇掌握情况</h3>")
|
|
|
.append("<div class='chart-box'>")
|
|
.append("<div class='chart-box'>")
|
|
|
.append("<svg class='past-paper-column-chart'").append(SVG_CJK_FONT_FAMILY)
|
|
.append("<svg class='past-paper-column-chart'").append(SVG_CJK_FONT_FAMILY)
|
|
|
.append(" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 220' role='img' aria-label='真题试卷词汇掌握情况'>")
|
|
.append(" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 220' role='img' aria-label='真题试卷词汇掌握情况'>")
|
|
|
.append(renderChartAxes(320))
|
|
.append(renderChartAxes(320))
|
|
|
- .append(renderYAxisTicks(axisMax, 250))
|
|
|
|
|
|
|
+ .append(renderYAxisTicks(axisMax, yAxisTickStep))
|
|
|
.append(renderXAxisTickMarks(112, 208))
|
|
.append(renderXAxisTickMarks(112, 208))
|
|
|
.append("<rect class='chart-column total-column' x='84' y='").append(CHART_AXIS_BOTTOM - totalHeight)
|
|
.append("<rect class='chart-column total-column' x='84' y='").append(CHART_AXIS_BOTTOM - totalHeight)
|
|
|
.append("' width='56' height='").append(totalHeight).append("' rx='8' ry='8' fill='#448aff'/>")
|
|
.append("' width='56' height='").append(totalHeight).append("' rx='8' ry='8' fill='#448aff'/>")
|
|
@@ -308,9 +314,13 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
.append("冲刺后生词:").append(chart.unknownWordCountAfterSprint())
|
|
.append("冲刺后生词:").append(chart.unknownWordCountAfterSprint())
|
|
|
.append("词,生词占比降至").append(formatTwoDecimals(afterPercent)).append("%,")
|
|
.append("词,生词占比降至").append(formatTwoDecimals(afterPercent)).append("%,")
|
|
|
.append(escape(chart.projectedScoreGainLabel()))
|
|
.append(escape(chart.projectedScoreGainLabel()))
|
|
|
- .append("</div>")
|
|
|
|
|
- .append("<p class='data-text'>").append(escape(chart.recommendation())).append("</p>")
|
|
|
|
|
- .append("</div>")
|
|
|
|
|
|
|
+ .append("</div>");
|
|
|
|
|
+
|
|
|
|
|
+ if (chart.recommendation() != null && !chart.recommendation().isBlank()) {
|
|
|
|
|
+ builder.append("<p class='data-text'>").append(escape(chart.recommendation())).append("</p>");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return builder.append("</div>")
|
|
|
.toString();
|
|
.toString();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -320,7 +330,8 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
int frequentHeight = barHeight(chart.frequentCorePercent(), axisMax);
|
|
int frequentHeight = barHeight(chart.frequentCorePercent(), axisMax);
|
|
|
int advancedHeight = barHeight(chart.advancedScorePercent(), axisMax);
|
|
int advancedHeight = barHeight(chart.advancedScorePercent(), axisMax);
|
|
|
|
|
|
|
|
- return new StringBuilder()
|
|
|
|
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
|
|
+ builder
|
|
|
.append("<div class='card'>")
|
|
.append("<div class='card'>")
|
|
|
.append("<h3 class='card-title'>常考词汇掌握情况</h3>")
|
|
.append("<h3 class='card-title'>常考词汇掌握情况</h3>")
|
|
|
.append("<div class='chart-box'>")
|
|
.append("<div class='chart-box'>")
|
|
@@ -342,11 +353,15 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
.append("</div>")
|
|
.append("</div>")
|
|
|
.append("<div class='data-text'>基础必会词:综合掌握率").append(chart.basicCorePercent())
|
|
.append("<div class='data-text'>基础必会词:综合掌握率").append(chart.basicCorePercent())
|
|
|
.append("%<br/>核心常考词:综合掌握率").append(chart.frequentCorePercent())
|
|
.append("%<br/>核心常考词:综合掌握率").append(chart.frequentCorePercent())
|
|
|
- .append("%<br/>拔高拉分词:综合掌握率").append(chart.advancedScorePercent()).append("%</div>")
|
|
|
|
|
- .append("<p class='data-text'><span class='highlight'>")
|
|
|
|
|
- .append(escape(chart.highlightLabel()))
|
|
|
|
|
- .append("</span></p>")
|
|
|
|
|
- .append("</div>")
|
|
|
|
|
|
|
+ .append("%<br/>拔高拉分词:综合掌握率").append(chart.advancedScorePercent()).append("%</div>");
|
|
|
|
|
+
|
|
|
|
|
+ if (chart.highlightLabel() != null && !chart.highlightLabel().isBlank()) {
|
|
|
|
|
+ builder.append("<p class='data-text'><span class='highlight'>")
|
|
|
|
|
+ .append(escape(chart.highlightLabel()))
|
|
|
|
|
+ .append("</span></p>");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return builder.append("</div>")
|
|
|
.toString();
|
|
.toString();
|
|
|
}
|
|
}
|
|
|
|
|
|