wangliang 11 сар өмнө
parent
commit
4221b3838f

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseBasicInfoDto.java

@@ -74,7 +74,7 @@ public class ReportCourseBasicInfoDto implements Serializable {
         this.teachingObject = trBasicInfo.getTeachingObject();
         this.selectionCount = trBasicInfo.getSelectionCount();
         this.participantCount = trBasicInfo.getParticipantCount();
-        this.courseDegree = Objects.nonNull(trBasicInfo.getCourseDegree()) ? trBasicInfo.getCourseDegree() : this.courseDegree;
+        this.courseDegree = trBasicInfo.getCourseDegree();
         this.teacher = trBasicInfo.getTeacher();
         this.director = trBasicInfo.getDirector();
         this.participant = trBasicInfo.getParticipant();

+ 3 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TRBasicInfo.java

@@ -137,7 +137,7 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
         this.enable = true;
         this.reportResult = new ReportResult();
         this.profession = profession;
-        this.courseDegree = Objects.nonNull(courseDegree) ? courseDegree : this.courseDegree;
+        this.courseDegree = courseDegree;
         this.courseEnName = courseEnName;
         this.finishPoints = finishPoints;
         this.requirementPoints = requirementPoints;
@@ -219,7 +219,7 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
         this.teachingObject = trBasicInfo.getTeachingObject();
         this.selectionCount = trBasicInfo.getSelectionCount();
         this.participantCount = trBasicInfo.getParticipantCount();
-        this.courseDegree = Objects.nonNull(trBasicInfo.getCourseDegree()) ? trBasicInfo.getCourseDegree() : this.courseDegree;
+        this.courseDegree = trBasicInfo.getCourseDegree();
         this.teacher = trBasicInfo.getTeacher();
         this.director = trBasicInfo.getDirector();
         this.participant = trBasicInfo.getParticipant();
@@ -250,7 +250,7 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
         this.reportResult = new ReportResult();
         this.cultureProgramId = cultureProgramId;
         this.courseId = courseId;
-        this.courseDegree = Objects.nonNull(courseDegree) ? courseDegree : this.courseDegree;
+        this.courseDegree = courseDegree;
         this.profession = profession;
         this.courseEnName = courseEnName;
         this.college = college;

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TRBasicInfoServiceImpl.java

@@ -882,13 +882,13 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
                 Double minScore = scoreList.stream().mapToDouble(s -> s.doubleValue()).min().orElse(0.0d);
                 Double avgScore = scoreList.stream().mapToDouble(s -> s.doubleValue()).average().orElse(0.0d);
                 for (BigDecimal d : scoreList) {
-                    if (d.doubleValue() <= 100 && d.doubleValue() >= 90) {
+                    if (d.doubleValue() <= 100 && d.doubleValue() >= 90d) {
                         scoreSizes[0] = scoreSizes[0] + 1;
-                    } else if (d.doubleValue() <= 89 && d.doubleValue() >= 80) {
+                    } else if (d.doubleValue() <= 89.99d && d.doubleValue() >= 80d) {
                         scoreSizes[1] = scoreSizes[1] + 1;
-                    } else if (d.doubleValue() <= 79 && d.doubleValue() >= 70) {
+                    } else if (d.doubleValue() <= 79.99d && d.doubleValue() >= 70d) {
                         scoreSizes[2] = scoreSizes[2] + 1;
-                    } else if (d.doubleValue() <= 69 && d.doubleValue() >= 60) {
+                    } else if (d.doubleValue() <= 69.99d && d.doubleValue() >= 60d) {
                         scoreSizes[3] = scoreSizes[3] + 1;
                     } else {
                         scoreSizes[4] = scoreSizes[4] + 1;