Browse Source

Merge remote-tracking branch 'origin/dev' into dev

大数据与最优化研究所 9 months ago
parent
commit
f4eb6d11b9

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

@@ -401,6 +401,7 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
             one.setEnabledMark(EnabledMark.ENABLED.getCode());
             one.setEnabledMark(EnabledMark.ENABLED.getCode());
             one.setName(baseClass.getName());
             one.setName(baseClass.getName());
             one.setCreateUserId(StpUtil.getLoginIdAsLong());
             one.setCreateUserId(StpUtil.getLoginIdAsLong());
+            one.setStatus(0);
             insList.add(one);
             insList.add(one);
         }
         }
         if(!insList.isEmpty()){
         if(!insList.isEmpty()){

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

@@ -139,6 +139,7 @@ public class BandingTaskClassStudentServiceImpl extends MPJBaseServiceImpl<Bandi
             List<BaseNewStudent> updateList = new ArrayList<>();
             List<BaseNewStudent> updateList = new ArrayList<>();
             for (BaseNewStudent student : list) {
             for (BaseNewStudent student : list) {
                 student.setStatus(1);
                 student.setStatus(1);
+                student.setOperateMode(2);
                 updateList.add(student);
                 updateList.add(student);
             }
             }
             if(!updateList.isEmpty()){
             if(!updateList.isEmpty()){

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

@@ -1,6 +1,7 @@
 package com.xjrsoft.module.banding.service.impl;
 package com.xjrsoft.module.banding.service.impl;
 
 
 import cn.dev33.satoken.secure.BCrypt;
 import cn.dev33.satoken.secure.BCrypt;
+import cn.dev33.satoken.stp.StpUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -53,11 +54,14 @@ import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentFamily;
 import com.xjrsoft.module.student.entity.BaseStudentFamily;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
 import com.xjrsoft.module.student.entity.EnrollmentPlan;
 import com.xjrsoft.module.student.entity.EnrollmentPlan;
+import com.xjrsoft.module.student.entity.StudentReportRecord;
 import com.xjrsoft.module.student.mapper.BaseClassMajorSetMapper;
 import com.xjrsoft.module.student.mapper.BaseClassMajorSetMapper;
 import com.xjrsoft.module.student.service.IBaseNewStudentService;
 import com.xjrsoft.module.student.service.IBaseNewStudentService;
 import com.xjrsoft.module.student.service.IBaseStudentFamilyService;
 import com.xjrsoft.module.student.service.IBaseStudentFamilyService;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
 import com.xjrsoft.module.student.service.IBaseStudentService;
 import com.xjrsoft.module.student.service.IBaseStudentService;
+import com.xjrsoft.module.student.service.IStudentChangeRecordService;
+import com.xjrsoft.module.student.service.IStudentReportRecordService;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -105,6 +109,7 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
     private final IBaseGradeService gradeService;
     private final IBaseGradeService gradeService;
     private final BaseMajorSetMapper majorSetMapper;
     private final BaseMajorSetMapper majorSetMapper;
     private final RedisUtil redisUtil;
     private final RedisUtil redisUtil;
+    private final IStudentReportRecordService reportRecordService;
 
 
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
@@ -157,7 +162,7 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
         );
         );
         List<Long> studentIds = classStudents.stream().map(BandingTaskClassStudent::getNewStudentId).collect(Collectors.toList());
         List<Long> studentIds = classStudents.stream().map(BandingTaskClassStudent::getNewStudentId).collect(Collectors.toList());
 
 
-        List<String> orderColumn = new ArrayList();
+        List<String> orderColumn = new ArrayList<>();
         orderColumn.add("score");
         orderColumn.add("score");
         List<BaseNewStudent> baseNewStudents = newStudentService.selectJoinList(BaseNewStudent.class,
         List<BaseNewStudent> baseNewStudents = newStudentService.selectJoinList(BaseNewStudent.class,
                 new MPJLambdaWrapper<BaseNewStudent>()
                 new MPJLambdaWrapper<BaseNewStudent>()
@@ -519,7 +524,6 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
                 result.get(classIndex).add(currentStudent);
                 result.get(classIndex).add(currentStudent);
             }
             }
 
 
-
             for (int i = 0; i < result.size(); i ++){
             for (int i = 0; i < result.size(); i ++){
                 classStudentMap.put(classList.get(i).getId(), result.get(i));
                 classStudentMap.put(classList.get(i).getId(), result.get(i));
             }
             }
@@ -720,7 +724,49 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
     @Override
     @Override
     @Transactional
     @Transactional
     public Boolean sureReport(SureBandingTaskDto dto) {
     public Boolean sureReport(SureBandingTaskDto dto) {
-        return null;
+        //修改新生信息中的状态
+        List<BandingTaskClassStudent> classStudents = classStudentService.list(
+                new MPJLambdaWrapper<BandingTaskClassStudent>()
+                        .innerJoin(BandingTaskClass.class, BandingTaskClass::getId, BandingTaskClassStudent::getBandingTaskClassId)
+                        .eq(BandingTaskClass::getBandingTaskId, dto.getBandingTaskId())
+        );
+        List<Long> studentIds = classStudents.stream().map(BandingTaskClassStudent::getNewStudentId).collect(Collectors.toList());
+        if(studentIds.isEmpty()){
+            throw new MyException("未能查询到学生,无法确认");
+        }
+        List<BaseNewStudent> list = newStudentService.list(
+                new QueryWrapper<BaseNewStudent>().lambda()
+                        .in(BaseNewStudent::getId, studentIds)
+        );
+        List<BaseNewStudent> updateList = new ArrayList<>();
+        for (BaseNewStudent student : list) {
+            student.setStatus(1);
+            student.setOperateMode(1);
+            updateList.add(student);
+        }
+
+        if(!updateList.isEmpty()){
+            newStudentService.updateBatchById(updateList);
+        }
+
+        //将新生数据初始化到报到表中
+        List<StudentReportRecord> insertList = new ArrayList<>();
+        for (BaseNewStudent student : updateList) {
+            insertList.add(
+                    new StudentReportRecord(){{
+                        setCreateDate(new Date());
+                        setCreateUserId(StpUtil.getLoginIdAsLong());
+                        setUserId(student.getId());
+                        setBandingTaskId(dto.getBandingTaskId());
+                    }}
+            );
+        }
+        reportRecordService.saveBatch(insertList);
+
+        BandingTask bandingTask = this.getById(dto.getId());
+        bandingTask.setStatus(1);
+        bandingTask.setModifyDate(new Date());
+        return this.update(bandingTask);
     }
     }
 
 
     LocalDate getBirthDate(String idCardNumber){
     LocalDate getBirthDate(String idCardNumber){
@@ -737,4 +783,14 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
             throw new MyException("身份证号填写错误,无法提取出生日期");
             throw new MyException("身份证号填写错误,无法提取出生日期");
         }
         }
     }
     }
