dzx 1 год назад
Родитель
Сommit
ac9194e8fd

+ 4 - 0
src/main/java/com/xjrsoft/module/banding/dto/StudentDto.java

@@ -32,4 +32,8 @@ public class StudentDto extends PageInput {
     @ApiModelProperty("专业方向id")
     @ApiModelProperty("专业方向id")
     private Long majorSetId;
     private Long majorSetId;
 
 
+
+    @ApiModelProperty("任务id")
+    private Long bandingTaskId;
+
 }
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassStudentServiceImpl.java

@@ -291,6 +291,8 @@ public class BandingTaskClassStudentServiceImpl extends MPJBaseServiceImpl<Bandi
 
 
     @Override
     @Override
     public List<BaseNewStudentPageDto> satisfyStudent(StudentDto dto) {
     public List<BaseNewStudentPageDto> satisfyStudent(StudentDto dto) {
+        BandingTaskClass taskClass = taskClassMapper.selectById(dto.getBandingTaskClassId());
+        dto.setBandingTaskId(taskClass.getBandingTaskId());
         return this.baseMapper.satisfyStudent(dto);
         return this.baseMapper.satisfyStudent(dto);
     }
     }
 
 
@@ -298,6 +300,7 @@ public class BandingTaskClassStudentServiceImpl extends MPJBaseServiceImpl<Bandi
     public List<BaseNewStudentPageDto> surplusStudent(StudentDto dto) {
     public List<BaseNewStudentPageDto> surplusStudent(StudentDto dto) {
         BandingTaskClass taskClass = taskClassMapper.selectById(dto.getBandingTaskClassId());
         BandingTaskClass taskClass = taskClassMapper.selectById(dto.getBandingTaskClassId());
         dto.setMajorSetId(taskClass.getMajorSetId());
         dto.setMajorSetId(taskClass.getMajorSetId());
+        dto.setBandingTaskId(taskClass.getBandingTaskId());
         return this.baseMapper.surplusStudent(dto);
         return this.baseMapper.surplusStudent(dto);
     }
     }
 
 

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

@@ -37,7 +37,7 @@
         <if test="dto.name != null and dto.name != ''">
         <if test="dto.name != null and dto.name != ''">
             and t1.name like concat('%', #{dto.name},'%')
             and t1.name like concat('%', #{dto.name},'%')
         </if>
         </if>
-        <if test="dto.name != null and dto.name != ''">
+        <if test="dto.majorSetName != null and dto.majorSetName != ''">
             and t2.name like concat('%', #{dto.majorSetName},'%')
             and t2.name like concat('%', #{dto.majorSetName},'%')
         </if>
         </if>
         ORDER BY t1.sort_code IS NULL, t1.sort_code ASC
         ORDER BY t1.sort_code IS NULL, t1.sort_code ASC

+ 9 - 0
src/main/resources/mapper/banding/BandingTaskClassStudentMapper.xml

@@ -67,6 +67,15 @@
             INNER JOIN banding_task_class c2 ON c1.banding_task_class_id = c2.id
             INNER JOIN banding_task_class c2 ON c1.banding_task_class_id = c2.id
             WHERE c1.delete_mark = 0 AND c2.delete_mark = 0 AND c2.banding_task_id = #{dto.bandingTaskId}
             WHERE c1.delete_mark = 0 AND c2.delete_mark = 0 AND c2.banding_task_id = #{dto.bandingTaskId}
         )
         )
+        <if test="dto.name != null and dto.name != ''">
+            and t1.name like concat('%', #{dto.name},'%')
+        </if>
+        <if test="dto.gender != null and dto.gender != ''">
+            and t1.gender = #{dto.gender}
+        </if>
+        <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
+            and t1.credential_number like concat('%', #{dto.credentialNumber},'%')
+        </if>
         <if test="dto.order != null">
         <if test="dto.order != null">
             <if test="dto.order == 'ascend'">
             <if test="dto.order == 'ascend'">
                 <if test="dto.field != null and dto.field == 'height'">
                 <if test="dto.field != null and dto.field == 'height'">

+ 2 - 2
src/main/resources/mapper/banding/BandingTaskMajorConditionMapper.xml

@@ -9,13 +9,13 @@
         LEFT JOIN banding_task_major_condition t1 ON t1.major_set_id = t.id and t1.banding_task_id = #{dto.bandingTaskId} and t1.delete_mark = 0
         LEFT JOIN banding_task_major_condition t1 ON t1.major_set_id = t.id and t1.banding_task_id = #{dto.bandingTaskId} and t1.delete_mark = 0
         WHERE t.delete_mark = 0
         WHERE t.delete_mark = 0
         <if test="dto.majorIds != null and !dto.majorIds.isEmpty()">
         <if test="dto.majorIds != null and !dto.majorIds.isEmpty()">
-            and t1.major_set_id in
+            and t.id in
             <foreach item="id" index="index" collection="dto.majorIds" open="(" close=")" separator=",">
             <foreach item="id" index="index" collection="dto.majorIds" open="(" close=")" separator=",">
                 #{id}
                 #{id}
             </foreach>
             </foreach>
         </if>
         </if>
         <if test="dto.majorSetName != null and dto.majorSetName != ''">
         <if test="dto.majorSetName != null and dto.majorSetName != ''">
-            and t.name like concat('', #{dto.majorSetName},'')
+            and t.name like concat('%', #{dto.majorSetName},'%')
         </if>
         </if>
     </select>
     </select>
     <select id="getStudentMajorId" parameterType="com.xjrsoft.module.banding.dto.BandingTaskClassPageDto" resultType="com.xjrsoft.module.student.entity.BaseNewStudent">
     <select id="getStudentMajorId" parameterType="com.xjrsoft.module.banding.dto.BandingTaskClassPageDto" resultType="com.xjrsoft.module.student.entity.BaseNewStudent">