【修改】 wps 判分文件名称判断
This commit is contained in:
@@ -415,94 +415,98 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
|||||||
}
|
}
|
||||||
// wps 类型存在多级文文件夹,需要个性化设置
|
// wps 类型存在多级文文件夹,需要个性化设置
|
||||||
if ("文字".equals(one_file.getName().split("\\.")[0])) {
|
if ("文字".equals(one_file.getName().split("\\.")[0])) {
|
||||||
String judgementStrWord = "";
|
if (file_one.getPath().contains("文档")) {
|
||||||
SourceAndText wordpojo = judgementWpsWordService.judgementWpsWord(Double.parseDouble(quScore), one_file.getPath(), file_one.getPath(), examQuestion, judgementStrWord);
|
String judgementStrWord = "";
|
||||||
double wps_word_score = wordpojo.getScore();
|
SourceAndText wordpojo = judgementWpsWordService.judgementWpsWord(Double.parseDouble(quScore), one_file.getPath(), file_one.getPath(), examQuestion, judgementStrWord);
|
||||||
String judgementStr = "<p>-----------------------------------------------------------</p>";
|
double wps_word_score = wordpojo.getScore();
|
||||||
judgementStr += "<p>试题编号" + examQuestion.getQuNum() + "</p>";
|
String judgementStr = "<p>-----------------------------------------------------------</p>";
|
||||||
judgementStr += wordpojo.getText();
|
judgementStr += "<p>试题编号" + examQuestion.getQuNum() + "</p>";
|
||||||
// 通过学号+试卷ID+试题ID进行查询
|
judgementStr += wordpojo.getText();
|
||||||
StuPaperInfoDO stuPaperInfoDO = stuPaperInfoService.findByStuIDAndPaperIdAndExamId(stuId, paperId, examQuestion.getQuId());
|
// 通过学号+试卷ID+试题ID进行查询
|
||||||
if (stuPaperInfoDO != null) {
|
StuPaperInfoDO stuPaperInfoDO = stuPaperInfoService.findByStuIDAndPaperIdAndExamId(stuId, paperId, examQuestion.getQuId());
|
||||||
stuPaperInfoDO.setContent(judgementStr);
|
if (stuPaperInfoDO != null) {
|
||||||
stuPaperInfoDO.setSort(stuPaperScoreDO.getSort());
|
stuPaperInfoDO.setContent(judgementStr);
|
||||||
stuPaperInfoService.updateStuPaperInfo(stuPaperInfoDO);
|
stuPaperInfoDO.setSort(stuPaperScoreDO.getSort());
|
||||||
} else {
|
stuPaperInfoService.updateStuPaperInfo(stuPaperInfoDO);
|
||||||
stuPaperInfoDO = new StuPaperInfoDO();
|
} else {
|
||||||
stuPaperInfoDO.setStuId(stuId);
|
stuPaperInfoDO = new StuPaperInfoDO();
|
||||||
stuPaperInfoDO.setPaperId(paperId);
|
stuPaperInfoDO.setStuId(stuId);
|
||||||
stuPaperInfoDO.setQuId(examQuestion.getQuId());
|
stuPaperInfoDO.setPaperId(paperId);
|
||||||
stuPaperInfoDO.setContent(judgementStr);
|
stuPaperInfoDO.setQuId(examQuestion.getQuId());
|
||||||
stuPaperInfoDO.setSort(stuPaperScoreDO.getSort());
|
stuPaperInfoDO.setContent(judgementStr);
|
||||||
stuPaperInfoService.insertStuPaperInfo(stuPaperInfoDO);
|
stuPaperInfoDO.setSort(stuPaperScoreDO.getSort());
|
||||||
|
stuPaperInfoService.insertStuPaperInfo(stuPaperInfoDO);
|
||||||
|
}
|
||||||
|
score += wps_word_score;
|
||||||
|
stuPaperScoreDO.setScore(new BigDecimal(wps_word_score));
|
||||||
|
// 原始正确分数
|
||||||
|
stuPaperScoreDO.setTrueScore(new BigDecimal(quScore));
|
||||||
|
// 判断题是否正确
|
||||||
|
if (wps_word_score == Double.parseDouble(quScore)) {
|
||||||
|
stuPaperScoreDO.setIsTrue(0);
|
||||||
|
} else if (wps_word_score == 0) {
|
||||||
|
stuPaperScoreDO.setIsTrue(1);
|
||||||
|
} else {
|
||||||
|
stuPaperScoreDO.setIsTrue(2);
|
||||||
|
}
|
||||||
|
stuPaperScoreDO.setSubjectName(examQuestion.getSubjectName());
|
||||||
|
if (isNull) {
|
||||||
|
// 如果之前没做过,则插入该题的分数
|
||||||
|
stuPaperScoreService.insertStuPaperScore(stuPaperScoreDO);
|
||||||
|
} else {
|
||||||
|
// 如果之前做过,则更新该题的分数
|
||||||
|
stuPaperScoreService.updateStuPaperScore(stuPaperScoreDO);
|
||||||
|
}
|
||||||
|
System.out.println(wps_word_score+"wps_word得分");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
score += wps_word_score;
|
|
||||||
stuPaperScoreDO.setScore(new BigDecimal(wps_word_score));
|
|
||||||
// 原始正确分数
|
|
||||||
stuPaperScoreDO.setTrueScore(new BigDecimal(quScore));
|
|
||||||
// 判断题是否正确
|
|
||||||
if (wps_word_score == Double.parseDouble(quScore)) {
|
|
||||||
stuPaperScoreDO.setIsTrue(0);
|
|
||||||
} else if (wps_word_score == 0) {
|
|
||||||
stuPaperScoreDO.setIsTrue(1);
|
|
||||||
} else {
|
|
||||||
stuPaperScoreDO.setIsTrue(2);
|
|
||||||
}
|
|
||||||
stuPaperScoreDO.setSubjectName(examQuestion.getSubjectName());
|
|
||||||
if (isNull) {
|
|
||||||
// 如果之前没做过,则插入该题的分数
|
|
||||||
stuPaperScoreService.insertStuPaperScore(stuPaperScoreDO);
|
|
||||||
} else {
|
|
||||||
// 如果之前做过,则更新该题的分数
|
|
||||||
stuPaperScoreService.updateStuPaperScore(stuPaperScoreDO);
|
|
||||||
}
|
|
||||||
System.out.println(wps_word_score+"wps_word得分");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
if ("演示".equals(one_file.getName().split("\\.")[0])) {
|
if ("演示".equals(one_file.getName().split("\\.")[0])) {
|
||||||
String judgementStrPptx = "";
|
if (file_one.getPath().contains("文档")) {
|
||||||
SourceAndText pptxpojo = judgementWpsPptxService.judgementWpsPptx(Double.parseDouble(quScore), one_file.getPath(), file_one.getPath(), examQuestion, judgementStrPptx);
|
String judgementStrPptx = "";
|
||||||
double wps_pptx_score = pptxpojo.getScore();
|
SourceAndText pptxpojo = judgementWpsPptxService.judgementWpsPptx(Double.parseDouble(quScore), one_file.getPath(), file_one.getPath(), examQuestion, judgementStrPptx);
|
||||||
String judgementStr = "<p>-----------------------------------------------------------</p>";
|
double wps_pptx_score = pptxpojo.getScore();
|
||||||
judgementStr += "<p>试题编号" + examQuestion.getQuNum() + "</p>";
|
String judgementStr = "<p>-----------------------------------------------------------</p>";
|
||||||
judgementStr += pptxpojo.getText();
|
judgementStr += "<p>试题编号" + examQuestion.getQuNum() + "</p>";
|
||||||
// 通过学号+试卷ID+试题ID进行查询
|
judgementStr += pptxpojo.getText();
|
||||||
StuPaperInfoDO stuPaperInfoDO = stuPaperInfoService.findByStuIDAndPaperIdAndExamId(stuId, paperId, examQuestion.getQuId());
|
// 通过学号+试卷ID+试题ID进行查询
|
||||||
if (stuPaperInfoDO != null) {
|
StuPaperInfoDO stuPaperInfoDO = stuPaperInfoService.findByStuIDAndPaperIdAndExamId(stuId, paperId, examQuestion.getQuId());
|
||||||
stuPaperInfoDO.setContent(judgementStr);
|
if (stuPaperInfoDO != null) {
|
||||||
stuPaperInfoDO.setSort(stuPaperScoreDO.getSort());
|
stuPaperInfoDO.setContent(judgementStr);
|
||||||
stuPaperInfoService.updateStuPaperInfo(stuPaperInfoDO);
|
stuPaperInfoDO.setSort(stuPaperScoreDO.getSort());
|
||||||
} else {
|
stuPaperInfoService.updateStuPaperInfo(stuPaperInfoDO);
|
||||||
stuPaperInfoDO = new StuPaperInfoDO();
|
} else {
|
||||||
stuPaperInfoDO.setStuId(stuId);
|
stuPaperInfoDO = new StuPaperInfoDO();
|
||||||
stuPaperInfoDO.setPaperId(paperId);
|
stuPaperInfoDO.setStuId(stuId);
|
||||||
stuPaperInfoDO.setQuId(examQuestion.getQuId());
|
stuPaperInfoDO.setPaperId(paperId);
|
||||||
stuPaperInfoDO.setContent(judgementStr);
|
stuPaperInfoDO.setQuId(examQuestion.getQuId());
|
||||||
stuPaperInfoDO.setSort(stuPaperScoreDO.getSort());
|
stuPaperInfoDO.setContent(judgementStr);
|
||||||
stuPaperInfoService.insertStuPaperInfo(stuPaperInfoDO);
|
stuPaperInfoDO.setSort(stuPaperScoreDO.getSort());
|
||||||
|
stuPaperInfoService.insertStuPaperInfo(stuPaperInfoDO);
|
||||||
|
}
|
||||||
|
score += wps_pptx_score;
|
||||||
|
stuPaperScoreDO.setScore(new BigDecimal(wps_pptx_score));
|
||||||
|
// 原始正确分数
|
||||||
|
stuPaperScoreDO.setTrueScore(new BigDecimal(quScore));
|
||||||
|
// 判断题是否正确
|
||||||
|
if (wps_pptx_score == Double.parseDouble(quScore)) {
|
||||||
|
stuPaperScoreDO.setIsTrue(0);
|
||||||
|
} else if (wps_pptx_score == 0) {
|
||||||
|
stuPaperScoreDO.setIsTrue(1);
|
||||||
|
} else {
|
||||||
|
stuPaperScoreDO.setIsTrue(2);
|
||||||
|
}
|
||||||
|
stuPaperScoreDO.setSubjectName(examQuestion.getSubjectName());
|
||||||
|
if (isNull) {
|
||||||
|
// 如果之前没做过,则插入该题的分数
|
||||||
|
stuPaperScoreService.insertStuPaperScore(stuPaperScoreDO);
|
||||||
|
} else {
|
||||||
|
// 如果之前做过,则更新该题的分数
|
||||||
|
stuPaperScoreService.updateStuPaperScore(stuPaperScoreDO);
|
||||||
|
}
|
||||||
|
System.out.println(wps_pptx_score+"wps_ppt得分");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
score += wps_pptx_score;
|
|
||||||
stuPaperScoreDO.setScore(new BigDecimal(wps_pptx_score));
|
|
||||||
// 原始正确分数
|
|
||||||
stuPaperScoreDO.setTrueScore(new BigDecimal(quScore));
|
|
||||||
// 判断题是否正确
|
|
||||||
if (wps_pptx_score == Double.parseDouble(quScore)) {
|
|
||||||
stuPaperScoreDO.setIsTrue(0);
|
|
||||||
} else if (wps_pptx_score == 0) {
|
|
||||||
stuPaperScoreDO.setIsTrue(1);
|
|
||||||
} else {
|
|
||||||
stuPaperScoreDO.setIsTrue(2);
|
|
||||||
}
|
|
||||||
stuPaperScoreDO.setSubjectName(examQuestion.getSubjectName());
|
|
||||||
if (isNull) {
|
|
||||||
// 如果之前没做过,则插入该题的分数
|
|
||||||
stuPaperScoreService.insertStuPaperScore(stuPaperScoreDO);
|
|
||||||
} else {
|
|
||||||
// 如果之前做过,则更新该题的分数
|
|
||||||
stuPaperScoreService.updateStuPaperScore(stuPaperScoreDO);
|
|
||||||
}
|
|
||||||
System.out.println(wps_pptx_score+"wps_ppt得分");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
// if ("表格".equals(one_file.getName().split("\\.")[0])) {
|
// if ("表格".equals(one_file.getName().split("\\.")[0])) {
|
||||||
// double wps_excel_score = judgementWpsExcelService.judgementWpsXlsx(Double.parseDouble(quScore), one_file.getPath(), file_one.getPath(), examQuestion);
|
// double wps_excel_score = judgementWpsExcelService.judgementWpsXlsx(Double.parseDouble(quScore), one_file.getPath(), file_one.getPath(), examQuestion);
|
||||||
|
Reference in New Issue
Block a user