소스 검색

分班功能优化

dzx 1 년 전
부모
커밋
410a39683a
21개의 변경된 파일150개의 추가작업 그리고 46개의 파일을 삭제
  1. 2 4
      src/main/java/com/xjrsoft/module/banding/controller/BandingTaskClassController.java
  2. 0 2
      src/main/java/com/xjrsoft/module/banding/controller/BandingTaskMajorConditionController.java
  3. 6 1
      src/main/java/com/xjrsoft/module/banding/dto/BandingTaskClassPageDto.java
  4. 3 1
      src/main/java/com/xjrsoft/module/banding/dto/BandingTaskMajorConditionListDto.java
  5. 0 1
      src/main/java/com/xjrsoft/module/banding/dto/ChangeClassDto.java
  6. 14 4
      src/main/java/com/xjrsoft/module/banding/dto/StudentDto.java
  7. 3 3
      src/main/java/com/xjrsoft/module/banding/mapper/BandingTaskClassStudentMapper.java
  8. 3 2
      src/main/java/com/xjrsoft/module/banding/service/IBandingTaskClassStudentService.java
  9. 0 1
      src/main/java/com/xjrsoft/module/banding/service/IBandingTaskMajorConditionService.java
  10. 0 1
      src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassServiceImpl.java
  11. 7 5
      src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassStudentServiceImpl.java
  12. 1 1
      src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskServiceImpl.java
  13. 0 2
      src/main/java/com/xjrsoft/module/banding/vo/BandingTaskClassSureListVo.java
  14. 0 3
      src/main/java/com/xjrsoft/module/banding/vo/BandingTaskPageVo.java
  15. 8 0
      src/main/java/com/xjrsoft/module/courseTable/controller/SecondCourseController.java
  16. 3 0
      src/main/java/com/xjrsoft/module/courseTable/vo/SecondCoursePageVo.java
  17. 29 5
      src/main/resources/mapper/banding/BandingTaskClassMapper.xml
  18. 63 6
      src/main/resources/mapper/banding/BandingTaskClassStudentMapper.xml
  19. 3 0
      src/main/resources/mapper/banding/BandingTaskMajorConditionMapper.xml
  20. 3 2
      src/main/resources/mapper/courseTable/SecondCourseMapper.xml
  21. 2 2
      src/main/resources/mapper/organization/UserMapper.xml

+ 2 - 4
src/main/java/com/xjrsoft/module/banding/controller/BandingTaskClassController.java

@@ -5,7 +5,6 @@ import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.support.ExcelTypeEnum;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.utils.VoToColumnUtil;
@@ -28,7 +27,6 @@ import com.xjrsoft.module.banding.vo.BandingTaskClassPageVo;
 import com.xjrsoft.module.banding.vo.BandingTaskClassStudentListVo;
 import com.xjrsoft.module.banding.vo.BandingTaskClassSureListVo;
 import com.xjrsoft.module.banding.vo.BandingTaskClassVo;
