Browse Source

bug修复

dzx 4 months ago
parent
commit
2c52437c2a

+ 3 - 1
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskServiceImpl.java

@@ -614,7 +614,9 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
 
 
             BaseStudentSchoolRoll schoolRoll = new BaseStudentSchoolRoll() {{
             BaseStudentSchoolRoll schoolRoll = new BaseStudentSchoolRoll() {{
                 setUserId(xjrUser.getId());
                 setUserId(xjrUser.getId());
-                setGraduatedScore(student.getScore().doubleValue());
+                if(student.getScore() != null){
+                    setGraduatedScore(student.getScore().doubleValue());
+                }
                 setGraduatedUniversity(student.getGraduateSchool());
                 setGraduatedUniversity(student.getGraduateSchool());
                 setClassId(classMap.get(studentClassRelation.get(student.getId())));
                 setClassId(classMap.get(studentClassRelation.get(student.getId())));
                 setMajorSetId(taskClassMajorMap.get(studentClassRelation.get(student.getId())));
                 setMajorSetId(taskClassMajorMap.get(studentClassRelation.get(student.getId())));

+ 14 - 1
src/main/resources/mapper/banding/BandingTaskClassMapper.xml

@@ -85,11 +85,24 @@
             AND t1.stduy_status = #{dto.stduyStatus}
             AND t1.stduy_status = #{dto.stduyStatus}
         </if>
         </if>
         <if test="dto.status != null">
         <if test="dto.status != null">
-            AND t2.status = #{dto.status}
+            <if test="dto.status == 1">
+                AND t3.name is not null
+            </if>
+            <if test="dto.status == 0">
+                AND t3.name is null
+            </if>
         </if>
         </if>
         <if test="dto.className != null and dto.className != ''">
         <if test="dto.className != null and dto.className != ''">
             AND t3.name like concat('%', #{dto.className}, '%')
             AND t3.name like concat('%', #{dto.className}, '%')
         </if>
         </if>
+        <if test="dto.field != null and dto.field != '' and dto.field == 'score'">
+            <if test="dto.order == 'descend'">
+                order by t1.score desc
+            </if>
+            <if test="dto.order == 'ascend'">
+                order by t1.score asc
+            </if>
+        </if>
     </select>
     </select>
 
 
     <select id="getMajorClassCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">
     <select id="getMajorClassCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">