请假流程发送通知修改

This commit is contained in:
s1431_z_w
2025-08-31 19:27:53 +08:00
parent 0ee08e39fa
commit 19c8bd797c
8 changed files with 22 additions and 18 deletions

View File

@@ -17,6 +17,7 @@ import java.util.List;
/** /**
* 二级学院书记审批或学生销假开始监听器 * 二级学院书记审批或学生销假开始监听器
* 邵政文
*/ */
@Component @Component
@Slf4j @Slf4j
@@ -72,7 +73,7 @@ public class BoStartListener implements ExecutionListener {
//向企业微信发消息 //向企业微信发消息
TeacherVo updateDeptId = leaveMapper.getUpdateDeptId(approval); TeacherVo updateDeptId = leaveMapper.getUpdateDeptId(approval);
// 步骤 2: 使用updateDeptId.getUserName()获取辅导员工号 // 步骤 2: 使用updateDeptId.getUserName()获取辅导员工号
String userName = "2023429227"; String userName = updateDeptId.getUserName();
// 获取向企业微信发通知的工具类 // 获取向企业微信发通知的工具类
WeChatUtil weChatUtil = SpringUtils.getBean(WeChatUtil.class); WeChatUtil weChatUtil = SpringUtils.getBean(WeChatUtil.class);
@@ -114,7 +115,7 @@ public class BoStartListener implements ExecutionListener {
log.info("添加成功{}", res); log.info("添加成功{}", res);
//向企业微信发消息 //向企业微信发消息
// 步骤 2: 使用shenUserInfo.getUserName()获取辅导员工号 // 步骤 2: 使用shenUserInfo.getUserName()获取辅导员工号
String userName = "2023429227"; String userName = shenUserInfo.getUserName();
// 获取向企业微信发通知的工具类 // 获取向企业微信发通知的工具类
WeChatUtil weChatUtil = SpringUtils.getBean(WeChatUtil.class); WeChatUtil weChatUtil = SpringUtils.getBean(WeChatUtil.class);
@@ -123,7 +124,7 @@ public class BoStartListener implements ExecutionListener {
String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>"; String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>";
// 步骤 4: 使用 userName 作为接收人发送消息 // 步骤 4: 使用 userName 作为接收人发送消息
//weChatUtil.sendTextMessage(userName, content); weChatUtil.sendTextMessage(userName, content);
log.info("已成功向请假人(userName:{})发送企业微信请假审批通知。", userName); log.info("已成功向请假人(userName:{})发送企业微信请假审批通知。", userName);
} }
} }

View File