+
+    /**
+     * 修改新生信息中的状态和分班类型
+     * @param bandingTaskId 分班任务id
+     * @param operateMode 分班类型(1:自动分班 2:手动分班)
+     * @param baseNewStudentId 新生id,适合手动调整班级时调用
+     */
+    void updateBaseNewStudentStatus(Long bandingTaskId, Integer operateMode, Long baseNewStudentId){
+
+    };
 }
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/courseTable/service/impl/CourseTableServiceImpl.java

@@ -457,6 +457,9 @@ public class CourseTableServiceImpl extends ServiceImpl<CourseTableMapper, Cours
             } else if (CourseAdjustTypeEnum.courseSubstitute.getCode().equals(courseAdjust.getAdjustType())) {
             } else if (CourseAdjustTypeEnum.courseSubstitute.getCode().equals(courseAdjust.getAdjustType())) {
                 for (String courseId : courseIds) {
                 for (String courseId : courseIds) {
                     CourseTable courseTable = courseMap.get(bakKeyInfoMap.get(Long.parseLong(courseId)));
                     CourseTable courseTable = courseMap.get(bakKeyInfoMap.get(Long.parseLong(courseId)));
+                    if(courseTable == null){
+                        continue;
+                    }
 
 
                     User applyUser = userService.getById(courseAdjust.getUserId());//申请人
                     User applyUser = userService.getById(courseAdjust.getUserId());//申请人
                     User exchangeUser = userService.getById(courseAdjust.getExchangeTeacherId());//顶课人
                     User exchangeUser = userService.getById(courseAdjust.getExchangeTeacherId());//顶课人

+ 4 - 0
src/main/java/com/xjrsoft/module/job/BaseNewStudentTask.java

@@ -158,6 +158,8 @@ public class BaseNewStudentTask {
                 existsNewStudent.setSecondAmbitionId(majorSetNameMap.get(feeobjupdate.getZytjspec()));
                 existsNewStudent.setSecondAmbitionId(majorSetNameMap.get(feeobjupdate.getZytjspec()));
                 existsNewStudent.setGender(GenderDictionaryEnum.getCode(feeobjupdate.getSex()));
                 existsNewStudent.setGender(GenderDictionaryEnum.getCode(feeobjupdate.getSex()));
                 existsNewStudent.setModifyDate(new Date());
                 existsNewStudent.setModifyDate(new Date());
+                existsNewStudent.setStatus(0);
+                existsNewStudent.setIsCanBanding(1);
 
 
                 updateList.add(existsNewStudent);
                 updateList.add(existsNewStudent);
                 continue;
                 continue;
@@ -196,6 +198,8 @@ public class BaseNewStudentTask {
                         setGender(GenderDictionaryEnum.getCode(feeobjupdate.getSex()));
                         setGender(GenderDictionaryEnum.getCode(feeobjupdate.getSex()));
                         setEnrollmentPlanId(planId);
                         setEnrollmentPlanId(planId);
                         setCreateDate(new Date());
                         setCreateDate(new Date());
+                        setStatus(0);
+                        setIsCanBanding(1);
                     }}
                     }}
             );
             );
         }
         }

