Compare commits

...

2 Commits

28 changed files with 635 additions and 45 deletions

View File

@@ -1,5 +1,7 @@
package com.srs.dormitory.domain.Vo;
import com.srs.common.annotation.Sensitive;
import com.srs.common.enums.DesensitizedType;
import com.srs.dormitory.domain.SrsDormitoryStudent;
import lombok.Data;
@@ -29,6 +31,7 @@ public class SrsDormitoryStudentVo extends SrsDormitoryStudent
public String stuGender;
public String roomGender;
public String deptName;
@Sensitive(desensitizedType = DesensitizedType.PHONE)
public String phone;
public String teacherName;

View File

@@ -152,7 +152,12 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-cas</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.20</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,23 @@
package com.srs.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.srs.common.config.serializer.SensitiveJsonSerializer;
import com.srs.common.enums.DesensitizedType;
/**
* 数据脱敏注解
*
* @author ruoyi
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@JacksonAnnotationsInside
@JsonSerialize(using = SensitiveJsonSerializer.class)
public @interface Sensitive
{
DesensitizedType desensitizedType();
}

View File

@@ -0,0 +1,68 @@
package com.srs.common.config.serializer;
import java.io.IOException;
import java.util.Objects;
import cn.hutool.core.util.DesensitizedUtil;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.BeanProperty;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.ContextualSerializer;
import com.srs.common.core.domain.model.LoginUser;
import com.srs.common.annotation.Sensitive;
import com.srs.common.enums.DesensitizedType;
import com.srs.common.core.domain.model.LoginUser;
import com.srs.common.utils.SecurityUtils;
/**
* 数据脱敏序列化过滤
*
* @author ruoyi
*/
public class SensitiveJsonSerializer extends JsonSerializer<String> implements ContextualSerializer
{
private DesensitizedType desensitizedType;
@Override
public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException
{
if (desensitization())
{
gen.writeString(desensitizedType.desensitizer().apply(value));
}
else
{
gen.writeString(value);
}
}
@Override
public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property)
throws JsonMappingException
{
Sensitive annotation = property.getAnnotation(Sensitive.class);
if (Objects.nonNull(annotation) && Objects.equals(String.class, property.getType().getRawClass()))
{
this.desensitizedType = annotation.desensitizedType();
return this;
}
return prov.findValueSerializer(property.getType(), property);
}
/**
* 是否需要脱敏处理
*/
private boolean desensitization()
{
try
{
LoginUser securityUser = SecurityUtils.getLoginUser();
// 管理员不脱敏
return !securityUser.getUser().isAdmin();
}
catch (Exception e)
{
return true;
}
}
}

View File

