Compare commits
2 Commits
6f7832d65e
...
3eb97cb736
Author | SHA1 | Date | |
---|---|---|---|
3eb97cb736 | |||
![]() |
4d775d2332 |
@@ -141,14 +141,20 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
@Override
|
@Override
|
||||||
public long getStuMonitor(StuMonitorPaperVo stuMonitorPaperVo) throws RuntimeException {
|
public long getStuMonitor(StuMonitorPaperVo stuMonitorPaperVo) throws RuntimeException {
|
||||||
String key = "userCache:" + stuMonitorPaperVo.getTaskId() + ":" + stuMonitorPaperVo.getStuId();
|
String key = "userCache:" + stuMonitorPaperVo.getTaskId() + ":" + stuMonitorPaperVo.getStuId();
|
||||||
MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key), MonitorDO.class);
|
// MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key), MonitorDO.class);
|
||||||
if (info == null) {
|
// if (info == null) {
|
||||||
info=monitorMapper.selectOne(
|
// info=monitorMapper.selectOne(
|
||||||
|
// new QueryWrapper<MonitorDO>()
|
||||||
|
// .eq("task_id", stuMonitorPaperVo.getTaskId())
|
||||||
|
// .eq("stu_id", stuMonitorPaperVo.getStuId())
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
MonitorDO info =monitorMapper.selectOne(
|
||||||
new QueryWrapper<MonitorDO>()
|
new QueryWrapper<MonitorDO>()
|
||||||
.eq("task_id", stuMonitorPaperVo.getTaskId())
|
.eq("task_id", stuMonitorPaperVo.getTaskId())
|
||||||
.eq("stu_id", stuMonitorPaperVo.getStuId())
|
.eq("stu_id", stuMonitorPaperVo.getStuId())
|
||||||
);
|
);
|
||||||
}
|
|
||||||
//获取属性 判断 专业/课程点位
|
//获取属性 判断 专业/课程点位
|
||||||
Long loginTenantId = SecurityFrameworkUtils.getLoginTenantId();
|
Long loginTenantId = SecurityFrameworkUtils.getLoginTenantId();
|
||||||
|
|
||||||
@@ -406,6 +412,7 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
MonitorDO monitorDO = null;
|
MonitorDO monitorDO = null;
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
monitorDO = monitorMapper.selectById(info.getMonitorId());
|
monitorDO = monitorMapper.selectById(info.getMonitorId());
|
||||||
|
System.out.println(monitorDO);
|
||||||
info.setScore(String.valueOf(score));
|
info.setScore(String.valueOf(score));
|
||||||
if (StringUtils.isNotBlank(monitorDO.getScore())) {
|
if (StringUtils.isNotBlank(monitorDO.getScore())) {
|
||||||
try {
|
try {
|
||||||
|
@@ -34,12 +34,16 @@ public class Convert {
|
|||||||
|
|
||||||
public static String convertOutlineLvl(String val) {
|
public static String convertOutlineLvl(String val) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "0":
|
case "0": return "一级";
|
||||||
return "标题1";
|
case "1": return "二级";
|
||||||
case "1":
|
case "2": return "三级";
|
||||||
return "标题2";
|
case "3": return "四级";
|
||||||
default:
|
case "4": return "五级";
|
||||||
return null;
|
case "5": return "六级";
|
||||||
|
case "6": return "七级";
|
||||||
|
case "7": return "八级";
|
||||||
|
case "8": return "九级";
|
||||||
|
default: return "正文";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ public class Paragraphs {
|
|||||||
String styleId = pPr.getPStyle().getVal();
|
String styleId = pPr.getPStyle().getVal();
|
||||||
Style style = stylePart.getStyleById(styleId);
|
Style style = stylePart.getStyleById(styleId);
|
||||||
if (style != null && style.getPPr() != null && style.getPPr().getJc() != null) {
|
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 "正文";
|
return "正文";
|
||||||
|
@@ -76,8 +76,8 @@ public class SectionPage {
|
|||||||
long topTwips = pgMar.getTop().longValue(); // twips
|
long topTwips = pgMar.getTop().longValue(); // twips
|
||||||
double topPt = topTwips / 20.0; // 转换为磅
|
double topPt = topTwips / 20.0; // 转换为磅
|
||||||
double topCm = topPt * 0.0352778; // 转换为厘米
|
double topCm = topPt * 0.0352778; // 转换为厘米
|
||||||
// return String.format("%.1f磅(%.2f厘米)", topPt, topCm);
|
return String.format("%.1f磅(%.2f厘米)", topPt, topCm);
|
||||||
return String.format("%.2f厘米", topCm);
|
// return String.format("%.2f厘米", topCm);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,8 +95,8 @@ public class SectionPage {
|
|||||||
long bottomTwips = pgMar.getBottom().longValue(); // twips
|
long bottomTwips = pgMar.getBottom().longValue(); // twips
|
||||||
double bottomPt = bottomTwips / 20.0; // 磅
|
double bottomPt = bottomTwips / 20.0; // 磅
|
||||||
double bottomCm = bottomPt * 0.0352778; // 厘米
|
double bottomCm = bottomPt * 0.0352778; // 厘米
|
||||||
// return String.format("%.1f磅(%.2f厘米)", bottomPt, bottomCm);
|
return String.format("%.1f磅(%.2f厘米)", bottomPt, bottomCm);
|
||||||
return String.format("%.2f厘米", bottomCm);
|
// return String.format("%.2f厘米", bottomCm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -113,8 +113,8 @@ public class SectionPage {
|
|||||||
long leftTwips = pgMar.getLeft().longValue(); // twips
|
long leftTwips = pgMar.getLeft().longValue(); // twips
|
||||||
double leftPt = leftTwips / 20.0; // 转换为磅
|
double leftPt = leftTwips / 20.0; // 转换为磅
|
||||||
double leftCm = leftPt * 0.0352778; // 转换为厘米
|
double leftCm = leftPt * 0.0352778; // 转换为厘米
|
||||||
// return String.format("%.1f磅(%.2f厘米)", leftPt, leftCm);
|
return String.format("%.1f磅(%.2f厘米)", leftPt, leftCm);
|
||||||
return String.format("%.2f厘米", leftCm);
|
// return String.format("%.2f厘米", leftCm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -131,8 +131,8 @@ public class SectionPage {
|
|||||||
long rightTwips = pgMar.getRight().longValue(); // twips
|
long rightTwips = pgMar.getRight().longValue(); // twips
|
||||||
double rightPt = rightTwips / 20.0; // 转换为磅
|
double rightPt = rightTwips / 20.0; // 转换为磅
|
||||||
double rightCm = rightPt * 0.0352778; // 转换为厘米
|
double rightCm = rightPt * 0.0352778; // 转换为厘米
|
||||||
return String.format("%.2f厘米", rightCm);
|
// return String.format("%.2f厘米", rightCm);
|
||||||
// return String.format("%.1f磅(%.2f厘米)", rightPt, rightCm);
|
return String.format("%.1f磅(%.2f厘米)", rightPt, rightCm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -149,8 +149,8 @@ public class SectionPage {
|
|||||||
long gutterTwips = pgMar.getGutter().longValue(); // twips
|
long gutterTwips = pgMar.getGutter().longValue(); // twips
|
||||||
double gutterPt = gutterTwips / 20.0; // 转换为磅
|
double gutterPt = gutterTwips / 20.0; // 转换为磅
|
||||||
double gutterCm = gutterPt * 0.0352778; // 转换为厘米
|
double gutterCm = gutterPt * 0.0352778; // 转换为厘米
|
||||||
// return String.format("%.1f磅(%.2f厘米)", gutterPt, gutterCm);
|
return String.format("%.1f磅(%.2f厘米)", gutterPt, gutterCm);
|
||||||
return String.format("%.2f厘米", gutterCm);
|
// return String.format("%.2f厘米", gutterCm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Reference in New Issue
Block a user