+ 2 - 0
src/main/java/com/xjrsoft/module/liteflow/node/NewsSendMessageNode.java

@@ -25,6 +25,8 @@ public class NewsSendMessageNode extends NodeComponent {
         if (formId != null) {
         if (formId != null) {
             // 数据处理
             // 数据处理
             newsService.dataHandle(formId);
             newsService.dataHandle(formId);
+            newsService.SendMessage(formId);
+
         }
         }
     }
     }
 }
 }

+ 14 - 0
src/main/java/com/xjrsoft/module/oa/controller/NewsController.java

@@ -5,6 +5,7 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.yulichang.toolkit.MPJWrappers;
 import com.github.yulichang.toolkit.MPJWrappers;
@@ -42,6 +43,7 @@ import com.xjrsoft.module.organization.mapper.DepartmentMapper;
 import com.xjrsoft.module.system.entity.File;
 import com.xjrsoft.module.system.entity.File;
 import com.xjrsoft.module.system.entity.SystemUpdateMessage;
 import com.xjrsoft.module.system.entity.SystemUpdateMessage;
 import com.xjrsoft.module.system.entity.SystemUpdateMessageNotice;
 import com.xjrsoft.module.system.entity.SystemUpdateMessageNotice;
+import com.xjrsoft.module.system.service.IFileService;
 import com.xjrsoft.module.system.service.ISystemUpdateMessageService;
 import com.xjrsoft.module.system.service.ISystemUpdateMessageService;
 import com.xjrsoft.module.teacher.entity.XjrUser;
 import com.xjrsoft.module.teacher.entity.XjrUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
