feat(comprehensive): 新增学生信息核对功能模块

- 在 SrsStudentInfoCheck 实体类中添加主键ID、学号字段及基础信息字段
- 添加创建者、创建时间、更新者、更新时间、备注和删除标志等审计字段
- 创建 ISrsStudentInfoCheckService 接口定义学生信息查询和编辑方法
- 实现 SrsStudentInfoCheckServiceImpl 服务类提供学生信息业务逻辑处理
- 开发 SrsStudentInfoCheckController 控制器提供 REST API 接口
- 创建 SrsStudentInfoCheckMapper 数据访问接口和对应的 XML 映射文件
- 实现学生信息的增删改查、列表查询和 Excel 导出功能
- 添加权限控制和操作日志记录功能
This commit is contained in:
LWH
2026-04-01 17:37:59 +08:00
parent 6e4c089625
commit 4db1272d0a
6 changed files with 314 additions and 14 deletions

View File

@@ -0,0 +1,89 @@
package com.srs.web.controller.comprehensive;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import org.springframework.security.access.prepost.PreAuthorize;
import com.srs.comprehensive.domain.SrsStudentInfoCheck;
import com.srs.comprehensive.service.ISrsStudentInfoCheckService;
import com.srs.common.core.controller.BaseController;
import com.srs.common.core.domain.AjaxResult;
import com.srs.common.enums.BusinessType;
import com.srs.common.annotation.Log;
import com.srs.common.core.page.TableDataInfo;
import com.srs.common.utils.poi.ExcelUtil;
/**
* 学生信息核对 Controller
*
* @author srs
* @date 2024-03-27
*/
@RestController
@RequestMapping("/comprehensive/studentInfo")
@Api(value = "学生信息核对管理", tags = "学生信息核对")
public class SrsStudentInfoCheckController extends BaseController {
@Autowired
private ISrsStudentInfoCheckService srsStudentInfoCheckService;
/**
* 查询学生自己的信息
*/
@GetMapping("/getOwnInfo")
@ApiOperation("查询学生自己的信息")
public AjaxResult getOwnInfo() {
SrsStudentInfoCheck info = srsStudentInfoCheckService.getStuInfo(getUsername());
return AjaxResult.success(info);
}
/**
* 根据学号查询学生信息(辅导员专用)
*/
@GetMapping("/getStuInfoByStuNo")
@ApiOperation("根据学号查询学生信息")
public AjaxResult getStuInfoByStuNo(@RequestParam String stuNo) {
SrsStudentInfoCheck info = srsStudentInfoCheckService.getStuInfo(stuNo);
return AjaxResult.success(info);
}
/**
* 修改学生自己的信息
*/
@PostMapping("/editOwnInfo")
@ApiOperation("修改学生自己的信息")
public AjaxResult editOwnInfo(@RequestBody SrsStudentInfoCheck param) {
if (param.getStuNo() == null || "".equals(param.getStuNo())) {
param.setStuNo(getUsername());
}
return srsStudentInfoCheckService.editStuInfo(param);
}
/**
* 查询学生信息列表(管理端使用)
*/
@PreAuthorize("@ss.hasPermi('comprehensive:studentInfo:list')")
@GetMapping("/list")
@ApiOperation("查询学生信息列表")
public TableDataInfo list(SrsStudentInfoCheck srsStudentInfoCheck) {
startPage();
List<SrsStudentInfoCheck> list = srsStudentInfoCheckService.selectSrsStudentInfoCheckList(srsStudentInfoCheck);
return getDataTable(list);
}
/**
* 导出学生信息列表(管理端使用)
*/
@PreAuthorize("@ss.hasPermi('comprehensive:studentInfo:export')")
@Log(title = "学生信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ApiOperation("导出学生信息列表")
public void export(HttpServletResponse response, SrsStudentInfoCheck srsStudentInfoCheck) {
List<SrsStudentInfoCheck> list = srsStudentInfoCheckService.selectSrsStudentInfoCheckList(srsStudentInfoCheck);
ExcelUtil<SrsStudentInfoCheck> util = new ExcelUtil<SrsStudentInfoCheck>(SrsStudentInfoCheck.class);
util.exportExcel(response, list, "学生信息数据");
}
}