0707 - 完善消息通知模板
parent
5df6cb909b
commit
d75f433fc2
|
|
@ -71,6 +71,18 @@ archives:
|
|||
queueCapacity: 60
|
||||
namePrefix: async-task-
|
||||
keepAliveSeconds: 60
|
||||
message:
|
||||
template:
|
||||
firstLevelApplyReceiveAudit: MS000152
|
||||
closedAreaApplyReceiveAudit: MS000153
|
||||
firstLevelApplyReceiveCarAudit: MS000154
|
||||
firstLevelApplyReceiveCarAuditReject: MS000155
|
||||
firstLevelPersonReceiveAudit: MS000156
|
||||
firstLevelPersonReceiveAuditReject: MS000157
|
||||
closedAreaApplyReceiveCarAudit: MS000158
|
||||
closedAreaApplyReceiveCarAuditReject: MS000159
|
||||
closedAreaPersonReceiveAudit: MS000160
|
||||
closedAreaPersonReceiveAuditReject: MS000161
|
||||
# 大华平台配置
|
||||
dahua:
|
||||
oauth:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/3 15:26:15] App_Identifier[primeport-h5]"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><meta charset="UTF-8" name="referrer" content="strict-origin-when-cross-origin"/><title>临时访客申请</title><script>(function () {
|
||||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/7 11:32:44] App_Identifier[primeport-h5]"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><meta charset="UTF-8" name="referrer" content="strict-origin-when-cross-origin"/><title>临时访客申请</title><script>(function () {
|
||||
const APP_ENV = {
|
||||
antd: {
|
||||
'ant-prefix': 'micro-temp',
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
redirect: '',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();</script><script defer="defer" src="/primeport-h5/static/js/942.02e830144bca35fa.js"></script><script defer="defer" src="/primeport-h5/static/js/98.d3878dfe7429795b.js"></script><script defer="defer" src="/primeport-h5/static/js/main.d66f2eb7e011fd76.js"></script><link href="/primeport-h5/static/css/main.de5125c7f5780dd6.css" rel="stylesheet"></head><body><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative;overflow-y: auto;"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息 */console.log("%c@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/3 15:26:15] App_Identifier[primeport-h5] Frontend_Branch[master] Backend_Branch[<branch-name>]", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
})();</script><script defer="defer" src="/primeport-h5/static/js/942.02e830144bca35fa.js"></script><script defer="defer" src="/primeport-h5/static/js/98.d3878dfe7429795b.js"></script><script defer="defer" src="/primeport-h5/static/js/main.d3e8ce1dd1181e31.js"></script><link href="/primeport-h5/static/css/main.de5125c7f5780dd6.css" rel="stylesheet"></head><body><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative;overflow-y: auto;"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息 */console.log("%c@cqsjjb/scripts@2.0.0-rspack.1 Frontend_Env[production] Build_Date[2026/7/7 11:32:44] App_Identifier[primeport-h5] Frontend_Branch[master] Backend_Branch[<branch-name>]", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -7,6 +7,7 @@ import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
|
|||
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
|
||||
import com.zcloud.gbscommon.zclouduser.facade.ZcloudUserFacade;
|
||||
import com.zcloud.gbscommon.zclouduser.response.ZcloudUserCo;
|
||||
import com.zcloud.primeport.domain.config.MessageTemplateConfig;
|
||||
import com.zcloud.primeport.domain.enums.AuditEnum;
|
||||
import com.zcloud.primeport.domain.enums.CloseCarBelongTypeEnum;
|
||||
import com.zcloud.primeport.domain.gateway.ClosedAreaCarApplyGateway;
|
||||
|
|
@ -35,6 +36,7 @@ import java.util.Map;
|
|||
public class ClosedAreaCarApplyAddExe {
|
||||
private final ClosedAreaCarApplyGateway closedAreaCarApplyGateway;
|
||||
private final MessageNoticeExe messageNoticeExe;
|
||||
private final MessageTemplateConfig messageTemplateConfig;
|
||||
@DubboReference
|
||||
private ZcloudUserFacade zcloudUserFacade;
|
||||
|
||||
|
|
@ -73,7 +75,7 @@ public class ClosedAreaCarApplyAddExe {
|
|||
if (cmd.getAuditPersonUserId() != null) {
|
||||
// 发送消息提醒
|
||||
Map <String, Object> sendParams = new HashMap <>();
|
||||
messageNoticeExe.sendMessageNotice(cmd.getAuditPersonUserId(), "封闭区域审核", sendParams);
|
||||
messageNoticeExe.sendMessageNotice(cmd.getAuditPersonUserId(), messageTemplateConfig.getClosedAreaApplyReceiveAudit(), sendParams);
|
||||
// 发送待办
|
||||
messageNoticeExe.sendMessageTodoEvent(cmd.getAuditPersonUserId(), "您有一条封闭区域审核,请及时进行审核。", "待审核", closedAreaCarApplyE.getId(), closedAreaCarApplyE.getId(), 1, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.alibaba.cola.exception.BizException;
|
|||
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
|
||||
import com.zcloud.gbscommon.todolistmq.event.TodoListCompleteEvent;
|
||||
import com.zcloud.gbscommon.utils.DateUtil;
|
||||
import com.zcloud.primeport.domain.config.MessageTemplateConfig;
|
||||
import com.zcloud.primeport.domain.gateway.ClosedAreaCarApplyGateway;
|
||||
import com.zcloud.primeport.domain.model.ClosedAreaCarApplyE;
|
||||
import com.zcloud.primeport.dto.ClosedAreaCarApplyAuditCmd;
|
||||
|
|
@ -15,6 +16,8 @@ import org.springframework.stereotype.Component;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -28,6 +31,7 @@ import java.util.Date;
|
|||
public class ClosedAreaCarApplyUpdateExe {
|
||||
private final ClosedAreaCarApplyGateway closedAreaCarApplyGateway;
|
||||
private final MessageNoticeExe messageNoticeExe;
|
||||
private final MessageTemplateConfig messageTemplateConfig;
|
||||
private final TwoCarUtil twoCarUtil;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
@ -42,7 +46,10 @@ public class ClosedAreaCarApplyUpdateExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void auditCarApply(ClosedAreaCarApplyAuditCmd auditCmd) {
|
||||
ClosedAreaCarApplyE closedAreaCarApplyE = new ClosedAreaCarApplyE();
|
||||
ClosedAreaCarApplyE closedAreaCarApplyE = closedAreaCarApplyGateway.queryById(auditCmd.getId());
|
||||
if (closedAreaCarApplyE == null) {
|
||||
throw new BizException("车辆申请记录不存在");
|
||||
}
|
||||
closedAreaCarApplyE.setId(auditCmd.getId());
|
||||
closedAreaCarApplyE.setAuditFlag(auditCmd.getAuditFlag());
|
||||
closedAreaCarApplyE.setRefusalReason(auditCmd.getRefusalReason());
|
||||
|
|
@ -52,6 +59,21 @@ public class ClosedAreaCarApplyUpdateExe {
|
|||
// 完成待办
|
||||
messageNoticeExe.sendMessageCompleteEvent(auditCmd.getId());
|
||||
|
||||
// 发送通知
|
||||
if (closedAreaCarApplyE.getApplyPersonUserId() != null) {
|
||||
Map <String, Object> sendParams = new HashMap <>();
|
||||
String sourceCode = "您提交的一级口门车辆审批已通过";
|
||||
if (auditCmd.getAuditFlag().equals(2)) {
|
||||
// 通过
|
||||
sourceCode = messageTemplateConfig.getClosedAreaApplyReceiveCarAudit();
|
||||
}else {
|
||||
// 驳回
|
||||
sourceCode = messageTemplateConfig.getClosedAreaApplyReceiveCarAuditReject();
|
||||
}
|
||||
|
||||
messageNoticeExe.sendMessageNotice(closedAreaCarApplyE.getApplyPersonUserId(), sourceCode, sendParams);
|
||||
}
|
||||
|
||||
// 审批通过 → 同步门禁权限(二级海康 + 一级车行)
|
||||
// 根据carBelongType判断车辆类型,内部车不走临时接口,不覆盖一级原有权限
|
||||
if (auditCmd.getAuditFlag().equals(2)) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
|
|||
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
|
||||
import com.zcloud.gbscommon.zclouduser.facade.ZcloudUserFacade;
|
||||
import com.zcloud.gbscommon.zclouduser.response.ZcloudUserCo;
|
||||
import com.zcloud.primeport.domain.config.MessageTemplateConfig;
|
||||
import com.zcloud.primeport.domain.gateway.ClosedAreaPersonApplyGateway;
|
||||
import com.zcloud.primeport.domain.model.ClosedAreaPersonApplyE;
|
||||
import com.zcloud.primeport.dto.ClosedAreaPersonApplyAddCmd;
|
||||
|
|
@ -33,6 +34,7 @@ import java.util.Map;
|
|||
public class ClosedAreaPersonApplyAddExe {
|
||||
private final ClosedAreaPersonApplyGateway closedAreaPersonApplyGateway;
|
||||
private final MessageNoticeExe messageNoticeExe;
|
||||
private final MessageTemplateConfig messageTemplateConfig;
|
||||
|
||||
@DubboReference
|
||||
private ZcloudUserFacade zcloudUserFacade;
|
||||
|
|
@ -68,7 +70,7 @@ public class ClosedAreaPersonApplyAddExe {
|
|||
if (cmd.getAuditPersonUserId() != null) {
|
||||
// 发送消息提醒
|
||||
Map <String, Object> sendParams = new HashMap <>();
|
||||
messageNoticeExe.sendMessageNotice(cmd.getAuditPersonUserId(), "封闭区域审核", sendParams);
|
||||
messageNoticeExe.sendMessageNotice(cmd.getAuditPersonUserId(), messageTemplateConfig.getClosedAreaApplyReceiveAudit(), sendParams);
|
||||
// 发送待办
|
||||
messageNoticeExe.sendMessageTodoEvent(cmd.getAuditPersonUserId(), "您有一条封闭区域审核,请及时进行审核。", "待审核", closedAreaPersonApplyE.getId(), closedAreaPersonApplyE.getId(), 1, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@ import com.zcloud.gbscommon.utils.DateUtil;
|
|||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.gbscommon.zclouduser.facade.ZcloudUserFacade;
|
||||
import com.zcloud.gbscommon.zclouduser.response.ZcloudUserCo;
|
||||
import com.zcloud.primeport.domain.config.MessageTemplateConfig;
|
||||
import com.zcloud.primeport.domain.gateway.ClosedAreaFgsPersonAreaGateway;
|
||||
import com.zcloud.primeport.domain.gateway.ClosedAreaFgsPersonAuthGateway;
|
||||
import com.zcloud.primeport.domain.gateway.ClosedAreaPersonApplyGateway;
|
||||
import com.zcloud.primeport.domain.model.ClosedAreaCarApplyE;
|
||||
import com.zcloud.primeport.domain.model.ClosedAreaFgsPersonAreaE;
|
||||
import com.zcloud.primeport.domain.model.ClosedAreaFgsPersonAuthE;
|
||||
import com.zcloud.primeport.domain.model.ClosedAreaPersonApplyE;
|
||||
|
|
@ -25,10 +27,7 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -44,6 +43,7 @@ public class ClosedAreaPersonApplyUpdateExe {
|
|||
private final ClosedAreaFgsPersonAuthGateway areaFgsPersonAuthGateway;
|
||||
private final ClosedAreaFgsPersonAreaGateway areaFgsPersonAreaGateway;
|
||||
private final MessageNoticeExe messageNoticeExe;
|
||||
private final MessageTemplateConfig messageTemplateConfig;
|
||||
private final TwoPersonUtil twoPersonUtil;
|
||||
private final OnePersonUtil onePersonUtil;
|
||||
|
||||
|
|
@ -62,7 +62,10 @@ public class ClosedAreaPersonApplyUpdateExe {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void auditPersonApply(ClosedAreaPersonApplyAuditCmd auditCmd) {
|
||||
ClosedAreaPersonApplyE closedAreaPersonApplyE = new ClosedAreaPersonApplyE();
|
||||
ClosedAreaPersonApplyE closedAreaPersonApplyE = closedAreaPersonApplyGateway.queryById(auditCmd.getId());
|
||||
if (closedAreaPersonApplyE == null) {
|
||||
throw new BizException("车辆申请记录不存在");
|
||||
};
|
||||
closedAreaPersonApplyE.setId(auditCmd.getId());
|
||||
closedAreaPersonApplyE.setAuditFlag(auditCmd.getAuditFlag());
|
||||
closedAreaPersonApplyE.setRefusalReason(auditCmd.getRefusalReason());
|
||||
|
|
@ -72,13 +75,30 @@ public class ClosedAreaPersonApplyUpdateExe {
|
|||
// 完成待办
|
||||
messageNoticeExe.sendMessageCompleteEvent(auditCmd.getId());
|
||||
|
||||
// 发送通知
|
||||
if (closedAreaPersonApplyE.getApplyPersonUserId() != null) {
|
||||
Map <String, Object> sendParams = new HashMap <>();
|
||||
if (closedAreaPersonApplyE.getProjectName() != null) {
|
||||
sendParams.put("projectName", closedAreaPersonApplyE.getProjectName());
|
||||
}
|
||||
|
||||
String sourceCode = "您提交的一级口门车辆审批已通过";
|
||||
if (auditCmd.getAuditFlag().equals(2)) {
|
||||
// 通过
|
||||
sourceCode = messageTemplateConfig.getClosedAreaPersonReceiveAudit();
|
||||
}else {
|
||||
// 驳回
|
||||
sourceCode = messageTemplateConfig.getClosedAreaPersonReceiveAuditReject();
|
||||
}
|
||||
|
||||
messageNoticeExe.sendMessageNotice(closedAreaPersonApplyE.getApplyPersonUserId(), sourceCode, sendParams);
|
||||
}
|
||||
|
||||
// 审批通过 → 同步门禁权限(二级海康 + 一级大华)
|
||||
// 内部会先查大华系统判断是否已有权限,不覆盖原有权限
|
||||
if (auditCmd.getAuditFlag().equals(2)) {
|
||||
twoPersonUtil.levelTwoPeopleCompanyByApplyId(auditCmd.getId());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.jjb.saas.framework.auth.utils.AuthContext;
|
|||
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
|
||||
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
|
||||
import com.zcloud.gbscommon.utils.DateUtil;
|
||||
import com.zcloud.primeport.domain.config.MessageTemplateConfig;
|
||||
import com.zcloud.primeport.domain.gateway.PersonApplyGateway;
|
||||
import com.zcloud.primeport.domain.gateway.XgfApplyPersonGateway;
|
||||
import com.zcloud.primeport.domain.model.PersonApplyE;
|
||||
|
|
@ -39,6 +40,7 @@ public class PersonApplyAddExe {
|
|||
private final PersonApplyGateway personApplyGateway;
|
||||
private final XgfApplyPersonGateway xgfApplyPersonGateway;
|
||||
private final MessageNoticeExe messageNoticeExe;
|
||||
private final MessageTemplateConfig messageTemplateConfig;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(PersonApplyAddCmd cmd) {
|
||||
|
|
@ -79,7 +81,7 @@ public class PersonApplyAddExe {
|
|||
if (cmd.getAuditUserId() != null) {
|
||||
// 发送消息提醒
|
||||
Map <String, Object> sendParams = new HashMap <>();
|
||||
messageNoticeExe.sendMessageNotice(cmd.getAuditUserId(), "口门审核", sendParams);
|
||||
messageNoticeExe.sendMessageNotice(cmd.getAuditUserId(), messageTemplateConfig.getFirstLevelApplyReceiveAudit(), sendParams);
|
||||
// 发送待办
|
||||
messageNoticeExe.sendMessageTodoEvent(cmd.getAuditUserId(), "您有一条口门审核,请及时进行审核。", "待审核", build.getId(), build.getId(), 1, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.zcloud.primeport.command;
|
|||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.gbscommon.utils.DateUtil;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.primeport.domain.config.MessageTemplateConfig;
|
||||
import com.zcloud.primeport.domain.gateway.MkmjGateGateway;
|
||||
import com.zcloud.primeport.domain.gateway.PersonApplyGateway;
|
||||
import com.zcloud.primeport.domain.gateway.XgfApplyPersonGateway;
|
||||
|
|
@ -18,6 +19,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -32,6 +36,7 @@ public class PersonApplyUpdateExe {
|
|||
private final PersonApplyGateway personApplyGateway;
|
||||
private final XgfApplyPersonGateway xgfApplyPersonGateway;
|
||||
private final MessageNoticeExe messageNoticeExe;
|
||||
private final MessageTemplateConfig messageTemplateConfig;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(PersonApplyUpdateCmd personApplyUpdateCmd) {
|
||||
|
|
@ -54,6 +59,31 @@ public class PersonApplyUpdateExe {
|
|||
|
||||
// 完成待办
|
||||
messageNoticeExe.sendMessageCompleteEvent(build.getId());
|
||||
|
||||
XgfApplyPersonE xgfApplyPersonE = personApplyGateway.getXgfApplyPersonById(build.getId());
|
||||
|
||||
// 发送通过消息通知
|
||||
List <PersonApplyE> userApplyList = personApplyGateway.personListByxgfApplyPersonId(build.getId());
|
||||
if (userApplyList != null && !userApplyList.isEmpty()) {
|
||||
for (PersonApplyE item : userApplyList) {
|
||||
if (item.getEmployeePersonUserId() != null) {
|
||||
Map <String, Object> sendParams = new HashMap <>();
|
||||
if (xgfApplyPersonE != null && xgfApplyPersonE.getProjectName() != null) {
|
||||
sendParams.put("projectName", item.getEmployeePersonUserName());
|
||||
}
|
||||
|
||||
String sourceCode = "";
|
||||
if(cmd.getAuditFlag().equals(2)) {
|
||||
// 通过
|
||||
sourceCode = messageTemplateConfig.getFirstLevelPersonReceiveAudit();
|
||||
} else {
|
||||
// 驳回
|
||||
sourceCode = messageTemplateConfig.getFirstLevelPersonReceiveAuditReject();
|
||||
}
|
||||
messageNoticeExe.sendMessageNotice(item.getEmployeePersonUserId(), messageTemplateConfig.getFirstLevelApplyReceiveCarAudit(), sendParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.jjb.saas.framework.auth.utils.AuthContext;
|
|||
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
|
||||
import com.zcloud.gbscommon.todolistmq.event.TodoListAddEvent;
|
||||
import com.zcloud.gbscommon.utils.DateUtil;
|
||||
import com.zcloud.primeport.domain.config.MessageTemplateConfig;
|
||||
import com.zcloud.primeport.domain.enums.AuditEnum;
|
||||
import com.zcloud.primeport.domain.enums.VehicleBelongTypeEnum;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
|
|
@ -39,6 +40,7 @@ public class VehicleApplyAddExe {
|
|||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
private final VehicleAuditGateway vehicleAuditGateway;
|
||||
private final MessageNoticeExe messageNoticeExe;
|
||||
private final MessageTemplateConfig messageTemplateConfig;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public VehicleApplyE execute(VehicleApplyAddCmd cmd) {
|
||||
|
|
@ -88,7 +90,7 @@ public class VehicleApplyAddExe {
|
|||
if (cmd.getAuditUserId() != null) {
|
||||
// 发送消息提醒
|
||||
Map <String, Object> sendParams = new HashMap <>();
|
||||
messageNoticeExe.sendMessageNotice(cmd.getAuditUserId(), "口门审核", sendParams);
|
||||
messageNoticeExe.sendMessageNotice(cmd.getAuditUserId(), messageTemplateConfig.getFirstLevelApplyReceiveAudit(), sendParams);
|
||||
// 发送待办
|
||||
messageNoticeExe.sendMessageTodoEvent(cmd.getAuditUserId(), "您有一条口门审核,请及时进行审核。", "待审核", build.getId(), build.getId(), 1, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.alibaba.cola.exception.BizException;
|
|||
import com.zcloud.gbscommon.todolistmq.TodoListEventPusherUtil;
|
||||
import com.zcloud.gbscommon.todolistmq.event.TodoListCompleteEvent;
|
||||
import com.zcloud.gbscommon.utils.DateUtil;
|
||||
import com.zcloud.primeport.domain.config.MessageTemplateConfig;
|
||||
import com.zcloud.primeport.domain.enums.VehicleBelongTypeEnum;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleApplyGateway;
|
||||
import com.zcloud.primeport.domain.gateway.VehicleAuditGateway;
|
||||
|
|
@ -17,6 +18,8 @@ import org.springframework.stereotype.Component;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -32,6 +35,7 @@ public class VehicleAuditUpdateExe {
|
|||
private final VehicleApplyGateway vehicleApplyGateway;
|
||||
private final CarDockUtil carDockUtil;
|
||||
private final MessageNoticeExe messageNoticeExe;
|
||||
private final MessageTemplateConfig messageTemplateConfig;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(VehicleAuditUpdateCmd vehicleAuditUpdateCmd) {
|
||||
|
|
@ -61,9 +65,11 @@ public class VehicleAuditUpdateExe {
|
|||
vehicleApplyE.setStatusFlag(2);
|
||||
vehicleApplyGateway.update(vehicleApplyE);
|
||||
vehicleAuditGateway.update(vehicleAuditE);
|
||||
|
||||
VehicleApplyE vehicleApplyE1 = vehicleApplyGateway.getById(cmd.getVehicleApplyId());
|
||||
|
||||
// 审批通过 进行数据对接。
|
||||
if (cmd.getAuditStatus().equals(2)) {
|
||||
VehicleApplyE vehicleApplyE1 = vehicleApplyGateway.getById(cmd.getVehicleApplyId());
|
||||
if (vehicleApplyE1 != null && (vehicleApplyE1.getVehicleBelongType().equals(VehicleBelongTypeEnum.TEMP_VEHICLES.getCode()) ||
|
||||
vehicleApplyE1.getVehicleBelongType().equals(VehicleBelongTypeEnum.XGF_VEHICLES.getCode()))) {
|
||||
carDockUtil.execute(vehicleApplyE1.getLicenceNo());
|
||||
|
|
@ -74,6 +80,22 @@ public class VehicleAuditUpdateExe {
|
|||
|
||||
// 完成待办
|
||||
messageNoticeExe.sendMessageCompleteEvent(vehicleAuditE.getId());
|
||||
|
||||
// 发送通知
|
||||
if (vehicleApplyE1 != null && vehicleApplyE1.getEmployeeVehicleUserId() != null) {
|
||||
Map<String, Object> sendParams = new HashMap <>();
|
||||
String sourceCode = "";
|
||||
if (cmd.getAuditStatus().equals(2)) {
|
||||
// 通过
|
||||
sourceCode = messageTemplateConfig.getFirstLevelApplyReceiveCarAudit();
|
||||
} else {
|
||||
// 驳回
|
||||
sourceCode = messageTemplateConfig.getFirstLevelApplyReceiveCarAuditReject();
|
||||
}
|
||||
|
||||
messageNoticeExe.sendMessageNotice(vehicleApplyE1.getEmployeeVehicleUserId(), sourceCode, sendParams);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.primeport.domain.config;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author zhangyue
|
||||
* @date 2026/2/11 10:05
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "message.template")
|
||||
@Data
|
||||
public class MessageTemplateConfig {
|
||||
|
||||
/** 一级口门 */
|
||||
// 审批人收到审批
|
||||
private String firstLevelApplyReceiveAudit;
|
||||
// 一级口门申请人车辆审批通过
|
||||
private String firstLevelApplyReceiveCarAudit;
|
||||
// 一级口门申请人车辆审批驳回
|
||||
private String firstLevelApplyReceiveCarAuditReject;
|
||||
// 一级口门人员审批通过
|
||||
private String firstLevelPersonReceiveAudit;
|
||||
// 一级口门人员审批驳回
|
||||
private String firstLevelPersonReceiveAuditReject;
|
||||
|
||||
/** 封闭区域 */
|
||||
// 封闭区域审批人收到审批
|
||||
private String closedAreaApplyReceiveAudit;
|
||||
// 封闭区域申请人车辆审批通过
|
||||
private String closedAreaApplyReceiveCarAudit;
|
||||
// 封闭区域申请人车辆审批驳回
|
||||
private String closedAreaApplyReceiveCarAuditReject;
|
||||
// 封闭区域人员审批通过
|
||||
private String closedAreaPersonReceiveAudit;
|
||||
// 封闭区域人员审批驳回
|
||||
private String closedAreaPersonReceiveAuditReject;
|
||||
}
|
||||
|
|
@ -26,5 +26,7 @@ public interface ClosedAreaCarApplyGateway {
|
|||
Boolean deletedClosedAreaCarApplyById(Long id);
|
||||
|
||||
Boolean deletedClosedAreaCarApplyByIds(Long[] id);
|
||||
|
||||
ClosedAreaCarApplyE queryById(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,5 +25,9 @@ public interface ClosedAreaPersonApplyGateway {
|
|||
Boolean deletedClosedAreaPersonApplyById(Long id);
|
||||
Boolean deletedClosedAreaPersonApplyByIds(Long[] id);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
ClosedAreaPersonApplyE queryById(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,5 +36,7 @@ public interface PersonApplyGateway {
|
|||
void xgfPersonAudit(XgfApplyPersonE build) throws Exception;
|
||||
|
||||
List<PersonApplyE> personListByxgfApplyPersonId(Long id);
|
||||
|
||||
XgfApplyPersonE getXgfApplyPersonById(Long id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,5 +47,13 @@ public class ClosedAreaCarApplyGatewayImpl implements ClosedAreaCarApplyGateway
|
|||
public Boolean deletedClosedAreaCarApplyByIds(Long[] ids) {
|
||||
return closedAreaCarApplyRepository.removeByIds(Collections.singletonList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClosedAreaCarApplyE queryById(Long id) {
|
||||
ClosedAreaCarApplyDO d = closedAreaCarApplyRepository.getById(id);
|
||||
ClosedAreaCarApplyE closedAreaCarApplyE = new ClosedAreaCarApplyE();
|
||||
BeanUtils.copyProperties(d, closedAreaCarApplyE);
|
||||
return closedAreaCarApplyE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,14 @@ public class ClosedAreaPersonApplyGatewayImpl implements ClosedAreaPersonApplyGa
|
|||
return closedAreaPersonApplyRepository.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClosedAreaPersonApplyE queryById(Long id) {
|
||||
ClosedAreaPersonApplyDO d = closedAreaPersonApplyRepository.getById(id);
|
||||
ClosedAreaPersonApplyE e = new ClosedAreaPersonApplyE();
|
||||
BeanUtils.copyProperties(d, e);
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,8 @@ public class PersonApplyGatewayImpl implements PersonApplyGateway {
|
|||
}
|
||||
}
|
||||
|
||||
@Override public List<PersonApplyE> personListByxgfApplyPersonId (Long id){
|
||||
@Override
|
||||
public List<PersonApplyE> personListByxgfApplyPersonId (Long id){
|
||||
QueryWrapper<PersonApplyDO> xgfApplyPersonDOQueryWrapper = new QueryWrapper<>();
|
||||
xgfApplyPersonDOQueryWrapper.eq("xgf_apply_person_id", id);
|
||||
List<PersonApplyDO> xgfApplyPersonDOS = personApplyRepository.list(xgfApplyPersonDOQueryWrapper);
|
||||
|
|
@ -206,6 +207,14 @@ public class PersonApplyGatewayImpl implements PersonApplyGateway {
|
|||
return xgfApplyPersonES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XgfApplyPersonE getXgfApplyPersonById (Long id) {
|
||||
XgfApplyPersonDO byId = xgfApplyPersonRepository.getById(id);
|
||||
XgfApplyPersonE e = new XgfApplyPersonE();
|
||||
BeanUtils.copyProperties(byId, e);
|
||||
return e;
|
||||
}
|
||||
|
||||
public static void main (String[]args){
|
||||
HashSet<String> strings = new HashSet<>();
|
||||
System.out.println(strings.add("1"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue