Browse Source

分班调整

dzx 8 months ago
parent
commit
9a3f7256a2

+ 9 - 5
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSchoolRollServiceImpl.java

@@ -3,6 +3,7 @@ package com.xjrsoft.module.student.service.impl;
 import cn.dev33.satoken.stp.StpUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.xjrsoft.common.enums.ArchivesStatusEnum;
@@ -336,11 +337,14 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
                 new QueryWrapper<BaseStudentSchoolRoll>().lambda()
                         .eq(BaseStudentSchoolRoll::getUserId, userId)
         );
-        schoolRoll.setDeleteMark(DeleteMark.DELETED.getCode());
-        schoolRoll.setEnabledMark(EnabledMark.DISABLED.getCode());
-        schoolRoll.setModifyUserId(StpUtil.getLoginIdAsLong());
-        schoolRoll.setModifyDate(LocalDateTime.now());
-        this.updateById(schoolRoll);
+        UpdateWrapper<BaseStudentSchoolRoll> updateRoll = new UpdateWrapper<>();
+        updateRoll.eq("id", schoolRoll.getId());
+        updateRoll.setSql("delete_mark = 1");
+        updateRoll.setSql("enabled_mark = 0");
+        updateRoll.setSql("class_id = null");
+        updateRoll.setSql("modify_user_id = " + StpUtil.getLoginIdAsLong());
+        updateRoll.setSql("modify_date = now()");
+        this.update(schoolRoll, updateRoll);
 
         //将学生基本信息中状态改为正常
         BaseStudent baseStudent = baseStudentMapper.selectOne(

+ 3 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseNewStudentPageVo.java

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

+ 1 - 1
src/main/resources/mapper/student/BaseNewStudentMapper.xml

@@ -7,7 +7,7 @@
         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,t1.source,t5.name as source_cn,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,ifnull(t11.name,t1.delete_reason) AS class_name,t12.name AS teacher_name,
-        t1.paymnystate,t1.userdef6,t1.previous,t1.province,t1.city,t1.myarea,t1.remarks,t1.is_can_banding FROM base_new_student t1
+        t1.paymnystate,t1.userdef6,t1.previous,t1.province,t1.city,t1.myarea,t1.remarks,t1.is_can_banding,t1.operate_mode 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 t3 ON t1.stduy_status = t3.code AND t3.item_id = 2023000000000000030
         LEFT JOIN xjr_dictionary_detail t5 ON t1.source = t5.code AND t5.item_id = 2023000000000000028