@@ -60,7 +60,7 @@ public class CounselorListener implements ExecutionListener {
log.info("查询辅导员信息:{}", teacherInfo.getUserName()); log.info("查询辅导员信息:{}", teacherInfo.getUserName());
log.info("请假人id{}", stuId); log.info("请假人id{}", stuId);
//辅导员工号teacherInfo.getUserName() //辅导员工号teacherInfo.getUserName()
String userName = "2023429227"; String userName = teacherInfo.getUserName();
// 步骤 3: 检查是否成功获取到 userName // 步骤 3: 检查是否成功获取到 userName
if (userName != null && !userName.isEmpty()) { if (userName != null && !userName.isEmpty()) {
@@ -93,7 +93,7 @@ public class CounselorListener implements ExecutionListener {
String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>"; String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>";
// 步骤 4: 使用 userName 作为接收人发送消息 // 步骤 4: 使用 userName 作为接收人发送消息
//weChatUtil.sendTextMessage(userName, content); weChatUtil.sendTextMessage(userName, content);
log.info("已成功向辅导员(userName:{})发送企业微信销假通知。", userName); log.info("已成功向辅导员(userName:{})发送企业微信销假通知。", userName);
} else { } else {

View File

@@ -78,7 +78,7 @@ public class LeadAuditListener implements ExecutionListener {
log.info("请假人数据为:{}", stuLeaveApplication); log.info("请假人数据为:{}", stuLeaveApplication);
log.info("审批结果为:{}", approval); log.info("审批结果为:{}", approval);
// 步骤 2: 发送消息的接收人stuLeaveApplication.getCreateBy() // 步骤 2: 发送消息的接收人stuLeaveApplication.getCreateBy()
String userName = "2023429227"; String userName = stuLeaveApplication.getCreateBy();
// 步骤 3: 检查是否成功获取到 userName // 步骤 3: 检查是否成功获取到 userName
if (userName != null && !userName.isEmpty()) { if (userName != null && !userName.isEmpty()) {
@@ -144,7 +144,7 @@ public class LeadAuditListener implements ExecutionListener {
String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>"; String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>";
// 步骤 4: 使用 userName 作为接收人发送消息 // 步骤 4: 使用 userName 作为接收人发送消息
//weChatUtil.sendTextMessage(userName, content); weChatUtil.sendTextMessage(userName, content);
log.info("已成功向辅导员(userName:{})发送企业微信销假通知。", userName); log.info("已成功向辅导员(userName:{})发送企业微信销假通知。", userName);
log.info("已成功向送企业微信销假通知。{}", stuLeaveApplication.getStuId()); log.info("已成功向送企业微信销假通知。{}", stuLeaveApplication.getStuId());

View File

@@ -20,6 +20,7 @@ import java.util.List;
/** /**
* 领导审核 * 领导审核
* 邵政文
*/ */
@Component @Component
@Slf4j @Slf4j
@@ -74,7 +75,7 @@ public class LeadEentListener implements ExecutionListener {
log.info("审批结果为:{}", approval); log.info("审批结果为:{}", approval);
log.info("校领导信息为:{}", lingDataInfo); log.info("校领导信息为:{}", lingDataInfo);
// 步骤 2: 使用lingDataInfo.get(0).getUserId()向校领导发送信息 // 步骤 2: 使用lingDataInfo.get(0).getUserId()向校领导发送信息
String userName = "2023429227"; String userName = lingDataInfo.get(0).getUserName();
// 步骤 3: 检查是否成功获取到 userName // 步骤 3: 检查是否成功获取到 userName
if (userName != null && !userName.isEmpty()) { if (userName != null && !userName.isEmpty()) {
@@ -107,7 +108,7 @@ public class LeadEentListener implements ExecutionListener {
String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>"; String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>";
// 步骤 4: 使用 userName 作为接收人发送消息 // 步骤 4: 使用 userName 作为接收人发送消息
//weChatUtil.sendTextMessage(userName, content); weChatUtil.sendTextMessage(userName, content);
log.info("已成功向辅导员(userName:{})发送企业微信销假通知。", userName); log.info("已成功向辅导员(userName:{})发送企业微信销假通知。", userName);
log.info("已成功向送企业微信销假通知。{}", stuLeaveApplication.getStuId()); log.info("已成功向送企业微信销假通知。{}", stuLeaveApplication.getStuId());

View File

@@ -18,6 +18,7 @@ import java.util.List;
/** /**
* 获取该二级学院书记所在的学工信息 * 获取该二级学院书记所在的学工信息
* 邵政文
*/ */
@Component @Component
@Slf4j @Slf4j
@@ -51,7 +52,7 @@ public class LeadStartListener implements ExecutionListener {
try { try {
log.info("学工收到二级学院书记发送过来的通知"); log.info("学工收到二级学院书记发送过来的通知");
// 步骤 2: 使用updateDeptIdInfo.get(0).getUserId()获取学工工号 // 步骤 2: 使用updateDeptIdInfo.get(0).getUserId()获取学工工号
String userName = "2023429227"; String userName = updateDeptIdInfo.get(0).getUserName();
// 步骤 3: 检查是否成功获取到 userName // 步骤 3: 检查是否成功获取到 userName
if (userName != null && !userName.isEmpty()) { if (userName != null && !userName.isEmpty()) {
@@ -84,7 +85,7 @@ public class LeadStartListener implements ExecutionListener {
String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>"; String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>";
// 步骤 4: 使用 userName 作为接收人发送消息 // 步骤 4: 使用 userName 作为接收人发送消息
//weChatUtil.sendTextMessage(userName, content); weChatUtil.sendTextMessage(userName, content);
log.info("已成功向辅导员(userName:{})发送企业微信请假审批通知。", userName); log.info("已成功向辅导员(userName:{})发送企业微信请假审批通知。", userName);
log.info("已成功向送企业微信审批通知。{}", updateDeptIdInfo.get(0).getUserName()); log.info("已成功向送企业微信审批通知。{}", updateDeptIdInfo.get(0).getUserName());

View File

@@ -78,7 +78,7 @@ public class LeaveApproveListener implements ExecutionListener {
int leaveDay = leaveDays.intValue(); int leaveDay = leaveDays.intValue();
if(leaveDay >= 1 && leaveDay <= 3) { if(leaveDay >= 1 && leaveDay <= 3) {
// 步骤 2: 使用stuLeaveApplication.getCreateBy()向请假人发送销假消息 // 步骤 2: 使用stuLeaveApplication.getCreateBy()向请假人发送销假消息
String userName = "2023429227"; String userName = stuLeaveApplication.getCreateBy();
// 步骤 3: 检查是否成功获取到 userName // 步骤 3: 检查是否成功获取到 userName
if (userName != null && !userName.isEmpty()) { if (userName != null && !userName.isEmpty()) {
@@ -108,7 +108,7 @@ public class LeaveApproveListener implements ExecutionListener {
String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>"; String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>";
// 步骤 4: 使用 userName 作为接收人发送消息 // 步骤 4: 使用 userName 作为接收人发送消息
//weChatUtil.sendTextMessage(userName, content); // 发送消息的方法 weChatUtil.sendTextMessage(userName, content); // 发送消息的方法
log.info("已成功向请假人({})发送企业微信销假通知。", userName); log.info("已成功向请假人({})发送企业微信销假通知。", userName);
log.info("发件人id。{}", stuLeaveApplication.getStuId()); log.info("发件人id。{}", stuLeaveApplication.getStuId());

View File

@@ -16,6 +16,7 @@ import java.math.BigDecimal;
/** /**
* 获取该生所在辅导员信息 * 获取该生所在辅导员信息
* 邵政文
*/ */
@Component @Component
@Slf4j @Slf4j
@@ -51,7 +52,7 @@ public class LeaveStartApproveListener implements ExecutionListener {
try { try {
log.info("辅导员收到请假人发送过来的通知"); log.info("辅导员收到请假人发送过来的通知");
// 步骤 2: 使用secondaryLeaderInfo.getUserName()获取辅导员工号 // 步骤 2: 使用secondaryLeaderInfo.getUserName()获取辅导员工号
String userName = "2023429227"; String userName = secondaryLeaderInfo.getUserName();
// 步骤 3: 检查是否成功获取到 userName // 步骤 3: 检查是否成功获取到 userName
if (userName != null && !userName.isEmpty()) { if (userName != null && !userName.isEmpty()) {
@@ -83,7 +84,7 @@ public class LeaveStartApproveListener implements ExecutionListener {
String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>"; String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>";
// 步骤 4: 使用 userName 作为接收人发送消息 // 步骤 4: 使用 userName 作为接收人发送消息
//weChatUtil.sendTextMessage(userName, content); weChatUtil.sendTextMessage(userName, content);
log.info("已成功向辅导员(userName:{})发送企业微信请假审批通知。", userName); log.info("已成功向辅导员(userName:{})发送企业微信请假审批通知。", userName);
log.info("已成功向送企业微信审批通知。{}", secondaryLeaderInfo.getUserName()); log.info("已成功向送企业微信审批通知。{}", secondaryLeaderInfo.getUserName());
log.info("请假人id{}", stuLeaveApplication.getStuId()); log.info("请假人id{}", stuLeaveApplication.getStuId());

View File

@@ -36,7 +36,7 @@ public class SecondaryLeaderListener implements ExecutionListener {
// 获取请假天数 // 获取请假天数
BigDecimal leaveDays = (BigDecimal) delegateExecution.getVariable("leaveDays"); BigDecimal leaveDays = (BigDecimal) delegateExecution.getVariable("leaveDays");
// 获取高辅导员 // 获取二级学院书记用户信息
//TeacherVo secondaryLeaderInfo = leaveMapper.getSecondaryLeaderInfo(deptId); //TeacherVo secondaryLeaderInfo = leaveMapper.getSecondaryLeaderInfo(deptId);
//delegateExecution.setVariable("approval", secondaryLeaderInfo.getUserId()); //delegateExecution.setVariable("approval", secondaryLeaderInfo.getUserId());
List<TeacherVo> secondaryLeaderInfo = leaveMapper.getSecondaryLeaderInfo(deptId); List<TeacherVo> secondaryLeaderInfo = leaveMapper.getSecondaryLeaderInfo(deptId);
@@ -53,7 +53,7 @@ public class SecondaryLeaderListener implements ExecutionListener {
try { try {
//int leaveDay = leaveDays.intValue(); //int leaveDay = leaveDays.intValue();
// 步骤 2: 使用secondaryLeaderInfo.get(0).getUserName()获取二级学院书记工号 // 步骤 2: 使用secondaryLeaderInfo.get(0).getUserName()获取二级学院书记工号
String userName = "2023429227"; String userName = secondaryLeaderInfo.get(0).getUserName();
// 步骤 3: 检查是否成功获取到 userName // 步骤 3: 检查是否成功获取到 userName
if (userName != null && !userName.isEmpty()) { if (userName != null && !userName.isEmpty()) {
@@ -120,7 +120,7 @@ public class SecondaryLeaderListener implements ExecutionListener {
String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>"; String content = "您有待处理任务,<a href='http://zhxg.gxsdxy.cn/web/#/pages/Approval/index'>请点击前往处理</a>";
// 步骤 4: 使用 userName 作为接收人发送消息 // 步骤 4: 使用 userName 作为接收人发送消息
//weChatUtil.sendTextMessage(userName, content); weChatUtil.sendTextMessage(userName, content);
log.info("已成功向二级学院书记(userName:{})发送企业微信请假审批通知。", userName); log.info("已成功向二级学院书记(userName:{})发送企业微信请假审批通知。", userName);
log.info("已成功向此人{}送企业微信审批通知。", secondaryLeaderInfo.get(0).getUserName()); log.info("已成功向此人{}送企业微信审批通知。", secondaryLeaderInfo.get(0).getUserName());