xiatian há 11 meses atrás
pai
commit
e946ec1531

+ 3 - 3
src/main/java/cn/com/qmth/am/service/impl/QuestionServiceImpl.java

@@ -248,9 +248,9 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionDao, QuestionEntity
 			imp.setContent(content);
 			imp.setContent(content);
 
 
 			String answer = trimAndNullIfBlank(line.get(EXCEL_HEADER[7]));
 			String answer = trimAndNullIfBlank(line.get(EXCEL_HEADER[7]));
-			if (StringUtils.isBlank(answer)) {
-				msg.append("  试题答案不能为空");
-			}
+//			if (StringUtils.isBlank(answer)) {
+//				msg.append("  试题答案不能为空");
+//			}
 			imp.setAnswer(getStandardAnswer(answer));
 			imp.setAnswer(getStandardAnswer(answer));
 
 
 			String imageSlice = trimAndNullIfBlank(line.get(EXCEL_HEADER[8]));
 			String imageSlice = trimAndNullIfBlank(line.get(EXCEL_HEADER[8]));

+ 3 - 0
src/main/java/cn/com/qmth/am/service/impl/StudentScoreServiceImpl.java

@@ -607,6 +607,9 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreDao, Studen
 			if (q == null) {
 			if (q == null) {
 				throw new StatusException("未找到试题信息");
 				throw new StatusException("未找到试题信息");
 			}
 			}
+			if(CollectionUtils.isEmpty(q.getAnswer())) {
+				return;
+			}
 			AutoScoreRequest req = new AutoScoreRequest();
 			AutoScoreRequest req = new AutoScoreRequest();
 			req.setQuestionBody(q.getContent());
 			req.setQuestionBody(q.getContent());
 			req.setStandardAnswer(q.getAnswer());
 			req.setStandardAnswer(q.getAnswer());