wangliang пре 1 дан
родитељ
комит
f9e40e733a

+ 2 - 1
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/entity/TRBasicInfo.java

@@ -11,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Objects;
 
 /**
  * <p>
@@ -181,7 +182,7 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
     public void updateInfo(TRBasicInfo trBasicInfo, ReportCourseBasicInfoDto reportCourseBasicInfoDto, Long userId) {
         this.setValue(trBasicInfo);
         this.college = reportCourseBasicInfoDto.getCollege();
-        this.teachingObject = reportCourseBasicInfoDto.getTeachingObject();
+        this.teachingObject = Objects.nonNull(trBasicInfo) && Objects.nonNull(trBasicInfo.getTeachingObject()) && !Objects.equals(trBasicInfo.getTeachingObject(), "") ? trBasicInfo.getTeachingObject() : reportCourseBasicInfoDto.getTeachingObject();
         this.courseDegree = reportCourseBasicInfoDto.getCourseDegree();
         this.profession = reportCourseBasicInfoDto.getProfession();
         updateInfo(userId);