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

@@ -12,13 +12,19 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
public class SrsStudentInfoCheck { @TableField(exist = false)
public class SrsStudentInfoCheck {
@TableField(exist = false)
public String tNo;
@NotNull("银行卡")
public String xhk;
/** 主键 ID */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 学号 */
@TableField("stu_no")
private String stuNo;
/** 生日 */
@NotNull("生日")
@@ -74,68 +80,56 @@ public class SrsStudentInfoCheck { @TableField(exist = false)
/**
* 户口所在地区县以下详细地址
*/
private String hkxxdz;
/**
* 学生居住地址
*/
private String xsjzdz;
/**
* 所属派出所
*/
private String sspcs;
/**
* 所属街道
*/
private String ssjd;
/**
* 乘火车区间
*/
private String chcqj;
/**
* 详细联系地址
*/
private String xxlxdz;
/**
* 邮政编码
*/
private String yzbm;
/**
* 现家庭地址
*/
private String xjtdz;
/**
* 家庭邮政编码
*/
private String jtyzbm;
/**
* 家庭电话
*/
private String jtdh;
/**
* 照片
*/
private String dailyPhoto;
/**
@@ -153,4 +147,34 @@ public class SrsStudentInfoCheck { @TableField(exist = false)
*/
private String bluePhoto;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 备注
*/
private String remark;
/**
* 删除标志0 代表存在 1 代表删除)
*/
@TableField("del_flag")
private String delFlag;
}

View File

@@ -0,0 +1,16 @@
package com.srs.comprehensive.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.comprehensive.domain.SrsStudentInfoCheck;
import org.apache.ibatis.annotations.Mapper;
/**
* 学生信息核对 Mapper 接口
*
* @author srs
* @date 2024-03-27
*/
@Mapper
public interface SrsStudentInfoCheckMapper extends BaseMapper<SrsStudentInfoCheck> {
}

View File

@@ -0,0 +1,36 @@
package com.srs.comprehensive.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.srs.comprehensive.domain.SrsStudentInfoCheck;
import com.srs.common.core.domain.AjaxResult;
/**
* 学生信息核对 Service 接口
*
* @author srs
* @date 2024-03-27
*/
public interface ISrsStudentInfoCheckService extends IService<SrsStudentInfoCheck> {
/**
* 查询学生信息
* @param stuNo 学号
* @return 学生信息
*/
SrsStudentInfoCheck getStuInfo(String stuNo);
/**
* 修改学生信息
* @param srsStudentInfoCheck 学生信息
* @return 结果
*/
AjaxResult editStuInfo(SrsStudentInfoCheck srsStudentInfoCheck);
/**
* 查询学生信息列表
* @param srsStudentInfoCheck 学生信息
* @return 学生信息集合
*/
List<SrsStudentInfoCheck> selectSrsStudentInfoCheckList(SrsStudentInfoCheck srsStudentInfoCheck);
}

View File

@@ -0,0 +1,93 @@
package com.srs.comprehensive.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.srs.common.core.domain.AjaxResult;
import com.srs.comprehensive.domain.SrsStudentInfoCheck;
import com.srs.comprehensive.mapper.SrsStudentInfoCheckMapper;
import com.srs.comprehensive.service.ISrsStudentInfoCheckService;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.List;
/**
* 学生信息核对 Service 业务层处理
*
* @author srs
* @date 2024-03-27
*/
@Service
public class SrsStudentInfoCheckServiceImpl extends ServiceImpl<SrsStudentInfoCheckMapper, SrsStudentInfoCheck>
implements ISrsStudentInfoCheckService {
/**
* 查询学生信息
* @param stuNo 学号
* @return 学生信息
*/
@Override
public SrsStudentInfoCheck getStuInfo(String stuNo) {
if (!StringUtils.hasText(stuNo)) {
return null;
}
LambdaQueryWrapper<SrsStudentInfoCheck> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SrsStudentInfoCheck::getStuNo, stuNo);
wrapper.eq(SrsStudentInfoCheck::getDelFlag, "0");
return this.getOne(wrapper);
}
/**
* 修改学生信息
* @param srsStudentInfoCheck 学生信息
* @return 结果
*/
@Override
public AjaxResult editStuInfo(SrsStudentInfoCheck srsStudentInfoCheck) {
try {
// 先查询是否存在
SrsStudentInfoCheck existing = getStuInfo(srsStudentInfoCheck.getStuNo());
if (existing != null) {
// 存在则更新
srsStudentInfoCheck.setId(existing.getId());
this.updateById(srsStudentInfoCheck);
} else {
// 不存在则插入
this.save(srsStudentInfoCheck);
}
return AjaxResult.success("修改成功");
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("修改失败:" + e.getMessage());
}
}
/**
* 查询学生信息列表
* @param srsStudentInfoCheck 学生信息
* @return 学生信息集合
*/
@Override
public List<SrsStudentInfoCheck> selectSrsStudentInfoCheckList(SrsStudentInfoCheck srsStudentInfoCheck) {
LambdaQueryWrapper<SrsStudentInfoCheck> wrapper = new LambdaQueryWrapper<>();
// 动态查询条件
if (StringUtils.hasText(srsStudentInfoCheck.getStuNo())) {
wrapper.eq(SrsStudentInfoCheck::getStuNo, srsStudentInfoCheck.getStuNo());
}
if (StringUtils.hasText(srsStudentInfoCheck.getMz())) {
wrapper.eq(SrsStudentInfoCheck::getMz, srsStudentInfoCheck.getMz());
}
if (StringUtils.hasText(srsStudentInfoCheck.getZzmm())) {
wrapper.eq(SrsStudentInfoCheck::getZzmm, srsStudentInfoCheck.getZzmm());
}
wrapper.eq(SrsStudentInfoCheck::getDelFlag, "0");
return this.list(wrapper);
}
}

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.srs.comprehensive.mapper.SrsStudentInfoCheckMapper">
<resultMap type="SrsStudentInfoCheck" id="SrsStudentInfoCheckResult">
<result property="id" column="id" />
<result property="stuNo" column="stu_no" />
<result property="birthday" column="birthday" />
<result property="idCard" column="id_card" />
<result property="phone" column="phone" />
<result property="mz" column="mz" />
<result property="zzmm" column="zzmm" />
<result property="hksz1" column="hksz1" />
<result property="hksz2" column="hksz2" />
<result property="hksz3" column="hksz3" />
<result property="hkszd" column="hkszd" />
<result property="hkxz" column="hkxz" />
<result property="hkxxdz" column="hkxxdz" />
<result property="xsjzdz" column="xsjzdz" />
<result property="sspcs" column="sspcs" />
<result property="ssjd" column="ssjd" />
<result property="chcqj" column="chcqj" />
<result property="xxlxdz" column="xxlxdz" />
<result property="yzbm" column="yzbm" />
<result property="xjtdz" column="xjtdz" />
<result property="jtyzbm" column="jtyzbm" />
<result property="jtdh" column="jtdh" />
<result property="dailyPhoto" column="daily_photo" />
<result property="whitePhoto" column="white_photo" />
<result property="redPhoto" column="red_photo" />
<result property="bluePhoto" column="blue_photo" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="delFlag" column="del_flag" />
</resultMap>
</mapper>