Bladeren bron

新生修改分班状态

dzx 9 maanden geleden
bovenliggende
commit
70a496af62

+ 20 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseNewStudentController.java

@@ -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));
+    }
+
 }

+ 24 - 0
src/main/java/com/xjrsoft/module/student/dto/AddBaseNewStudentDto.java

@@ -106,4 +106,28 @@ public class AddBaseNewStudentDto implements Serializable {
 
     @ApiModelProperty("家庭地址")
     private String familyAddress;
+
+    @ApiModelProperty("缴费状态(已缴费、未缴费)")
+    private String paymnystate;
+
+    @ApiModelProperty("招生季(1春招、2秋招)")
+    private Integer userdef6;
+
+    @ApiModelProperty("应届生、往届生")
+    private String previous;
+
+    @ApiModelProperty("户籍所属省")
+    private String province;
+
+    @ApiModelProperty("户籍所属市")
+    private String city;
+
+    @ApiModelProperty("户籍所属区")
+    private String myarea;
+
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("是否可以分班(0:否,1:是)")
+    private Integer isCanBanding;
 }

+ 28 - 0
src/main/java/com/xjrsoft/module/student/dto/ChangeBandingStatusDto.java

@@ -0,0 +1,28 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+* @title: 新生维护信息
+* @Author dzx
+* @Date: 2024-06-27
+* @Version 1.0
+*/
+@Data
+public class ChangeBandingStatusDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("主键id")
+    private Long id;
+
+    @ApiModelProperty("备注")
+    private String remarks;
+
+    @ApiModelProperty("是否可以分班(0:否,1:是)")
+    private Integer isCanBanding;
+}