@@ -0,0 +1,59 @@
package com.srs.common.enums;
import java.util.function.Function;
import cn.hutool.core.util.DesensitizedUtil;
/**
* 脱敏类型
*
* @author ruoyi
*/
public enum DesensitizedType
{
/**
* 姓名第2位星号替换
*/
USERNAME(s -> s.replaceAll("(\\S)\\S(\\S*)", "$1*$2")),
/**
* 密码,全部字符都用*代替
*/
PASSWORD(DesensitizedUtil::password),
/**
* 身份证中间10位星号替换
*/
ID_CARD(s -> s.replaceAll("(\\d{4})\\d{10}(\\d{3}[Xx]|\\d{4})", "$1** **** ****$2")),
/**
* 手机号中间4位星号替换
*/
PHONE(s -> s.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2")),
/**
* 电子邮箱,仅显示第一个字母和@后面的地址显示,其他星号替换
*/
EMAIL(s -> s.replaceAll("(^.)[^@]*(@.*$)", "$1****$2")),
/**
* 银行卡号保留最后4位其他星号替换
*/
BANK_CARD(s -> s.replaceAll("\\d{15}(\\d{3})", "**** **** **** **** $1")),
/**
* 车牌号码,包含普通车辆、新能源车辆
*/
CAR_LICENSE(DesensitizedUtil::carLicense);
private final Function<String, String> desensitizer;
DesensitizedType(Function<String, String> desensitizer)
{
this.desensitizer = desensitizer;
}
public Function<String, String> desensitizer()
{
return desensitizer;
}
}

View File

@@ -0,0 +1,49 @@
package com.srs.common.utils;
/**
* 脱敏工具类
*
* @author srs
*/
public class DesensitizedUtil
{
/**
* 密码的全部字符都用*代替,比如:******
*
* @param password 密码
* @return 脱敏后的密码
*/
public static String password(String password)
{
if (StringUtils.isBlank(password))
{
return StringUtils.EMPTY;
}
return StringUtils.repeat('*', password.length());
}
/**
* 车牌中间用*代替,如果是错误的车牌,不处理
*
* @param carLicense 完整的车牌号
* @return 脱敏后的车牌
*/
public static String carLicense(String carLicense)
{
if (StringUtils.isBlank(carLicense))
{
return StringUtils.EMPTY;
}
// 普通车牌
if (carLicense.length() == 7)
{
carLicense = StringUtils.hide(carLicense, 3, 6);
}
else if (carLicense.length() == 8)
{
// 新能源车牌
carLicense = StringUtils.hide(carLicense, 3, 7);
}
return carLicense;
}
}

View File

@@ -13,7 +13,7 @@ import com.srs.common.core.text.StrFormatter;
/**
* 字符串工具类
*
* @author srs
* @author ruoyi
*/
public class StringUtils extends org.apache.commons.lang3.StringUtils
{
@@ -23,6 +23,9 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
/** 下划线 */
private static final char SEPARATOR = '_';
/** 星号 */
private static final char ASTERISK = '*';
/**
* 获取参数不为空值
*
@@ -163,6 +166,49 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
return (str == null ? "" : str.trim());
}
/**
* 替换指定字符串的指定区间内字符为"*"
*
* @param str 字符串
* @param startInclude 开始位置(包含)
* @param endExclude 结束位置(不包含)
* @return 替换后的字符串
*/
public static String hide(CharSequence str, int startInclude, int endExclude)
{
if (isEmpty(str))
{
return NULLSTR;
}
final int strLength = str.length();
if (startInclude > strLength)
{
return NULLSTR;
}
if (endExclude > strLength)
{
endExclude = strLength;
}
if (startInclude > endExclude)
{
// 如果起始位置大于结束位置,不替换
return NULLSTR;
}
final char[] chars = new char[strLength];
for (int i = 0; i < strLength; i++)
{
if (i >= startInclude && i < endExclude)
{
chars[i] = ASTERISK;
}
else
{
chars[i] = str.charAt(i);
}
}
return new String(chars);
}
/**
* 截取字符串
*
@@ -240,6 +286,56 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
return str.substring(start, end);
}
/**
* 在字符串中查找第一个出现的 `open` 和最后一个出现的 `close` 之间的子字符串
*
* @param str 要截取的字符串
* @param open 起始字符串
* @param close 结束字符串
* @return 截取结果
*/
public static String substringBetweenLast(final String str, final String open, final String close)
{
if (isEmpty(str) || isEmpty(open) || isEmpty(close))
{
return NULLSTR;
}
final int start = str.indexOf(open);
if (start != INDEX_NOT_FOUND)
{
final int end = str.lastIndexOf(close);
if (end != INDEX_NOT_FOUND)
{
return str.substring(start + open.length(), end);
}
}
return NULLSTR;
}
/**
* 判断是否为空,并且不是空白字符
*
* @param str 要判断的value
* @return 结果
*/
public static boolean hasText(String str)
{
return (str != null && !str.isEmpty() && containsText(str));
}
private static boolean containsText(CharSequence str)
{
int strLen = str.length();
for (int i = 0; i < strLen; i++)
{
if (!Character.isWhitespace(str.charAt(i)))
{
return true;
}
}
return false;
}
/**
* 格式化文本, {} 表示占位符<br>
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
@@ -285,6 +381,18 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
return new HashSet<String>(str2List(str, sep, true, false));
}
/**
* 字符串转list
*
* @param str 字符串
* @param sep 分隔符
* @return list集合
*/
public static final List<String> str2List(String str, String sep)
{
return str2List(str, sep, true, false);
}
/**
* 字符串转list
*
@@ -325,9 +433,9 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
}
/**
* 判断给定的set列表中是否包含数组array 判断给定的数组array中是否包含给定的元素value
* 判断给定的collection列表中是否包含数组array 判断给定的数组array中是否包含给定的元素value
*
* @param set 给定的集合
* @param collection 给定的集合
* @param array 给定的数组
* @return boolean 结果
*/

View File

@@ -2,6 +2,8 @@ package com.srs.comprehensive.domain;
import com.srs.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import com.srs.common.annotation.Sensitive;
import com.srs.common.enums.DesensitizedType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
@@ -70,6 +72,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("联系电话")
@TableField("contact_number")
@Excel(name = "联系电话")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
private String contactNumber;
/**

View File

@@ -143,6 +143,16 @@ public class RtStuDisqualification extends BaseEntity {
@Excel(name = "籍贯")
private String jg;
/**
* 政治面貌
*/
@ApiModelProperty("政治面貌")
@TableField("political_status")
@Excel(name = "政治面貌")
private String politicalStatus;
/**
* 市/县
*/

View File

@@ -148,6 +148,14 @@ private static final long serialVersionUID=1L;
@Excel(name = "籍贯")
private String jg;
/**
* 政治面貌
*/
@ApiModelProperty("政治面貌")
@TableField("political_status")
@Excel(name = "政治面貌")
private String politicalStatus;
/**
* 市/县
*/

View File

@@ -147,6 +147,14 @@ public class RtStuQuitSchool extends BaseEntity {
@Excel(name = "籍贯")
private String jg;
/**
* 政治面貌
*/
@ApiModelProperty("政治面貌")
@TableField("political_status")
@Excel(name = "政治面貌")
private String politicalStatus;
/**
* 市/县
*/

View File

@@ -139,6 +139,14 @@ public class RtStuReentrySchool extends BaseEntity {
@Excel(name = "籍贯")
private String jg;
/**
* 政治面貌
*/
@ApiModelProperty("政治面貌")
@TableField("political_status")
@Excel(name = "政治面貌")
private String politicalStatus;
/**
* 市/县
*/

View File

@@ -1,5 +1,7 @@
package com.srs.routine.domain.vo;
import com.srs.common.annotation.Sensitive;
import com.srs.common.enums.DesensitizedType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -35,12 +37,14 @@ public class StuLeaveApplicationDetailsVo implements Serializable {
private String className;
@ApiModelProperty("联系电话")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
private String phoneNumber;
@ApiModelProperty("父亲姓名")
private String fatherName;
@ApiModelProperty("父亲联系电话")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
private String fatherRelation;
@ApiModelProperty("请假事由")

View File

@@ -68,6 +68,7 @@ public interface NotificationManagementMapper extends BaseMapper<NotificationMan
List<SrsGrade> selectGradeList();
/**
*
* 根据年级ID列表查询学生用户ID
*
* @param gradeIds 年级ID列表

View File

@@ -214,7 +214,6 @@ public class NotificationManagementServiceImpl extends ServiceImpl<NotificationM
return i;
}
}
return result;
}
@@ -246,6 +245,7 @@ public class NotificationManagementServiceImpl extends ServiceImpl<NotificationM
String toUser = String.join("|", batch);
// 调用企业微信发送消息方法
weChatUtil.sendTextMessage(toUser, content);
}
}

View File

@@ -7,10 +7,12 @@ import com.srs.common.core.domain.entity.SysUser;
import com.srs.common.doman.dto.ProcessResultDto;
import com.srs.common.utils.DateUtils;
import com.srs.common.utils.SecurityUtils;
import com.srs.common.utils.WeChatUtil;
import com.srs.flowable.service.IFlowDefinitionService;
import com.srs.routine.domain.RtStuDisqualification;
import com.srs.routine.mapper.RtStuDisqualificationMapper;
import com.srs.routine.service.IRtStuDisqualificationService;
import com.srs.system.mapper.SysUserMapper;
import com.srs.system.service.ISysUserService;
import org.flowable.engine.IdentityService;
import org.flowable.engine.TaskService;
@@ -21,6 +23,7 @@ import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 给予学生退学申请Service业务层处理
@@ -36,6 +39,12 @@ public class RtStuDisqualificationServiceImpl extends ServiceImpl<RtStuDisqualif
@Autowired
private ISysUserService sysUserService;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
public WeChatUtil weChatUtil;
/**
* 查询给予学生退学申请
*
@@ -193,12 +202,52 @@ public class RtStuDisqualificationServiceImpl extends ServiceImpl<RtStuDisqualif
.list();
// 保存审核结果到任务变量中
variables.put("approved", true);
// 标记是否有任务被完成
boolean taskCompleted = false;
// 完成待办任务列表
for (Task task : tasks) {
String taskId = task.getId();
String disqualificationId = taskService.getVariable(taskId, "disqualificationId").toString();
if (disqualificationId.equals(rtStuDisqualification.getDisqualificationId().toString())) {
taskService.complete(task.getId(), variables);
taskCompleted = true;
}
}
// 所有相关任务完成后,发送企业微信消息
if (taskCompleted) {
try {
// 获取申请人信息
String applicantName = rtStuDisqualification.getStuName();
String politicalStatus = rtStuDisqualification.getPoliticalStatus();
SysUser sysUser = new SysUser();
sysUser.setRoleId(118L);
List<SysUser> sysUsers = sysUserMapper.selectAllocatedList(sysUser);
// 提取二级学院的书记的账号
List<String> userNames = sysUsers.stream()
.map(SysUser::getUserName)
.collect(Collectors.toList());
// 只有政治面貌是团员时才发送企业微信消息
if ("团员".equals(politicalStatus)) {
// 消息内容
String messageContent = "【给予学生退学】" + applicantName + "的给予学生退学申请已通过审核。";
int batchSize = 10;
for (int i = 0; i < userNames.size(); i += batchSize) {
List<String> batch = userNames.subList(i, Math.min(i + batchSize, userNames.size()));
// 拼接成"user1|user2|user3"格式
String toUser = String.join("|", batch);
// 调用企业微信发送消息方法
weChatUtil.sendTextMessage(toUser, messageContent);
}
}
} catch (Exception e) {
log.error("发送企业微信消息失败:", e);
}
}

View File

@@ -3,14 +3,19 @@ package com.srs.routine.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.srs.common.core.domain.AjaxResult;
import com.srs.common.core.domain.entity.SysUser;
import com.srs.common.doman.dto.ProcessResultDto;
import com.srs.common.utils.DateUtils;
import com.srs.common.utils.SecurityUtils;
import com.srs.common.utils.WeChatUtil;
import com.srs.flowable.domain.StuDropOutSchool;
import com.srs.flowable.service.IFlowDefinitionService;
import com.srs.routine.domain.RtStuQuitSchool;
import com.srs.system.mapper.SysUserMapper;
import org.flowable.engine.IdentityService;
import org.flowable.engine.TaskService;
import org.flowable.task.api.Task;
@@ -32,6 +37,11 @@ import org.springframework.transaction.annotation.Transactional;
public class RtStuDropOutSchoolServiceImpl extends ServiceImpl<RtStuDropOutSchoolMapper, RtStuDropOutSchool> implements IRtStuDropOutSchoolService {
@Autowired
private RtStuDropOutSchoolMapper rtStuDropOutSchoolMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
public WeChatUtil weChatUtil;
/**
* 查询学生退学申请记录
@@ -60,7 +70,7 @@ public class RtStuDropOutSchoolServiceImpl extends ServiceImpl<RtStuDropOutSchoo
*
* @param rtStuDropOutSchool 学生退学申请记录
* @return 结果
*/
* */
@Override
@Transactional(rollbackFor = Exception.class)
public int insertRtStuDropOutSchool(RtStuDropOutSchool rtStuDropOutSchool) {
@@ -160,12 +170,50 @@ public class RtStuDropOutSchoolServiceImpl extends ServiceImpl<RtStuDropOutSchoo
.list();
// 保存审核结果到任务变量中
variables.put("approved", true);
// 标记是否有任务被完成
boolean taskCompleted = false;
// 完成待办任务列表
for (Task task : tasks) {
String taskId = task.getId();
String dropOutSchoolId = taskService.getVariable(taskId, "dropOutSchoolId").toString();
if (dropOutSchoolId.equals(rtStuDropOutSchool.getDropOutSchoolId().toString())) {
taskService.complete(task.getId(), variables);
taskCompleted = true;
}
}
// 所有相关任务完成后,发送企业微信消息
if (taskCompleted) {
try {
// 获取申请人信息
String applicantName = rtStuDropOutSchool.getStuName();
String politicalStatus = rtStuDropOutSchool.getPoliticalStatus();
SysUser sysUser = new SysUser();
sysUser.setRoleId(118L);
List<SysUser> sysUsers = sysUserMapper.selectAllocatedList(sysUser);
// 提取二级学院的书记的账号
List<String> userNames = sysUsers.stream()
.map(SysUser::getUserName)
.collect(Collectors.toList());
// 只有政治面貌是团员时才发送企业微信消息
if ("团员".equals(politicalStatus)) {
// 消息内容
String messageContent = "【退学申请】" + applicantName + "的退学申请已通过审核。";
int batchSize = 10;
for (int i = 0; i < userNames.size(); i += batchSize) {
List<String> batch = userNames.subList(i, Math.min(i + batchSize, userNames.size()));
// 拼接成"user1|user2|user3"格式
String toUser = String.join("|", batch);
// 调用企业微信发送消息方法
weChatUtil.sendTextMessage(toUser, messageContent);
}
}
} catch (Exception e) {
log.error("发送企业微信消息失败:", e);
}
}

View File

@@ -22,6 +22,9 @@ public class RtStuMultiLevelReviewServiceImpl extends ServiceImpl<RtStuMultiLeve
@Autowired
private RtStuMultiLevelReviewMapper rtStuMultiLevelReviewMapper;
@Autowired
public WeChatUtil weChatUtil;
/**
* 查询审核信息
*
@@ -116,8 +119,9 @@ public class RtStuMultiLevelReviewServiceImpl extends ServiceImpl<RtStuMultiLeve
if (messageContent == null || messageContent.trim().isEmpty()) {
messageContent = "你申请办理的学生证制作完成长堽校区前往xxx领取里建校区前往xxx领取";
}
WeChatUtil weChatUtil = new WeChatUtil();
weChatUtil.sendTextMessage(rtStuMultiLevelReview.getStuNo(), messageContent);
}
return result;
}

View File

@@ -3,13 +3,17 @@ package com.srs.routine.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.srs.common.core.domain.AjaxResult;
import com.srs.common.core.domain.entity.SysUser;
import com.srs.common.doman.dto.ProcessResultDto;
import com.srs.common.utils.DateUtils;
import com.srs.common.utils.SecurityUtils;
import com.srs.common.utils.WeChatUtil;
import com.srs.flowable.service.IFlowDefinitionService;
import com.srs.system.mapper.SysUserMapper;
import org.flowable.engine.IdentityService;
import org.flowable.engine.TaskService;
import org.flowable.task.api.Task;
@@ -31,6 +35,10 @@ import org.springframework.transaction.annotation.Transactional;
public class RtStuQuitSchoolServiceImpl extends ServiceImpl<RtStuQuitSchoolMapper, RtStuQuitSchool> implements IRtStuQuitSchoolService {
@Autowired
private RtStuQuitSchoolMapper rtStuQuitSchoolMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
public WeChatUtil weChatUtil;
/**
* 查询休学申请记录
@@ -124,19 +132,58 @@ public class RtStuQuitSchoolServiceImpl extends ServiceImpl<RtStuQuitSchoolMappe
.list();
// 保存审核结果到任务变量中
variables.put("approved", true);
// 标记是否有任务被完成
boolean taskCompleted = false;
// 完成待办任务列表
for (Task task : tasks) {
String taskId = task.getId();
String quitSchoolId = taskService.getVariable(taskId, "quitSchoolId").toString();
if (quitSchoolId.equals(rtStuQuitSchool.getQuitSchoolId().toString())) {
taskService.complete(task.getId(), variables);
taskCompleted = true;
}
}
// 所有相关任务完成后,发送企业微信消息
if (taskCompleted) {
try {
// 获取申请人信息
String applicantName = rtStuQuitSchool.getStuName();
String politicalStatus = rtStuQuitSchool.getPoliticalStatus();
SysUser sysUser = new SysUser();
sysUser.setRoleId(118L);
List<SysUser> sysUsers = sysUserMapper.selectAllocatedList(sysUser);
// 提取二级学院的书记的账号
List<String> userNames = sysUsers.stream()
.map(SysUser::getUserName)
.collect(Collectors.toList());
// 只有政治面貌是团员时才发送企业微信消息
if ("团员".equals(politicalStatus)) {
// 消息内容
String messageContent = "【休学申请】" + applicantName + "的休学申请已通过审核。";
int batchSize = 10;
for (int i = 0; i < userNames.size(); i += batchSize) {
List<String> batch = userNames.subList(i, Math.min(i + batchSize, userNames.size()));
// 拼接成"user1|user2|user3"格式
String toUser = String.join("|", batch);
// 调用企业微信发送消息方法
weChatUtil.sendTextMessage(toUser, messageContent);
}
}
} catch (Exception e) {
log.error("发送企业微信消息失败:", e);
}
}
return dto;
} else {
return null;
}
}
/**

View File

@@ -3,13 +3,16 @@ package com.srs.routine.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.common.core.domain.entity.SysUser;
import com.srs.common.doman.dto.ProcessResultDto;
import com.srs.common.utils.DateUtils;
import com.srs.common.utils.SecurityUtils;
import com.srs.common.utils.WeChatUtil;
import com.srs.flowable.service.IFlowDefinitionService;
import com.srs.routine.domain.RtStuReentrySchool;
import com.srs.routine.mapper.RtStuReentrySchoolMapper;
import com.srs.routine.service.IRtStuReentrySchoolService;
import com.srs.system.mapper.SysUserMapper;
import org.flowable.engine.IdentityService;
import org.flowable.engine.TaskService;
import org.flowable.task.api.Task;
@@ -19,6 +22,7 @@ import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 复学申请记录Service业务层处理
@@ -31,6 +35,12 @@ public class RtStuReentrySchoolServiceImpl extends ServiceImpl<RtStuReentrySchoo
@Autowired
private RtStuReentrySchoolMapper rtStuReentrySchoolMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
public WeChatUtil weChatUtil;
/**
* 查询复学申请记录
*
@@ -158,6 +168,7 @@ public class RtStuReentrySchoolServiceImpl extends ServiceImpl<RtStuReentrySchoo
@Autowired
IdentityService identityService;
private ProcessResultDto startReentrySchoolProcess(RtStuReentrySchool rtStuReentrySchool) {
Map<String, Object> variables = new HashMap<>();
variables.put("reentryId", rtStuReentrySchool.getReentryId().toString());
@@ -185,12 +196,47 @@ public class RtStuReentrySchoolServiceImpl extends ServiceImpl<RtStuReentrySchoo
.list();
// 保存审核结果到任务变量中
variables.put("approved", true);
// 标记是否有任务被完成
boolean taskCompleted = false;
// 完成待办任务列表
for (Task task : tasks) {
String taskId = task.getId();
String reentryId = taskService.getVariable(taskId, "reentryId").toString();
if (reentryId.equals(rtStuReentrySchool.getReentryId().toString())) {
taskService.complete(task.getId(), variables);
taskCompleted = true;
}
}
// 所有相关任务完成后,发送企业微信消息
if (taskCompleted) {
try {
// 获取申请人信息
String applicantName = rtStuReentrySchool.getStuName();
String politicalStatus = rtStuReentrySchool.getPoliticalStatus();
SysUser sysUser = new SysUser();
sysUser.setRoleId(118L);
List<SysUser> sysUsers = sysUserMapper.selectAllocatedList(sysUser);
// 提取二级学院的书记的账号
List<String> userNames = sysUsers.stream()
.map(SysUser::getUserName)
.collect(Collectors.toList());
// 只有政治面貌是团员时才发送企业微信消息
if ("团员".equals(politicalStatus)) {
// 消息内容
String messageContent = "【复学申请】" + applicantName + "的复学申请已通过审核。";
int batchSize = 10;
for (int i = 0; i < userNames.size(); i += batchSize) {
List<String> batch = userNames.subList(i, Math.min(i + batchSize, userNames.size()));
// 拼接成"user1|user2|user3"格式
String toUser = String.join("|", batch);
// 调用企业微信发送消息方法
weChatUtil.sendTextMessage(toUser, messageContent);
}
}
} catch (Exception e) {
log.error("发送企业微信消息失败:", e);
}
}

View File

@@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="parentPhone" column="parent_phone" />
<result property="parentName" column="parent_name" />
<result property="jg" column="jg" />
<result property="politicalStatus" column="political_status" />
<result property="hksz2" column="hksz2" />
<result property="attachmentUpload" column="attachment_upload" />
<result property="reasonApplying" column="reason_applying" />
@@ -44,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectRtStuDisqualificationVo">
select disqualification_id, applicant_name, stu_no, stu_name, stu_id, gender, department_Name, grade_name, class_name, mz,
birthday, parent_phone, parent_name, jg, hksz2, attachment_upload, reason_applying, apply_signature, apply_status, submission_status,
birthday, parent_phone, parent_name, jg,political_status,hksz2, attachment_upload, reason_applying, apply_signature, apply_status, submission_status,
drop_out_type, process_instance_id, deploy_id, create_by, create_time, update_by, update_time, remark, ideological_education,
instruction_school_hours, ihandling_suggestion, reentry_year, reentry_number, disqualificatio_type ,applicant_id from rt_stu_disqualification
</sql>
@@ -65,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
<if test="parentName != null and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
<if test="jg != null and jg != ''"> and jg = #{jg}</if>
<if test="politicalStatus != null and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
<if test="hksz2 != null and hksz2 != ''"> and hksz2 = #{hksz2}</if>
<if test="attachmentUpload != null and attachmentUpload != ''"> and attachment_upload = #{attachmentUpload}</if>
<if test="reasonApplying != null and reasonApplying != ''"> and reason_applying = #{reasonApplying}</if>
@@ -106,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.parent_phone,
a.parent_name,
a.jg,
a.political_status,
a.hksz2,
a.attachment_upload,
a.reason_applying,
@@ -162,6 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">parent_phone,</if>
<if test="parentName != null">parent_name,</if>
<if test="jg != null">jg,</if>
<if test="politicalStatus != null">political_status,</if>
<if test="hksz2 != null">hksz2,</if>
<if test="attachmentUpload != null">attachment_upload,</if>
<if test="reasonApplying != null">reason_applying,</if>
@@ -198,6 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">#{parentPhone},</if>
<if test="parentName != null">#{parentName},</if>
<if test="jg != null">#{jg},</if>
<if test="politicalStatus != null">#{politicalStatus},</if>
<if test="hksz2 != null">#{hksz2},</if>
<if test="attachmentUpload != null">#{attachmentUpload},</if>
<if test="reasonApplying != null">#{reasonApplying},</if>
@@ -238,6 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">parent_phone = #{parentPhone},</if>
<if test="parentName != null">parent_name = #{parentName},</if>
<if test="jg != null">jg = #{jg},</if>
<if test="politicalStatus != null">political_status = #{politicalStatus},</if>
<if test="hksz2 != null">hksz2 = #{hksz2},</if>
<if test="attachmentUpload != null">attachment_upload = #{attachmentUpload},</if>
<if test="reasonApplying != null">reason_applying = #{reasonApplying},</if>

View File

@@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="parentPhone" column="parent_phone" />
<result property="parentName" column="parent_name" />
<result property="jg" column="jg" />
<result property="politicalStatus" column="political_status" />
<result property="hksz2" column="hksz2" />
<result property="attachmentUpload" column="attachment_upload" />
<result property="reasonApplying" column="reason_applying" />
@@ -45,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectRtStuDropOutSchoolVo">
select drop_out_school_id, applicant_id, applicant_name, stu_no, stu_name, stu_id, gender, department_Name, grade_name,
class_name, mz, birthday, parent_phone, parent_name, jg, hksz2, attachment_upload, reason_applying, apply_signature,
class_name, mz, birthday, parent_phone, parent_name,jg,political_status,hksz2, attachment_upload, reason_applying, apply_signature,
ideological_education, Instruction_school_hours, apply_status, submission_status, drop_out_type, process_instance_id,
deploy_id, create_by, create_time, update_by, update_time, remark, quit_startTime, quit_endTime, quit_year, quit_number,drop_out_category
from rt_stu_drop_out_school
@@ -68,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
<if test="parentName != null and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
<if test="jg != null and jg != ''"> and jg = #{jg}</if>
<if test="politicalStatus != null and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
<if test="hksz2 != null and hksz2 != ''"> and hksz2 = #{hksz2}</if>
<if test="attachmentUpload != null and attachmentUpload != ''"> and attachment_upload = #{attachmentUpload}</if>
<if test="reasonApplying != null and reasonApplying != ''"> and reason_applying = #{reasonApplying}</if>
@@ -95,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRtStuDropOutSchoolListByXW" parameterType="RtStuDropOutSchoolVo" resultMap="RtStuDropOutSchoolResult">
select a.drop_out_school_id, a.applicant_id, a.applicant_name, a.stu_no, a.stu_name, a.stu_id, a.gender, a.department_Name, a.grade_name,
a.class_name, a.mz, a.birthday, a.parent_phone, a.parent_name, a.jg, a.hksz2, a.attachment_upload, a.reason_applying, a.apply_signature,
a.class_name, a.mz, a.birthday, a.parent_phone, a.parent_name, a.jg,a.political_status,a.hksz2, a.attachment_upload, a.reason_applying, a.apply_signature,
a.ideological_education, a.Instruction_school_hours, a.apply_status, a.submission_status, a.drop_out_type, a.process_instance_id,
a.deploy_id, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.quit_startTime, a.quit_endTime,
a.quit_year, a.quit_number,a.drop_out_category from rt_stu_drop_out_school a
@@ -132,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">parent_phone,</if>
<if test="parentName != null">parent_name,</if>
<if test="jg != null">jg,</if>
<if test="politicalStatus != null">political_status,</if>
<if test="hksz2 != null">hksz2,</if>
<if test="attachmentUpload != null">attachment_upload,</if>
<if test="reasonApplying != null">reason_applying,</if>
@@ -169,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">#{parentPhone},</if>
<if test="parentName != null">#{parentName},</if>
<if test="jg != null">#{jg},</if>
<if test="politicalStatus != null">#{politicalStatus},</if>
<if test="hksz2 != null">#{hksz2},</if>
<if test="attachmentUpload != null">#{attachmentUpload},</if>
<if test="reasonApplying != null">#{reasonApplying},</if>
@@ -210,6 +214,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">parent_phone = #{parentPhone},</if>
<if test="parentName != null">parent_name = #{parentName},</if>
<if test="jg != null">jg = #{jg},</if>
<if test="politicalStatus != null">political_status = #{politicalStatus},</if>
<if test="hksz2 != null">hksz2 = #{hksz2},</if>
<if test="attachmentUpload != null">attachment_upload = #{attachmentUpload},</if>
<if test="reasonApplying != null">reason_applying = #{reasonApplying},</if>

View File

@@ -20,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="parentPhone" column="parent_phone" />
<result property="parentName" column="parent_name" />
<result property="jg" column="jg" />
<result property="politicalStatus" column="political_status" />
<result property="hksz2" column="hksz2" />
<result property="attachmentUpload" column="attachment_upload" />
<result property="reasonApplying" column="reason_applying" />
@@ -45,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectRtStuQuitSchoolVo">
select quit_school_id, applicant_id, applicant_name, stu_no, stu_name, stu_id, gender, department_Name, grade_name, class_name, mz,
birthday, parent_phone, parent_name, jg, hksz2, attachment_upload, reason_applying, apply_signature, ideological_education,
birthday, parent_phone, parent_name, jg,political_status,hksz2, attachment_upload, reason_applying, apply_signature, ideological_education,
Instruction_school_hours, apply_status, submission_status, process_instance_id, deploy_id, create_by, create_time, update_by,
update_time, remark,quit_type,quit_startTime,quit_endTime,quit_year,quit_number,quit_category from rt_stu_quit_school
</sql>
@@ -67,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
<if test="parentName != null and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
<if test="jg != null and jg != ''"> and jg = #{jg}</if>
<if test="politicalStatus != null and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
<if test="hksz2 != null and hksz2 != ''"> and hksz2 = #{hksz2}</if>
<if test="attachmentUpload != null and attachmentUpload != ''"> and attachment_upload = #{attachmentUpload}</if>
<if test="reasonApplying != null and reasonApplying != ''"> and reason_applying = #{reasonApplying}</if>
@@ -93,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRtStuQuitSchoolListByXW" parameterType="RtStuQuitSchool" resultMap="RtStuQuitSchoolResult">
SELECT quit_school_id, a.applicant_id, a.applicant_name, a.stu_no, a.stu_name, a.stu_id, a.gender, a.department_Name, a.grade_name, a.class_name, a.mz,
a.birthday, a.parent_phone, a.parent_name, a.jg, a.hksz2, a.attachment_upload, a.reason_applying, a.apply_signature, a.ideological_education,
a.birthday, a.parent_phone, a.parent_name, a.jg,a.political_status,a.hksz2, a.attachment_upload, a.reason_applying, a.apply_signature, a.ideological_education,
a.Instruction_school_hours, a.apply_status, a.submission_status, a.process_instance_id, a.deploy_id, a.create_by, a.create_time, a.update_by,
a.update_time, a.remark,a.quit_type,a.quit_startTime,a.quit_endTime,a.quit_year,a.quit_number,a.quit_category FROM rt_stu_quit_school a
LEFT JOIN srs_student b ON a.stu_no = b.stu_no
@@ -129,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRtStuQuitSchoolListByFdy" parameterType="RtStuQuitSchool" resultMap="RtStuQuitSchoolResult">
SELECT quit_school_id, applicant_id, applicant_name, a.stu_no, a.stu_name, a.stu_id, a.gender, a.department_Name, a.grade_name, a.class_name, a.mz,
a.birthday, a.parent_phone, a.parent_name, a.jg, a.hksz2, a.attachment_upload, a.reason_applying, a.apply_signature, a.ideological_education,
a.birthday, a.parent_phone, a.parent_name, a.jg,a.political_status,a.hksz2, a.attachment_upload, a.reason_applying, a.apply_signature, a.ideological_education,
a.Instruction_school_hours, a.apply_status, a.submission_status, a.process_instance_id, a.deploy_id, a.create_by, a.create_time, a.update_by,
a.update_time, a.remark,a.quit_type,a.quit_startTime,a.quit_endTime,a.quit_year,a.quit_number,a.quit_category FROM rt_stu_quit_school a
LEFT JOIN srs_student b ON a.stu_no = b.stu_no
@@ -150,6 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
<if test="parentName != null and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
<if test="jg != null and jg != ''"> and jg = #{jg}</if>
<if test="politicalStatus != null and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
<if test="hksz2 != null and hksz2 != ''"> and hksz2 = #{hksz2}</if>
<if test="attachmentUpload != null and attachmentUpload != ''"> and attachment_upload = #{attachmentUpload}</if>
<if test="reasonApplying != null and reasonApplying != ''"> and reason_applying = #{reasonApplying}</if>
@@ -188,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">parent_phone,</if>
<if test="parentName != null">parent_name,</if>
<if test="jg != null">jg,</if>
<if test="politicalStatus != null">political_status,</if>
<if test="hksz2 != null">hksz2,</if>
<if test="attachmentUpload != null">attachment_upload,</if>
<if test="reasonApplying != null">reason_applying,</if>
@@ -225,6 +229,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">#{parentPhone},</if>
<if test="parentName != null">#{parentName},</if>
<if test="jg != null">#{jg},</if>
<if test="politicalStatus != null">#{politicalStatus},</if>
<if test="hksz2 != null">#{hksz2},</if>
<if test="attachmentUpload != null">#{attachmentUpload},</if>
<if test="reasonApplying != null">#{reasonApplying},</if>
@@ -266,6 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">parent_phone = #{parentPhone},</if>
<if test="parentName != null">parent_name = #{parentName},</if>
<if test="jg != null">jg = #{jg},</if>
<if test="politicalStatus != null">political_status = #{politicalStatus},</if>
<if test="hksz2 != null">hksz2 = #{hksz2},</if>
<if test="attachmentUpload != null">attachment_upload = #{attachmentUpload},</if>
<if test="reasonApplying != null">reason_applying = #{reasonApplying},</if>

View File

@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="parentPhone" column="parent_phone" />
<result property="parentName" column="parent_name" />
<result property="jg" column="jg" />
<result property="politicalStatus" column="political_status" />
<result property="hksz2" column="hksz2" />
<result property="attachmentUpload" column="attachment_upload" />
<result property="reasonApplying" column="reason_applying" />
@@ -48,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectRtStuReentrySchoolVo">
select reentry_id, stu_no, stu_name, stu_id, gender, department_Name, grade_name, class_name, mz, birthday, parent_phone, parent_name, jg, hksz2,
select reentry_id, stu_no, stu_name, stu_id, gender, department_Name, grade_name, class_name, mz, birthday, parent_phone, parent_name, jg,political_status, hksz2,
attachment_upload, reason_applying, apply_signature, apply_status, submission_status, reentry_type, quit_number, process_instance_id,
deploy_id, create_by, create_time, update_by, update_time, remark, ideological_education, instruction_school_hours, ihandling_suggestion,
quit_time, reentry_time, reentry_class, reentry_dept, reentry_cause, reentry_year, reentry_number, quit_category,applicant_name from rt_stu_reentry_school
@@ -69,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null and parentPhone != ''"> and parent_phone = #{parentPhone}</if>
<if test="parentName != null and parentName != ''"> and parent_name like concat('%', #{parentName}, '%')</if>
<if test="jg != null and jg != ''"> and jg = #{jg}</if>
<if test="politicalStatus != null and politicalStatus != ''"> and political_status = #{politicalStatus}</if>
<if test="hksz2 != null and hksz2 != ''"> and hksz2 = #{hksz2}</if>
<if test="attachmentUpload != null and attachmentUpload != ''"> and attachment_upload = #{attachmentUpload}</if>
<if test="reasonApplying != null and reasonApplying != ''"> and reason_applying = #{reasonApplying}</if>
@@ -100,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectRtStuReentrySchoolListByXW" resultType="com.srs.routine.domain.RtStuReentrySchool">
select a.reentry_id, a.stu_no, a.stu_name, a.stu_id, a.gender, a.department_Name, a.grade_name, a.class_name, a.mz, a.birthday, a.parent_phone, a.parent_name, a.jg, a.hksz2,
select a.reentry_id, a.stu_no, a.stu_name, a.stu_id, a.gender, a.department_Name, a.grade_name, a.class_name, a.mz, a.birthday, a.parent_phone, a.parent_name, a.jg,a.political_status,a.hksz2,
a.attachment_upload, a.reason_applying, a.apply_signature, a.apply_status, a.submission_status, a.reentry_type, a.quit_number, a.process_instance_id,
a.deploy_id, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.ideological_education, a.instruction_school_hours, a.ihandling_suggestion,
a.quit_time, a.reentry_time, a.reentry_class, a.reentry_dept, a.reentry_cause, a.reentry_year, a.reentry_number, a.quit_category,a.applicant_name from rt_stu_reentry_school a
@@ -122,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectRtStuReentrySchoolListByFdy" resultType="com.srs.routine.domain.RtStuReentrySchool">
select a.reentry_id, a.stu_no, a.stu_name, a.stu_id, a.gender, a.department_Name, a.grade_name, a.class_name, a.mz, a.birthday, a.parent_phone, a.parent_name, a.jg, a.hksz2,
select a.reentry_id, a.stu_no, a.stu_name, a.stu_id, a.gender, a.department_Name, a.grade_name, a.class_name, a.mz, a.birthday, a.parent_phone, a.parent_name, a.jg,a.political_status,a.hksz2,
a.attachment_upload, a.reason_applying, a.apply_signature, a.apply_status, a.submission_status, a.reentry_type, a.quit_number, a.process_instance_id,
a.deploy_id, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.ideological_education, a.instruction_school_hours, a.ihandling_suggestion,
a.quit_time, a.reentry_time, a.reentry_class, a.reentry_dept, a.reentry_cause, a.reentry_year, a.reentry_number, a.quit_category,a.applicant_name from rt_stu_reentry_school a
@@ -158,6 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">parent_phone,</if>
<if test="parentName != null">parent_name,</if>
<if test="jg != null">jg,</if>
<if test="politicalStatus != null">political_status,</if>
<if test="hksz2 != null">hksz2,</if>
<if test="attachmentUpload != null">attachment_upload,</if>
<if test="reasonApplying != null">reason_applying,</if>
@@ -199,6 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">#{parentPhone},</if>
<if test="parentName != null">#{parentName},</if>
<if test="jg != null">#{jg},</if>
<if test="politicalStatus != null">#{politicalStatus},</if>
<if test="hksz2 != null">#{hksz2},</if>
<if test="attachmentUpload != null">#{attachmentUpload},</if>
<if test="reasonApplying != null">#{reasonApplying},</if>
@@ -244,6 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="parentPhone != null">parent_phone = #{parentPhone},</if>
<if test="parentName != null">parent_name = #{parentName},</if>
<if test="jg != null">jg = #{jg},</if>
<if test="politicalStatus != null">political_status = #{politicalStatus},</if>
<if test="hksz2 != null">hksz2 = #{hksz2},</if>
<if test="attachmentUpload != null">attachment_upload = #{attachmentUpload},</if>
<if test="reasonApplying != null">reason_applying = #{reasonApplying},</if>

View File

@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.srs.common.annotation.Excels;
import com.srs.common.annotation.Sensitive;
import com.srs.common.core.domain.entity.SysDept;
import com.srs.common.enums.DesensitizedType;
import com.srs.comprehensive.domain.SrsMajors;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -63,11 +65,13 @@ public class SrsStuReg extends BaseEntity
/** 身份证号 */
@Excel(name = "身份证号")
@TableField("SFZH")
@Sensitive(desensitizedType = DesensitizedType.ID_CARD)
private String SFZH;
/** 手机号 */
@Excel(name = "手机号")
@TableField("SJH")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
private String SJH;
/** 性别 */
@@ -143,6 +147,7 @@ public class SrsStuReg extends BaseEntity
/** 家庭联系人电话 */
@Excel(name = "家庭联系人电话")
@TableField("fam_phone")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
private String famPhone;
/** 家庭现居地址 */

View File

@@ -4,10 +4,13 @@ import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.srs.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import com.srs.common.enums.DesensitizedType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import com.srs.common.core.domain.BaseEntity;
import com.srs.common.annotation.Sensitive;
@@ -112,6 +115,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("联系电话")
@TableField("phone")
@Excel(name = "联系电话")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
public String phone;
/**
@@ -128,6 +132,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("紧急联系人电话")
@TableField("emergency_contact_phone")
@Excel(name = "紧急联系人电话")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
public String emergencyContactPhone;
/**
@@ -185,6 +190,7 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("家长电话")
@TableField("parent_phone")
@Excel(name = "家长电话")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
public String parentPhone;
/**

View File

@@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.srs.common.annotation.Excel;
import com.srs.common.annotation.Sensitive;
import com.srs.common.core.domain.BaseEntity;
import com.srs.common.enums.DesensitizedType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
@@ -142,6 +144,7 @@ public class QgzxPost extends BaseEntity {
@ApiModelProperty("联系电话")
@TableField("zdls_phone")
@Excel(name = "联系电话")
@Sensitive(desensitizedType = DesensitizedType.PHONE)
public String zdlsPhone;
/**

View File

@@ -1,5 +1,7 @@
package com.srs.workstudy.domain.vo;
import com.srs.common.annotation.Sensitive;
import com.srs.common.enums.DesensitizedType;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@@ -26,6 +28,7 @@ public class StuPostListFindVo implements Serializable {
// 家庭情况
private String familyCondition;
// 电话
@Sensitive(desensitizedType = DesensitizedType.PHONE)
private String stuPhone;
// 家庭住址