Compare commits
2 Commits
6f7832d65e
...
3eb97cb736
Author | SHA1 | Date | |
---|---|---|---|
3eb97cb736 | |||
![]() |
4d775d2332 |
@@ -141,14 +141,20 @@ public class MonitorServiceImpl implements MonitorService {
|
||||
@Override
|
||||
public long getStuMonitor(StuMonitorPaperVo stuMonitorPaperVo) throws RuntimeException {
|
||||
String key = "userCache:" + stuMonitorPaperVo.getTaskId() + ":" + stuMonitorPaperVo.getStuId();
|
||||
MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key), MonitorDO.class);
|
||||
if (info == null) {
|
||||
info=monitorMapper.selectOne(
|
||||
new QueryWrapper<MonitorDO>()
|
||||
.eq("task_id", stuMonitorPaperVo.getTaskId())
|
||||
.eq("stu_id", stuMonitorPaperVo.getStuId())
|
||||
);
|
||||
}
|
||||
// MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key), MonitorDO.class);
|
||||
// if (info == null) {
|
||||
// info=monitorMapper.selectOne(
|
||||
// new QueryWrapper<MonitorDO>()
|
||||
// .eq("task_id", stuMonitorPaperVo.getTaskId())
|
||||
// .eq("stu_id", stuMonitorPaperVo.getStuId())
|
||||
// );
|
||||
// }
|
||||
MonitorDO info =monitorMapper.selectOne(
|
||||
new QueryWrapper<MonitorDO>()
|
||||
.eq("task_id", stuMonitorPaperVo.getTaskId())
|
||||
.eq("stu_id", stuMonitorPaperVo.getStuId())
|
||||
);
|
||||
|
||||
//获取属性 判断 专业/课程点位
|
||||
Long loginTenantId = SecurityFrameworkUtils.getLoginTenantId();
|
||||
|
||||
@@ -406,6 +412,7 @@ public class MonitorServiceImpl implements MonitorService {
|
||||
MonitorDO monitorDO = null;
|
||||
if (info != null) {
|
||||
monitorDO = monitorMapper.selectById(info.getMonitorId());
|
||||
System.out.println(monitorDO);
|
||||
info.setScore(String.valueOf(score));
|
||||
if (StringUtils.isNotBlank(monitorDO.getScore())) {
|
||||
try {
|
||||
|
@@ -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 "正文";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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 "正文";
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user