【修改】开始考试进入监控不从缓存获取,修改文字段落考点

This commit is contained in:
huababa1
2025-10-13 19:07:37 +08:00
parent fa9601433e
commit 4d775d2332
4 changed files with 36 additions and 25 deletions

View File

@@ -34,12 +34,16 @@ public class Convert {
public static String convertOutlineLvl(String val) {
switch (val) {
case "0":
return "标题1";
case "1":
return "标题2";
default:
return null;
case "0": return "一级";
case "1": return "二级";
case "2": return "三级";
case "3": return "四级";
case "4": return "五级";
case "5": return "六级";
case "6": return "七级";
case "7": return "八级";
case "8": return "九级";
default: return "正文";
}
}

View File

@@ -53,7 +53,7 @@ public class Paragraphs {
String styleId = pPr.getPStyle().getVal();
Style style = stylePart.getStyleById(styleId);
if (style != null && style.getPPr() != null && style.getPPr().getJc() != null) {
return Convert.convertJc(style.getPPr().getOutlineLvl().getVal().toString());
return Convert.convertOutlineLvl(style.getPPr().getOutlineLvl().getVal().toString());
}
}
return "正文";

View File

@@ -76,8 +76,8 @@ public class SectionPage {
long topTwips = pgMar.getTop().longValue(); // twips
double topPt = topTwips / 20.0; // 转换为磅
double topCm = topPt * 0.0352778; // 转换为厘米
// return String.format("%.1f磅(%.2f厘米)", topPt, topCm);
return String.format("%.2f厘米", topCm);
return String.format("%.1f磅(%.2f厘米)", topPt, topCm);
// return String.format("%.2f厘米", topCm);
}
}
@@ -95,8 +95,8 @@ public class SectionPage {
long bottomTwips = pgMar.getBottom().longValue(); // twips
double bottomPt = bottomTwips / 20.0; // 磅
double bottomCm = bottomPt * 0.0352778; // 厘米
// return String.format("%.1f磅(%.2f厘米)", bottomPt, bottomCm);
return String.format("%.2f厘米", bottomCm);
return String.format("%.1f磅(%.2f厘米)", bottomPt, bottomCm);
// return String.format("%.2f厘米", bottomCm);
}
}
return null;
@@ -113,8 +113,8 @@ public class SectionPage {
long leftTwips = pgMar.getLeft().longValue(); // twips
double leftPt = leftTwips / 20.0; // 转换为磅
double leftCm = leftPt * 0.0352778; // 转换为厘米
// return String.format("%.1f磅(%.2f厘米)", leftPt, leftCm);
return String.format("%.2f厘米", leftCm);
return String.format("%.1f磅(%.2f厘米)", leftPt, leftCm);
// return String.format("%.2f厘米", leftCm);
}
}
return null;
@@ -131,8 +131,8 @@ public class SectionPage {
long rightTwips = pgMar.getRight().longValue(); // twips
double rightPt = rightTwips / 20.0; // 转换为磅
double rightCm = rightPt * 0.0352778; // 转换为厘米
return String.format("%.2f厘米", rightCm);
// return String.format("%.1f磅(%.2f厘米)", rightPt, rightCm);
// return String.format("%.2f厘米", rightCm);
return String.format("%.1f磅(%.2f厘米)", rightPt, rightCm);
}
}
return null;
@@ -149,8 +149,8 @@ public class SectionPage {
long gutterTwips = pgMar.getGutter().longValue(); // twips
double gutterPt = gutterTwips / 20.0; // 转换为磅
double gutterCm = gutterPt * 0.0352778; // 转换为厘米
// return String.format("%.1f磅(%.2f厘米)", gutterPt, gutterCm);
return String.format("%.2f厘米", gutterCm);
return String.format("%.1f磅(%.2f厘米)", gutterPt, gutterCm);
// return String.format("%.2f厘米", gutterCm);
}
}
return null;