Browse Source

代码调整

wangliang 11 months ago
parent
commit
2a1322995a

+ 2 - 1
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/been/report/ReportCourseBasicInfoDto.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Objects;
 
 /**
  * @Description: 报告课程基本情况dto
@@ -73,7 +74,7 @@ public class ReportCourseBasicInfoDto implements Serializable {
         this.teachingObject = trBasicInfo.getTeachingObject();
         this.selectionCount = trBasicInfo.getSelectionCount();
         this.participantCount = trBasicInfo.getParticipantCount();
-        this.courseDegree = trBasicInfo.getCourseDegree();
+        this.courseDegree = Objects.nonNull(trBasicInfo.getCourseDegree()) ? trBasicInfo.getCourseDegree() : this.courseDegree;
         this.teacher = trBasicInfo.getTeacher();
         this.director = trBasicInfo.getDirector();
         this.participant = trBasicInfo.getParticipant();

+ 4 - 3
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/entity/TRBasicInfo.java

@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.Objects;
 
 /**
  * <p>
@@ -136,7 +137,7 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
         this.enable = true;
         this.reportResult = new ReportResult();
         this.profession = profession;
-        this.courseDegree = courseDegree;
+        this.courseDegree = Objects.nonNull(courseDegree) ? courseDegree : this.courseDegree;
         this.courseEnName = courseEnName;
         this.finishPoints = finishPoints;
         this.requirementPoints = requirementPoints;
@@ -218,7 +219,7 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
         this.teachingObject = trBasicInfo.getTeachingObject();
         this.selectionCount = trBasicInfo.getSelectionCount();
         this.participantCount = trBasicInfo.getParticipantCount();
-        this.courseDegree = trBasicInfo.getCourseDegree();
+        this.courseDegree = Objects.nonNull(trBasicInfo.getCourseDegree()) ? trBasicInfo.getCourseDegree() : this.courseDegree;
         this.teacher = trBasicInfo.getTeacher();
         this.director = trBasicInfo.getDirector();
         this.participant = trBasicInfo.getParticipant();
@@ -249,7 +250,7 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
         this.reportResult = new ReportResult();
         this.cultureProgramId = cultureProgramId;
         this.courseId = courseId;
-        this.courseDegree = courseDegree;
+        this.courseDegree = Objects.nonNull(courseDegree) ? courseDegree : this.courseDegree;
         this.profession = profession;
         this.courseEnName = courseEnName;
         this.college = college;

+ 2 - 2
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/TRBasicInfoServiceImpl.java

@@ -446,9 +446,9 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
             throw ExceptionResultEnum.ERROR.exception("未找到试卷蓝图信息");
         }
         if (Objects.isNull(trBasicInfo)) {
-            trBasicInfo = new TRBasicInfo(cultureProgramId, courseId, markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null, userId, basicProfessional.getName(), Objects.nonNull(trBasicInfo) ? trBasicInfo.getFinishPoints() : null, Objects.nonNull(trBasicInfo) ? trBasicInfo.getRequirementPoints() : null, Objects.nonNull(trBasicInfo) ? trBasicInfo.getCourseSuggest() : null, new BigDecimal(expectValue), Objects.nonNull(trBasicInfo) ? trBasicInfo.getCourseEnName() : null, tcPaperStruct.getExamId());
+            trBasicInfo = new TRBasicInfo(cultureProgramId, courseId, markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null, userId, basicProfessional.getName(), Objects.nonNull(trBasicInfo) ? trBasicInfo.getFinishPoints() : null, Objects.nonNull(trBasicInfo) ? trBasicInfo.getRequirementPoints() : null, Objects.nonNull(trBasicInfo) ? trBasicInfo.getCourseSuggest() : null, Objects.nonNull(expectValue) ? new BigDecimal(expectValue) : null, Objects.nonNull(trBasicInfo) ? trBasicInfo.getCourseEnName() : null, tcPaperStruct.getExamId());
         } else {
-            trBasicInfo.setBasicInfo(tcPaperStruct.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null, cultureProgramId, courseId, new BigDecimal(expectValue), basicProfessional.getName(), trBasicInfo.getCourseEnName(), trBasicInfo.getCollege(), trBasicInfo.getFinishPoints(), trBasicInfo.getRequirementPoints(), trBasicInfo.getCourseSuggest());
+            trBasicInfo.setBasicInfo(tcPaperStruct.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null, cultureProgramId, courseId, Objects.nonNull(expectValue) ? new BigDecimal(expectValue) : null, basicProfessional.getName(), trBasicInfo.getCourseEnName(), trBasicInfo.getCollege(), trBasicInfo.getFinishPoints(), trBasicInfo.getRequirementPoints(), trBasicInfo.getCourseSuggest());
         }
         //课程基本情况
         ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);