Ver código fonte

3.2.5 显示null问题

xiaofei 2 anos atrás
pai
commit
38fb50b7a1

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TSyncExamStudentScore.java

@@ -147,8 +147,8 @@ public class TSyncExamStudentScore implements Serializable {
         this.schoolId = (Long) map.get(SystemConstant.SCHOOL_ID);
         this.orgId = (Long) map.get("orgId");
         this.semesterId = (Long) map.get("semesterId");
-        this.majorName = String.valueOf(map.get("majorName"));
-        this.clazzId = (Long) map.get("clazzId");
+        this.majorName = map.get("majorName") != null ? String.valueOf(map.get("majorName")) : null;
+        this.clazzId = map.get("clazzId") != null ? (Long) map.get("clazzId") : null;
         this.examId = Long.parseLong(String.valueOf(map.get("examId")));
         this.thirdRelateId = Long.parseLong(String.valueOf(map.get("thirdRelateId")));
         this.examCode = (String) map.get("examCode");
@@ -160,8 +160,8 @@ public class TSyncExamStudentScore implements Serializable {
         this.subjectName = (String) map.get("subjectName");
         this.paperType = (String) map.get("paperType");
         this.college = (String) map.get("college");
-        this.clazzName = (String) map.get("clazzName");
-        this.teacher = (String) map.get("teacher");
+        this.clazzName = map.get("clazzName") != null ? (String) map.get("clazzName") : null;
+        this.teacher = map.get("teacher") != null ? (String) map.get("teacher") : null;
         this.status = (Integer) map.get("status");
         JSONArray jsonArray = (JSONArray) map.get("sheetUrls");
         if (Objects.nonNull(jsonArray) && jsonArray.size() > 0) {