|
|
@@ -9,6 +9,7 @@ import com.alibaba.excel.EasyExcel;
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum;
|
|
|
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.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.xjrsoft.common.constant.GlobalConstant;
|
|
|
@@ -29,9 +30,11 @@ import com.xjrsoft.module.organization.entity.User;
|
|
|
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.room.entity.RoomBed;
|
|
|
import com.xjrsoft.module.student.dto.ActiveAccountDto;
|
|
|
import com.xjrsoft.module.student.dto.AddBaseNewStudentDto;
|
|
|
import com.xjrsoft.module.student.dto.BaseNewStudentPageDto;
|
|
|
+import com.xjrsoft.module.student.dto.ChangeBandingStatusDto;
|
|
|
import com.xjrsoft.module.student.dto.DeleteNewStudentDto;
|
|
|
import com.xjrsoft.module.student.dto.UpdateBaseNewStudentDto;
|
|
|
import com.xjrsoft.module.student.entity.BaseNewStudent;
|
|
|
@@ -403,4 +406,21 @@ public class BaseNewStudentController {
|
|
|
return RT.fileStream(bot.toByteArray(), "RoomBed" + ExcelTypeEnum.XLSX.getValue());
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/change-banding-status")
|
|
|
+ @ApiOperation(value = "修改分班状态")
|
|
|
+ @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");
|
|
|
+ }
|
|
|
+ return RT.ok(baseNewStudentService.update(newStudent, updateWrapper));
|
|
|
+ }
|
|
|
+
|
|
|
}
|