dzx 4 kuukautta sitten
vanhempi
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() {{
                 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())));

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

@@ -85,11 +85,24 @@
             AND t1.stduy_status = #{dto.stduyStatus}
         </if>
         <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 test="dto.className != null and dto.className != ''">
             AND t3.name like concat('%', #{dto.className}, '%')
         </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 id="getMajorClassCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">