dzx před 4 měsíci
rodič
revize
92f9b01ce4

+ 10 - 4
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassStudentServiceImpl.java

@@ -18,7 +18,6 @@ import com.xjrsoft.module.banding.mapper.BandingTaskClassMapper;
 import com.xjrsoft.module.banding.mapper.BandingTaskClassStudentMapper;
 import com.xjrsoft.module.banding.mapper.BandingTaskMapper;
 import com.xjrsoft.module.banding.service.IBandingTaskClassStudentService;
-import com.xjrsoft.module.banding.service.IBandingTaskService;
 import com.xjrsoft.module.banding.vo.BandingTaskClassSureListVo;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseMajorSet;
@@ -226,14 +225,21 @@ public class BandingTaskClassStudentServiceImpl extends MPJBaseServiceImpl<Bandi
                 setUserId(xjrUser.getId());
                 setCreateDate(now);
                 setStudentId(student.getCredentialNumber());
-                setHeight(student.getHeight().doubleValue());
-                setWeight(student.getWeight().doubleValue());
+                if(student.getHeight() != null){
+                    setHeight(student.getHeight().doubleValue());
+                }
+                if(student.getWeight() != null){
+                    setWeight(student.getWeight().doubleValue());
+                }
             }};
             studentService.save(baseStudent);
 
             BaseStudentSchoolRoll schoolRoll = new BaseStudentSchoolRoll() {{
                 setUserId(xjrUser.getId());
-                setGraduatedScore(student.getScore().doubleValue());
+                if(student.getScore() != null){
+                    setGraduatedScore(student.getScore().doubleValue());
+                }
+
                 setGraduatedUniversity(student.getGraduateSchool());
                 setClassId(classMap.get(studentClassRelation.get(student.getId())));
                 setMajorSetId(taskClassMajorMap.get(studentClassRelation.get(student.getId())));