@@ -80,6 +82,7 @@ public class NewsController {
     private DepartmentMapper departmentMapper;
     private DepartmentMapper departmentMapper;
     private INewsRelationConfigService newsRelationConfigService;
     private INewsRelationConfigService newsRelationConfigService;
     private final ISystemUpdateMessageService systemUpdateMessageService;
     private final ISystemUpdateMessageService systemUpdateMessageService;
+    private final IFileService fileService;
 
 
 
 
     @GetMapping
     @GetMapping
@@ -107,6 +110,17 @@ public class NewsController {
     @ApiOperation(value = "获取接受新闻分页")
     @ApiOperation(value = "获取接受新闻分页")
     public RT<PageOutput<NewsPageVo>> receiptBox(NewsPageDto dto) {
     public RT<PageOutput<NewsPageVo>> receiptBox(NewsPageDto dto) {
         IPage<NewsPageVo> page = newsService.receiptBox(dto);
         IPage<NewsPageVo> page = newsService.receiptBox(dto);
+        for (NewsPageVo record : page.getRecords()) {
+            File file = fileService.getOne(
+                    new QueryWrapper<File>().lambda()
+                            .eq(File::getFolderId, record.getCover())
+                            .eq(File::getDeleteMark, DeleteMark.NODELETE.getCode())
+            );
+            if(file == null){
+                continue;
+            }
+            record.setCoverUrl(file.getFileUrl());
+        }
         PageOutput<NewsPageVo> pageOutput = ConventPage.getPageOutput(page, NewsPageVo.class);
         PageOutput<NewsPageVo> pageOutput = ConventPage.getPageOutput(page, NewsPageVo.class);
         return RT.ok(pageOutput);
         return RT.ok(pageOutput);
     }
     }

+ 7 - 3
src/main/java/com/xjrsoft/module/oa/service/impl/NewsServiceImpl.java

@@ -778,9 +778,13 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
 
 
     @Override
     @Override
     public boolean dataHandle(Long id) {
     public boolean dataHandle(Long id) {
-        CompletableFuture.runAsync(() -> {
-            this.SendMessage(id);
-        });
+        News news = this.getById(id);
+        if(news.getTypeId() != 1){
+            return true;
+        }
+        news.setSendRange(2);
+        this.updateById(news);
+        newsRelationMapper.insertAllTeaStaff(news.getId());
         return true;
         return true;
     }
     }
 
 

+ 3 - 0
src/main/java/com/xjrsoft/module/oa/vo/NewsPageVo.java

@@ -187,4 +187,7 @@ public class NewsPageVo {
 
 
     @ApiModelProperty("是否已读(2:是 0:否)")
     @ApiModelProperty("是否已读(2:是 0:否)")
     private Integer readMark;
     private Integer readMark;
+
+    @ApiModelProperty("封面url")
+    private String coverUrl;
 }
 }

+ 15 - 11
src/main/java/com/xjrsoft/module/student/controller/BaseNewStudentController.java

@@ -409,18 +409,22 @@ public class BaseNewStudentController {
     @PostMapping("/change-banding-status")
     @PostMapping("/change-banding-status")
     @ApiOperation(value = "修改分班状态")
     @ApiOperation(value = "修改分班状态")
     @SaCheckPermission("basenewstudent:add")
     @SaCheckPermission("basenewstudent:add")
-    public RT<Boolean> changeBandingStatus(@Valid @RequestBody ChangeBandingStatusDto dto){
-        BaseNewStudent newStudent = baseNewStudentService.getById(dto.getId());
-
-        UpdateWrapper<BaseNewStudent> updateWrapper = new UpdateWrapper<>();
-        updateWrapper.eq("id", newStudent.getId());
-        updateWrapper.setSql("is_can_banding = " + dto.getIsCanBanding());
-        if(StrUtil.isNotEmpty(dto.getRemarks())){
-            updateWrapper.setSql("remarks = '" + dto.getRemarks() + "'");
-        }else{
-            updateWrapper.setSql("remarks = null");
+    public RT<Boolean> changeBandingStatus(@Valid @RequestBody List<ChangeBandingStatusDto> dto){
+        for (ChangeBandingStatusDto el : dto) {
+            BaseNewStudent newStudent = baseNewStudentService.getById(el.getId());
+
+            UpdateWrapper<BaseNewStudent> updateWrapper = new UpdateWrapper<>();
+            updateWrapper.eq("id", newStudent.getId());
+            updateWrapper.setSql("is_can_banding = " + el.getIsCanBanding());
+            if(StrUtil.isNotEmpty(el.getRemarks())){
+                updateWrapper.setSql("remarks = '" + el.getRemarks() + "'");
+            }else{
+                updateWrapper.setSql("remarks = null");
+            }
+            baseNewStudentService.update(newStudent, updateWrapper);
         }
         }
-        return RT.ok(baseNewStudentService.update(newStudent, updateWrapper));
+
+        return RT.ok(true);
     }
     }
 
 
 }
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseNewStudent.java

@@ -193,4 +193,7 @@ public class BaseNewStudent implements Serializable {
 
 
     @ApiModelProperty("是否可以分班(0:否,1:是)")
     @ApiModelProperty("是否可以分班(0:否,1:是)")
     private Integer isCanBanding;
     private Integer isCanBanding;
+
+    @ApiModelProperty("分班类型(1:自动分班 2:手动分班)")
+    private Integer operateMode;
 }
 }

