瀏覽代碼

1.0.5 bug

haogh 10 月之前
父節點
當前提交
343bbf6c5e

+ 10 - 0
paper-library-business/src/main/java/com/qmth/paper/library/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -616,6 +616,16 @@ public class TaskLogicServiceImpl implements TaskLogicService {
 
 
             StringJoiner errorMsg = new StringJoiner(";");
+
+            //设置成绩
+            if (StringUtils.isNotEmpty(examStudentImport.getScore())) {
+                try {
+                    Double score = Double.parseDouble(examStudentImport.getScore());
+                    examStudent.setScore(score);
+                } catch (NumberFormatException e) {
+                    errorMsg.add("成绩必须是数字");
+                }
+            }
             if (StringUtils.isBlank(examStudent.getStudentCode())) {
                 errorMsg.add("学号必填");
             }