-import com.xjrsoft.module.room.entity.RoomBed;
 import com.xjrsoft.module.student.dto.BaseNewStudentPageDto;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -252,7 +250,7 @@ public class BandingTaskClassController {
     @ApiOperation(value = "满足学生")
     @SaCheckPermission("bandingTaskClass:satisfy-student")
     public RT<List<BaseNewStudentPageDto>> satisfyStudent(@Valid StudentDto dto){
-        List<BaseNewStudentPageDto> list = classStudentService.satisfyStudent(dto.getBandingTaskClassId());
+        List<BaseNewStudentPageDto> list = classStudentService.satisfyStudent(dto);
         return RT.ok(list);
     }
 
@@ -260,7 +258,7 @@ public class BandingTaskClassController {
     @ApiOperation(value = "剩余学生")
     @SaCheckPermission("bandingTaskClass:surplus-student")
     public RT<List<BaseNewStudentPageDto>> surplusStudent(@Valid StudentDto dto){
-        List<BaseNewStudentPageDto> list = classStudentService.surplusStudent(dto.getBandingTaskClassId());
+        List<BaseNewStudentPageDto> list = classStudentService.surplusStudent(dto);
         return RT.ok(list);
     }
 

+ 0 - 2
src/main/java/com/xjrsoft/module/banding/controller/BandingTaskMajorConditionController.java

@@ -1,7 +1,6 @@
 package com.xjrsoft.module.banding.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.module.banding.dto.BandingTaskClassPageDto;
 import com.xjrsoft.module.banding.dto.BandingTaskMajorConditionListDto;
@@ -10,7 +9,6 @@ import com.xjrsoft.module.banding.entity.BandingTask;
 import com.xjrsoft.module.banding.service.IBandingTaskMajorConditionService;
 import com.xjrsoft.module.banding.service.IBandingTaskService;
 import com.xjrsoft.module.banding.vo.BandingTaskMajorConditionListVo;
-import com.xjrsoft.module.outint.vo.IdCountVo;
 import com.xjrsoft.module.student.entity.BaseNewStudent;
 import com.xjrsoft.module.student.service.IBaseNewStudentService;
 import io.swagger.annotations.Api;

+ 6 - 1
src/main/java/com/xjrsoft/module/banding/dto/BandingTaskClassPageDto.java

@@ -1,6 +1,5 @@
 package com.xjrsoft.module.banding.dto;
 
-import com.xjrsoft.common.page.PageInput;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -24,4 +23,10 @@ public class BandingTaskClassPageDto{
 
     @ApiModelProperty("招生类型")
     private String enrollType;
+
+    @ApiModelProperty("班级名称")
+    private String name;
+
+    @ApiModelProperty("专业方向名称")
+    private String majorSetName;
 }

+ 3 - 1
src/main/java/com/xjrsoft/module/banding/dto/BandingTaskMajorConditionListDto.java

@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.math.BigDecimal;
 import java.util.List;
 
 
@@ -24,4 +23,7 @@ public class BandingTaskMajorConditionListDto {
     @ApiModelProperty("专业id")
     private List<Long> majorIds;
 
+    @ApiModelProperty("专业方向名称")
+    private String majorSetName;
+
 }

+ 0 - 1
src/main/java/com/xjrsoft/module/banding/dto/ChangeClassDto.java

@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 import java.util.List;
 
 

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

@@ -1,11 +1,9 @@
 package com.xjrsoft.module.banding.dto;
 
+import com.xjrsoft.common.page.PageInput;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.io.Serializable;
-import java.util.List;
-
 
 /**
 * @title: 调整班级
@@ -14,7 +12,7 @@ import java.util.List;
 * @Version 1.0
 */
 @Data
-public class StudentDto implements Serializable {
+public class StudentDto extends PageInput {
 
     private static final long serialVersionUID = 1L;
 
@@ -22,4 +20,16 @@ public class StudentDto implements Serializable {
     @ApiModelProperty("班级id")
     private Long bandingTaskClassId;
 
+    @ApiModelProperty("姓名")
+    private String name;
+
+    @ApiModelProperty("性别-字典")
+    private String gender;
+
+    @ApiModelProperty("身份证")
+    private String credentialNumber;
+
+    @ApiModelProperty("专业方向id")
+    private Long majorSetId;
+
 }

+ 3 - 3
src/main/java/com/xjrsoft/module/banding/mapper/BandingTaskClassStudentMapper.java

@@ -1,7 +1,7 @@
 package com.xjrsoft.module.banding.mapper;
 
 import com.github.yulichang.base.MPJBaseMapper;
-import com.xjrsoft.module.banding.entity.BandingTaskClass;
+import com.xjrsoft.module.banding.dto.StudentDto;
 import com.xjrsoft.module.banding.entity.BandingTaskClassStudent;
 import com.xjrsoft.module.student.dto.BaseNewStudentPageDto;
 import org.apache.ibatis.annotations.Mapper;
@@ -18,7 +18,7 @@ import java.util.List;
 @Mapper
 public interface BandingTaskClassStudentMapper extends MPJBaseMapper<BandingTaskClassStudent> {
 
-    List<BaseNewStudentPageDto> satisfyStudent(@Param("bandingTaskClassId") Long bandingTaskClassId);
+    List<BaseNewStudentPageDto> satisfyStudent(@Param("dto") StudentDto dto);
 
-    List<BaseNewStudentPageDto> surplusStudent(@Param("taskClass") BandingTaskClass taskClass);
+    List<BaseNewStudentPageDto> surplusStudent(@Param("dto") StudentDto dto);
 }

+ 3 - 2
src/main/java/com/xjrsoft/module/banding/service/IBandingTaskClassStudentService.java

@@ -2,6 +2,7 @@ package com.xjrsoft.module.banding.service;
 
 import com.github.yulichang.base.MPJBaseService;
 import com.xjrsoft.module.banding.dto.ChangeClassDto;
+import com.xjrsoft.module.banding.dto.StudentDto;
 import com.xjrsoft.module.banding.entity.BandingTaskClassStudent;
 import com.xjrsoft.module.student.dto.BaseNewStudentPageDto;
 
@@ -45,9 +46,9 @@ public interface IBandingTaskClassStudentService extends MPJBaseService<BandingT
     Boolean removeStudent(ChangeClassDto dto);
 
 
-    List<BaseNewStudentPageDto> satisfyStudent(Long bandingTaskClassId);
+    List<BaseNewStudentPageDto> satisfyStudent(StudentDto dto);
 
-    List<BaseNewStudentPageDto> surplusStudent(Long bandingTaskClassId);
+    List<BaseNewStudentPageDto> surplusStudent(StudentDto dto);
 
 
     Boolean insertStudent(ChangeClassDto dto);

+ 0 - 1
src/main/java/com/xjrsoft/module/banding/service/IBandingTaskMajorConditionService.java

@@ -7,7 +7,6 @@ import com.xjrsoft.module.banding.dto.SaveMajorConditionDto;
 import com.xjrsoft.module.banding.entity.BandingTaskMajorCondition;
 import com.xjrsoft.module.banding.vo.BandingTaskMajorConditionListVo;
 import com.xjrsoft.module.student.entity.BaseNewStudent;
-import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 

+ 0 - 1
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassServiceImpl.java

@@ -25,7 +25,6 @@ import com.xjrsoft.module.base.service.IBaseClassroomService;
 import com.xjrsoft.module.base.service.IBaseMajorSetService;
 import com.xjrsoft.module.organization.entity.User;
 import com.xjrsoft.module.organization.service.IUserService;
-import com.xjrsoft.module.room.entity.RoomBed;
 import com.xjrsoft.module.system.entity.DictionaryDetail;
 import com.xjrsoft.module.system.entity.DictionaryItem;
 import com.xjrsoft.module.system.mapper.DictionarydetailMapper;

+ 7 - 5
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskClassStudentServiceImpl.java

@@ -12,6 +12,7 @@ import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.module.banding.dto.BandingTaskClassStudentPageDto;
 import com.xjrsoft.module.banding.dto.ChangeClassDto;
+import com.xjrsoft.module.banding.dto.StudentDto;
 import com.xjrsoft.module.banding.entity.BandingTask;
 import com.xjrsoft.module.banding.entity.BandingTaskClass;
 import com.xjrsoft.module.banding.entity.BandingTaskClassStudent;
@@ -289,14 +290,15 @@ public class BandingTaskClassStudentServiceImpl extends MPJBaseServiceImpl<Bandi
     }
 
     @Override
-    public List<BaseNewStudentPageDto> satisfyStudent(Long bandingTaskClassId) {
-        return this.baseMapper.satisfyStudent(bandingTaskClassId);
+    public List<BaseNewStudentPageDto> satisfyStudent(StudentDto dto) {
+        return this.baseMapper.satisfyStudent(dto);
     }
 
     @Override
-    public List<BaseNewStudentPageDto> surplusStudent(Long bandingTaskClassId) {
-        BandingTaskClass taskClass = taskClassMapper.selectById(bandingTaskClassId);
-        return this.baseMapper.surplusStudent(taskClass);
+    public List<BaseNewStudentPageDto> surplusStudent(StudentDto dto) {
+        BandingTaskClass taskClass = taskClassMapper.selectById(dto.getBandingTaskClassId());
+        dto.setMajorSetId(taskClass.getMajorSetId());
+        return this.baseMapper.surplusStudent(dto);
     }
 
     @Override

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

@@ -33,6 +33,7 @@ import com.xjrsoft.module.banding.service.IBandingTaskMajorConditionService;
 import com.xjrsoft.module.banding.service.IBandingTaskService;
 import com.xjrsoft.module.banding.vo.BandingTaskClassSureListVo;
 import com.xjrsoft.module.banding.vo.BandingTaskPageVo;
+import com.xjrsoft.module.banding.vo.IdManyCountVo;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseMajorSet;
 import com.xjrsoft.module.base.mapper.BaseMajorSetMapper;
@@ -42,7 +43,6 @@ import com.xjrsoft.module.organization.entity.UserRoleRelation;
 import com.xjrsoft.module.organization.service.IUserRoleRelationService;
 import com.xjrsoft.module.organization.service.IUserService;
 import com.xjrsoft.module.outint.vo.IdCountVo;
-import com.xjrsoft.module.banding.vo.IdManyCountVo;
 import com.xjrsoft.module.student.entity.BaseClassMajorSet;
 import com.xjrsoft.module.student.entity.BaseNewStudent;
 import com.xjrsoft.module.student.entity.BaseStudent;

+ 0 - 2
src/main/java/com/xjrsoft/module/banding/vo/BandingTaskClassSureListVo.java

@@ -3,8 +3,6 @@ package com.xjrsoft.module.banding.vo;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.math.BigDecimal;
-
 /**
 * @title: 新生分班任务分页列表出参
 * @Author dzx

+ 0 - 3
src/main/java/com/xjrsoft/module/banding/vo/BandingTaskPageVo.java

@@ -1,12 +1,9 @@
 package com.xjrsoft.module.banding.vo;
 
-import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ContentStyle;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import java.util.Date;
-
 /**
 * @title: 新生分班任务分页列表出参
 * @Author dzx

+ 8 - 0
src/main/java/com/xjrsoft/module/courseTable/controller/SecondCourseController.java

@@ -78,7 +78,15 @@ public class SecondCourseController {
     @ApiOperation(value="第二课堂列表(分页)")
     @SaCheckPermission("secondcourse:detail")
     public RT<PageOutput<SecondCoursePageVo>> page(@Valid SecondCoursePageDto dto){
+        if(dto.getUserId() == null){
+            dto.setUserId(StpUtil.getLoginIdAsLong());
+        }
         Page<SecondCoursePageVo> page = secondCourseService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        for (SecondCoursePageVo record : page.getRecords()) {
+            if(record.getEnrollStatus() > 0){
+                record.setEnrollStatus(1);
+            }
+        }
         PageOutput<SecondCoursePageVo> pageOutput = ConventPage.getPageOutput(page, SecondCoursePageVo.class);
         return RT.ok(pageOutput);
     }

+ 3 - 0
src/main/java/com/xjrsoft/module/courseTable/vo/SecondCoursePageVo.java

@@ -57,4 +57,7 @@ public class SecondCoursePageVo {
     @ApiModelProperty("报名人数")
     private Integer enrollCount;
 
+    @ApiModelProperty("是否报名(0:否 1:是)")
+    private Integer enrollStatus;
+
 }

+ 29 - 5
src/main/resources/mapper/banding/BandingTaskClassMapper.xml

@@ -34,6 +34,13 @@
         LEFT JOIN banding_task_major_condition t5 ON t1.major_set_id = t5.major_set_id AND t5.delete_mark = 0
         AND t5.banding_task_id = #{dto.bandingTaskId}
         WHERE t1.delete_mark = 0 and t1.banding_task_id = #{dto.bandingTaskId}
+        <if test="dto.name != null and dto.name != ''">
+            and t1.name like concat('%', #{dto.name},'%')
+        </if>
+        <if test="dto.name != null and dto.name != ''">
+            and t2.name like concat('%', #{dto.majorSetName},'%')
+        </if>
+        ORDER BY t1.sort_code IS NULL, t1.sort_code ASC
     </select>
 
     <select id="getClassSure" parameterType="com.xjrsoft.module.banding.dto.BandingTaskClassPageDto" resultType="com.xjrsoft.module.banding.vo.BandingTaskClassSureListVo">
@@ -107,14 +114,31 @@
         <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 != null">
             <if test="dto.order == 'ascend'">
-                order by t1.score asc
+                <if test="dto.field != null and dto.field == 'height'">
+                    order by t1.height asc
+                </if>
+                <if test="dto.field != null and dto.field == 'weight'">
+                    order by t1.weight asc
+                </if>
+                <if test="dto.field != null and dto.field != '' and dto.field == 'score'">
+                    order by t1.score asc
+                </if>
+            </if>
+            <if test="dto.order == 'descend'">
+                <if test="dto.field != null and dto.field == 'height'">
+                    order by t1.height desc
+                </if>
+                <if test="dto.field != null and dto.field == 'weight'">
+                    order by t1.weight desc
+                </if>
+                <if test="dto.field != null and dto.field != '' and dto.field == 'score'">
+                    order by t1.score desc
+                </if>
             </if>
         </if>
+
     </select>
 
     <select id="getMajorClassCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">

+ 63 - 6
src/main/resources/mapper/banding/BandingTaskClassStudentMapper.xml

@@ -3,7 +3,7 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.banding.mapper.BandingTaskClassStudentMapper">
-    <select id="satisfyStudent" resultType="com.xjrsoft.module.student.vo.BaseNewStudentPageVo">
+    <select id="satisfyStudent" parameterType="com.xjrsoft.module.banding.dto.StudentDto" resultType="com.xjrsoft.module.student.vo.BaseNewStudentPageVo">
         SELECT t1.id,t1.graduate_school,t1.name,t1.gender,t2.name AS gender_cn,t1.credential_number,t1.height,t1.weight,
         t1.score,t1.graduate_class,t6.name as source,t1.stduy_status,t3.name AS stduy_status_cn,t1.mobile,t7.name as first_ambition,
         t8.name as second_ambition,t1.is_adjust,t1.status FROM base_new_student t1
@@ -14,10 +14,43 @@
         LEFT JOIN enrollment_plan t4 ON t1.enrollment_plan_id = t4.id
         LEFT JOIN base_major_set t7 ON t1.first_ambition = t7.id
         LEFT JOIN base_major_set t8 ON t1.second_ambition = t8.id
-        WHERE t1.delete_mark = 0 AND t5.delete_mark = 0 AND t5.banding_task_class_id = #{bandingTaskClassId}
+        WHERE t1.delete_mark = 0 AND t5.delete_mark = 0 AND t5.banding_task_class_id = #{dto.bandingTaskClassId}
+        <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 == 'ascend'">
+                <if test="dto.field != null and dto.field == 'height'">
+                    order by t1.height asc
+                </if>
+                <if test="dto.field != null and dto.field == 'weight'">
+                    order by t1.weight asc
+                </if>
+                <if test="dto.field != null and dto.field != '' and dto.field == 'score'">
+                    order by t1.score asc
+                </if>
+            </if>
+            <if test="dto.order == 'descend'">
+                <if test="dto.field != null and dto.field == 'height'">
+                    order by t1.height desc
+                </if>
+                <if test="dto.field != null and dto.field == 'weight'">
+                    order by t1.weight desc
+                </if>
+                <if test="dto.field != null and dto.field != '' and dto.field == 'score'">
+                    order by t1.score desc
+                </if>
+            </if>
+        </if>
     </select>
 
-    <select id="surplusStudent" parameterType="com.xjrsoft.module.banding.entity.BandingTaskClass" resultType="com.xjrsoft.module.student.vo.BaseNewStudentPageVo">
+    <select id="surplusStudent" parameterType="com.xjrsoft.module.banding.dto.StudentDto" resultType="com.xjrsoft.module.student.vo.BaseNewStudentPageVo">
         SELECT t1.id,t1.graduate_school,t1.name,t1.gender,t2.name AS gender_cn,t1.credential_number,t1.height,t1.weight,
         t1.score,t1.graduate_class,t6.name as source,t1.stduy_status,t3.name AS stduy_status_cn,t1.mobile,t7.name as first_ambition,
         t8.name as second_ambition,t1.is_adjust,t1.status FROM base_new_student t1
@@ -28,11 +61,35 @@
         LEFT JOIN xjr_dictionary_detail t6 ON t1.source = t6.code AND t6.item_id = 2023000000000000028
         LEFT JOIN base_major_set t7 ON t1.first_ambition = t7.id
         LEFT JOIN base_major_set t8 ON t1.second_ambition = t8.id
-        WHERE t1.delete_mark = 0 AND t5.id = #{taskClass.bandingTaskId}
-        AND (t1.first_ambition_id = #{taskClass.majorSetId} or t1.second_ambition_id = #{taskClass.majorSetId})
+        WHERE t1.delete_mark = 0 AND t5.id = #{dto.bandingTaskId}
+        AND (t1.first_ambition_id = #{dto.majorSetId} or t1.second_ambition_id = #{dto.majorSetId})
             and t1.id not in (SELECT new_student_id FROM banding_task_class_student c1
             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 = #{taskClass.bandingTaskId}
+            WHERE c1.delete_mark = 0 AND c2.delete_mark = 0 AND c2.banding_task_id = #{dto.bandingTaskId}
         )
+        <if test="dto.order != null">
+            <if test="dto.order == 'ascend'">
+                <if test="dto.field != null and dto.field == 'height'">
+                    order by t1.height asc
+                </if>
+                <if test="dto.field != null and dto.field == 'weight'">
+                    order by t1.weight asc
+                </if>
+                <if test="dto.field != null and dto.field != '' and dto.field == 'score'">
+                    order by t1.score asc
+                </if>
+            </if>
+            <if test="dto.order == 'descend'">
+                <if test="dto.field != null and dto.field == 'height'">
+                    order by t1.height desc
+                </if>
+                <if test="dto.field != null and dto.field == 'weight'">
+                    order by t1.weight desc
+                </if>
+                <if test="dto.field != null and dto.field != '' and dto.field == 'score'">
+                    order by t1.score desc
+                </if>
+            </if>
+        </if>
     </select>
 </mapper>

+ 3 - 0
src/main/resources/mapper/banding/BandingTaskMajorConditionMapper.xml

@@ -14,6 +14,9 @@
                 #{id}
             </foreach>
         </if>
+        <if test="dto.majorSetName != null and dto.majorSetName != ''">
+            and t1.name like concat('', #{dto.majorSetName},'')
+        </if>
     </select>
     <select id="getStudentMajorId" parameterType="com.xjrsoft.module.banding.dto.BandingTaskClassPageDto" resultType="com.xjrsoft.module.student.entity.BaseNewStudent">
         SELECT t1.* FROM base_new_student t1

+ 3 - 2
src/main/resources/mapper/courseTable/SecondCourseMapper.xml

@@ -5,7 +5,8 @@
 <mapper namespace="com.xjrsoft.module.courseTable.mapper.SecondCourseMapper">
     <select id="getPage" parameterType="com.xjrsoft.module.courseTable.dto.SecondCoursePageDto" resultType="com.xjrsoft.module.courseTable.vo.SecondCoursePageVo">
         SELECT t1.id,t2.name AS semester_name,t1.name,t1.place,t1.content,t1.teacher_name,t1.status,
-        (SELECT COUNT(*) FROM second_course_enroll WHERE delete_mark = 0 AND second_course_id = t1.id) AS enroll_count FROM second_course t1
+        (SELECT COUNT(*) FROM second_course_enroll WHERE delete_mark = 0 AND second_course_id = t1.id) AS enroll_count,
+        ifnull((SELECT COUNT(*) FROM second_course_enroll WHERE delete_mark = 0 AND second_course_id = t1.id and user_id = #{dto.userId}), 0) AS enroll_status FROM second_course t1
         LEFT JOIN base_semester t2 ON t1.base_semester_id = t2.id
         WHERE t1.delete_mark = 0
         <if test="dto.name != null and dto.name != ''">
@@ -44,7 +45,7 @@
         SELECT t1.id,t2.name AS semester_name,t1.name,t1.place,t1.content,t1.teacher_name,t1.status,
         (SELECT COUNT(*) FROM second_course_enroll WHERE delete_mark = 0 AND second_course_id = t1.id) AS enroll_count FROM second_course t1
         LEFT JOIN base_semester t2 ON t1.base_semester_id = t2.id
-        LEFT JOIN activity_enroll t3 ON t1.id = t5.second_course_id
+        LEFT JOIN activity_enroll t3 ON t1.id = t3.second_course_id
         WHERE t1.delete_mark = 0 and t3.user_id = #{dto.userId}
         <if test="dto.name != null and dto.name != ''">
             and t1.name like concat('%', #{dto.name}, '%')

+ 2 - 2
src/main/resources/mapper/organization/UserMapper.xml

@@ -19,13 +19,13 @@
         SELECT t1.id, t1.name as student_name, t1.enabled_mark, t1.credential_number, t4.name AS class_name,t1.mobile,
         (SELECT name FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t1.id ORDER BY create_date ASC LIMIT 0,1) as parent_name,
         (SELECT mobile FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t1.id ORDER BY create_date ASC LIMIT 0,1) as parent_mobile,
-        t1.gender,t4.id as class_id, t4.teacher_id,t5.name as teacher_name,t5.user_name as teacher_user_name,t5.mobile as teacher_mobile,t5.name as classroom_name
+        t1.gender,t4.id as class_id, t4.teacher_id,t6.name as teacher_name,t6.user_name as teacher_user_name,t6.mobile as teacher_mobile,t5.name as classroom_name
         FROM xjr_user t1
         INNER JOIN base_student t2 ON t1.id = t2.user_id
         INNER JOIN base_student_school_roll t3 ON t1.id = t3.user_id
         INNER JOIN base_class t4 ON t4.id = t3.class_id
         left join base_classroom t5 on t4.classroom_id = t5.id
-        left join xjr_user t5 on t4.teacher_id = t5.id
+        left join xjr_user t6 on t4.teacher_id = t6.id
         WHERE t1.delete_mark = 0
         <if test="dto.keyword != null and dto.keyword != ''">
             AND (t1.name like concat('%', #{dto.keyword}, '%') OR t1.credential_number like concat('%', #{dto.keyword}, '%'))