+ 4 - 1
src/main/java/com/xjrsoft/module/student/entity/StudentReportRecord.java

@@ -72,7 +72,7 @@ public class StudentReportRecord implements Serializable {
     /**
     /**
     * 学生id
     * 学生id
     */
     */
-    @ApiModelProperty("学生id")
+    @ApiModelProperty("学生id(banding_task_id不为空时则为新生id)")
     private Long userId;
     private Long userId;
     /**
     /**
     * 报到时间
     * 报到时间
@@ -88,5 +88,8 @@ public class StudentReportRecord implements Serializable {
     @ApiModelProperty("报到计划id")
     @ApiModelProperty("报到计划id")
     private Long studentReportPlanId;
     private Long studentReportPlanId;
 
 
+    @ApiModelProperty("分班任务id")
+    private Long bandingTaskId;
+
 
 
 }
 }

+ 10 - 6
src/main/resources/mapper/banding/BandingTaskClassMapper.xml

@@ -8,20 +8,24 @@
         (SELECT COUNT(*) FROM base_new_student a1
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
         INNER JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
         WHERE a1.delete_mark = 0 AND a1.first_ambition_id = t1.major_set_id
         WHERE a1.delete_mark = 0 AND a1.first_ambition_id = t1.major_set_id
+        and a1.is_can_banding = 1
         AND a2.enroll_type = #{dto.enrollType} AND a2.grade_id =#{dto.gradeId} ) AS first_ambition_count,
         AND a2.enroll_type = #{dto.enrollType} AND a2.grade_id =#{dto.gradeId} ) AS first_ambition_count,
         (SELECT COUNT(*) FROM base_new_student a1
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
         INNER JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
         WHERE a1.delete_mark = 0 AND a1.second_ambition_id = t1.major_set_id
         WHERE a1.delete_mark = 0 AND a1.second_ambition_id = t1.major_set_id
+        and a1.is_can_banding = 1
         AND a2.enroll_type = #{dto.enrollType} AND a2.grade_id =#{dto.gradeId} ) AS second_ambition_count,
         AND a2.enroll_type = #{dto.enrollType} AND a2.grade_id =#{dto.gradeId} ) AS second_ambition_count,
         t5.height, t5.score, (
         t5.height, t5.score, (
             SELECT count(a1.id) FROM base_new_student a1
             SELECT count(a1.id) FROM base_new_student a1
             INNER JOIN banding_task_class_student t5 ON a1.id = t5.new_student_id
             INNER JOIN banding_task_class_student t5 ON a1.id = t5.new_student_id
+            and a1.is_can_banding = 1
             WHERE a1.delete_mark = 0 AND t5.delete_mark = 0 AND t5.banding_task_class_id = t1.id
             WHERE a1.delete_mark = 0 AND t5.delete_mark = 0 AND t5.banding_task_class_id = t1.id
         ) as satisfy_count, (
         ) as satisfy_count, (
             SELECT count(a1.id) FROM base_new_student a1
             SELECT count(a1.id) FROM base_new_student a1
             LEFT JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
             LEFT JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
             LEFT JOIN banding_task a3 ON a2.grade_id = a3.grade_id AND a2.enroll_type = a3.enroll_type
             LEFT JOIN banding_task a3 ON a2.grade_id = a3.grade_id AND a2.enroll_type = a3.enroll_type
             WHERE a1.delete_mark = 0 AND a3.id = t1.banding_task_id
             WHERE a1.delete_mark = 0 AND a3.id = t1.banding_task_id
+            and a1.is_can_banding = 1
             AND (a1.first_ambition_id = t1.major_set_id or a1.second_ambition_id = t1.major_set_id)
             AND (a1.first_ambition_id = t1.major_set_id or a1.second_ambition_id = t1.major_set_id)
             and a1.id not in (SELECT new_student_id FROM banding_task_class_student c1
             and a1.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
             INNER JOIN banding_task_class c2 ON c1.banding_task_class_id = c2.id
@@ -47,19 +51,19 @@
         SELECT t1.id, t1.major_set_id,t2.name AS major_set_name, t1.name,t1.sort_code,
         SELECT t1.id, t1.major_set_id,t2.name AS major_set_name, t1.name,t1.sort_code,
         (SELECT COUNT(*) FROM base_new_student a1
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id) AS number,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1) AS number,
         (SELECT COUNT(*) FROM base_new_student a1
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.gender = 'SB10001') AS male_count,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1 AND a1.gender = 'SB10001') AS male_count,
         (SELECT COUNT(*) FROM base_new_student a1
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.gender = 'SB10002') AS female_count,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1 AND a1.gender = 'SB10002') AS female_count,
         (SELECT COUNT(*) FROM base_new_student a1
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.stduy_status = 'FB3001') AS not_stay_count,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1 AND a1.stduy_status = 'FB3001') AS not_stay_count,
         (SELECT COUNT(*) FROM base_new_student a1
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.stduy_status = 'FB3002') AS stay_count,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1 AND a1.stduy_status = 'FB3002') AS stay_count,
         t3.name AS teacher_name,t4.name as classroom_name, t1.is_order_class FROM banding_task_class t1
         t3.name AS teacher_name,t4.name as classroom_name, t1.is_order_class FROM banding_task_class t1
         LEFT JOIN base_major_set t2 ON t1.major_set_id = t2.id
         LEFT JOIN base_major_set t2 ON t1.major_set_id = t2.id
         LEFT JOIN xjr_user t3 ON t1.teacher_id = t3.id
         LEFT JOIN xjr_user t3 ON t1.teacher_id = t3.id
@@ -80,7 +84,7 @@
         LEFT JOIN xjr_dictionary_detail t7 ON t1.stduy_status = t7.code
         LEFT JOIN xjr_dictionary_detail t7 ON t1.stduy_status = t7.code
         LEFT JOIN xjr_user t8 ON t3.teacher_id = t8.id
         LEFT JOIN xjr_user t8 ON t3.teacher_id = t8.id
         INNER JOIN enrollment_plan t9 ON t1.enrollment_plan_id = t9.id
         INNER JOIN enrollment_plan t9 ON t1.enrollment_plan_id = t9.id
-        WHERE t1.delete_mark = 0
+        WHERE t1.delete_mark = 0 and t1.is_can_banding = 1
         and t9.grade_id = #{dto.gradeId} and t9.enroll_type = #{dto.enrollType}
         and t9.grade_id = #{dto.gradeId} and t9.enroll_type = #{dto.enrollType}
         <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
         <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
             AND t1.credential_number like concat('%', #{dto.credentialNumber}, '%')
             AND t1.credential_number like concat('%', #{dto.credentialNumber}, '%')

+ 5 - 3
src/main/resources/mapper/banding/BandingTaskClassStudentMapper.xml

@@ -6,7 +6,7 @@
     <select id="satisfyStudent" parameterType="com.xjrsoft.module.banding.dto.StudentDto" 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,
         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,
         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
+        t8.name as second_ambition,t1.is_adjust,t1.status,t1.remarks FROM base_new_student t1
         INNER JOIN banding_task_class_student t5 ON t1.id = t5.new_student_id
         INNER JOIN banding_task_class_student t5 ON t1.id = t5.new_student_id
         LEFT JOIN xjr_dictionary_detail t2 ON t1.gender = t2.code AND t2.item_id = 2023000000000000004
         LEFT JOIN xjr_dictionary_detail t2 ON t1.gender = t2.code AND t2.item_id = 2023000000000000004
         LEFT JOIN xjr_dictionary_detail t3 ON t1.stduy_status = t3.code AND t3.item_id = 2023000000000000030
         LEFT JOIN xjr_dictionary_detail t3 ON t1.stduy_status = t3.code AND t3.item_id = 2023000000000000030
@@ -14,7 +14,8 @@
         LEFT JOIN enrollment_plan t4 ON t1.enrollment_plan_id = t4.id
         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 t7 ON t1.first_ambition = t7.id
         LEFT JOIN base_major_set t8 ON t1.second_ambition = t8.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 = #{dto.bandingTaskClassId}
+        WHERE t1.delete_mark = 0 AND t5.delete_mark = 0 and t1.is_can_banding = 1
+        AND t5.banding_task_class_id = #{dto.bandingTaskClassId}
         <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>
@@ -53,7 +54,7 @@
     <select id="surplusStudent" parameterType="com.xjrsoft.module.banding.dto.StudentDto" 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,
         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,
         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
+        t8.name as second_ambition,t1.is_adjust,t1.status,t1.remarks FROM base_new_student t1
         LEFT JOIN xjr_dictionary_detail t2 ON t1.gender = t2.code AND t2.item_id = 2023000000000000004
         LEFT JOIN xjr_dictionary_detail t2 ON t1.gender = t2.code AND t2.item_id = 2023000000000000004
         LEFT JOIN xjr_dictionary_detail t3 ON t1.stduy_status = t3.code AND t3.item_id = 2023000000000000030
         LEFT JOIN xjr_dictionary_detail t3 ON t1.stduy_status = t3.code AND t3.item_id = 2023000000000000030
         LEFT JOIN enrollment_plan t4 ON t1.enrollment_plan_id = t4.id
         LEFT JOIN enrollment_plan t4 ON t1.enrollment_plan_id = t4.id
@@ -62,6 +63,7 @@
         LEFT JOIN base_major_set t7 ON t1.first_ambition = t7.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
         LEFT JOIN base_major_set t8 ON t1.second_ambition = t8.id
         WHERE t1.delete_mark = 0 AND t5.id = #{dto.bandingTaskId}
         WHERE t1.delete_mark = 0 AND t5.id = #{dto.bandingTaskId}
+        and t1.is_can_banding = 1
         AND (t1.first_ambition_id = #{dto.majorSetId} or t1.second_ambition_id = #{dto.majorSetId})
         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
             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
             INNER JOIN banding_task_class c2 ON c1.banding_task_class_id = c2.id

+ 1 - 0
src/main/resources/mapper/banding/BandingTaskMapper.xml

@@ -9,6 +9,7 @@
         INNER JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
         INNER JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
         WHERE a1.delete_mark = 0 AND a2.delete_mark = 0
         WHERE a1.delete_mark = 0 AND a2.delete_mark = 0
         AND a2.grade_id = t.grade_id AND a2.enroll_type = t.enroll_type
         AND a2.grade_id = t.grade_id AND a2.enroll_type = t.enroll_type
+        and a1.is_can_banding = 1
         ) AS admissions_count,
         ) AS admissions_count,
         (SELECT COUNT(*) FROM banding_task_class_student a1
         (SELECT COUNT(*) FROM banding_task_class_student a1
         INNER JOIN banding_task_class a2 ON a1.banding_task_class_id = a2.id
         INNER JOIN banding_task_class a2 ON a1.banding_task_class_id = a2.id

+ 5 - 4
src/main/resources/mapper/student/BaseNewStudentMapper.xml

@@ -273,14 +273,14 @@
     <select id="getFirstAmbitionStudentCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">
     <select id="getFirstAmbitionStudentCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">
         SELECT t1.first_ambition_id,COUNT(t1.id) FROM base_new_student t1
         SELECT t1.first_ambition_id,COUNT(t1.id) FROM base_new_student t1
         INNER JOIN enrollment_plan t2 ON t1.enrollment_plan_id = t2.id
         INNER JOIN enrollment_plan t2 ON t1.enrollment_plan_id = t2.id
-        WHERE t1.delete_mark = 0 AND t2.grade_id = #{gradeId} AND t2.enroll_type = #{enrollType}
+        WHERE t1.delete_mark = 0 AND t2.grade_id = #{gradeId} AND t2.enroll_type = #{enrollType} and t1.is_can_banding = 1
         GROUP BY t1.first_ambition_id
         GROUP BY t1.first_ambition_id
     </select>
     </select>
 
 
     <select id="getSecondAmbitionStudentCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">
     <select id="getSecondAmbitionStudentCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">
         SELECT t1.second_ambition_id,COUNT(t1.id) FROM base_new_student t1
         SELECT t1.second_ambition_id,COUNT(t1.id) FROM base_new_student t1
         INNER JOIN enrollment_plan t2 ON t1.enrollment_plan_id = t2.id
         INNER JOIN enrollment_plan t2 ON t1.enrollment_plan_id = t2.id
-        WHERE t1.delete_mark = 0 AND t2.grade_id = #{gradeId} AND t2.enroll_type = #{enrollType}
+        WHERE t1.delete_mark = 0 AND t2.grade_id = #{gradeId} AND t2.enroll_type = #{enrollType} and t1.is_can_banding = 1
         GROUP BY t1.second_ambition_id
         GROUP BY t1.second_ambition_id
     </select>
     </select>
     <select id="getMajorStudentCount" resultType="com.xjrsoft.module.banding.vo.IdManyCountVo">
     <select id="getMajorStudentCount" resultType="com.xjrsoft.module.banding.vo.IdManyCountVo">
@@ -288,16 +288,17 @@
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
+        and is_can_banding = 1
         ) AS count,(
         ) AS count,(
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
-        AND gender = 'SB10001'
+        AND gender = 'SB10001' and is_can_banding = 1
         ) AS male_count,(
         ) AS male_count,(
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
-        AND gender = 'SB10002'
+        AND gender = 'SB10002' and is_can_banding = 1
         ) AS female_count FROM base_major_set t1
         ) AS female_count FROM base_major_set t1
         LEFT JOIN banding_task_major_condition t2 ON t1.id = t2.major_set_id AND t2.banding_task_id = #{id}
         LEFT JOIN banding_task_major_condition t2 ON t1.id = t2.major_set_id AND t2.banding_task_id = #{id}
         AND t2.delete_mark = 0
         AND t2.delete_mark = 0