|
@@ -240,6 +240,7 @@ public class ApproveLogHelperServiceImpl implements IApproveLogHelperService {
|
|
|
/**
|
|
|
* 构建风险日志
|
|
|
*
|
|
|
+ * @param logTypeEnum 日志类型
|
|
|
* @param taskKey 任务定义key
|
|
|
* @param flowKey 流程定义key
|
|
|
* @param applyIdcard 申请人身份证号
|
|
@@ -254,7 +255,7 @@ public class ApproveLogHelperServiceImpl implements IApproveLogHelperService {
|
|
|
* @param createTime 创建时间
|
|
|
* @param processInstanceId 流程实例ID
|
|
|
*/
|
|
|
- public void buildRiskLog(String taskKey, String flowKey, String applyIdcard,
|
|
|
+ public void buildRiskLog(LogTypeEnum logTypeEnum, String taskKey, String flowKey, String applyIdcard,
|
|
|
String operateIdcard, String approveRecordId,
|
|
|
String businessCode, String riskIp,
|
|
|
String title, String createUserName,
|
|
@@ -280,22 +281,24 @@ public class ApproveLogHelperServiceImpl implements IApproveLogHelperService {
|
|
|
}
|
|
|
|
|
|
if (needSaveRiskLog) {
|
|
|
- // 提交人、审批人重复风险判断,跳过第一个节点
|
|
|
- if (applyIdcard.equals(operateIdcard)) {
|
|
|
-
|
|
|
- RiskScheme riskScheme = riskSchemeService.selectEnableSchemeByType(SchemeTypeEnum.COMMIT_APPROVE_REPETITION_RISK);
|
|
|
- if (riskScheme != null) {
|
|
|
- riskContent = "审批流程中,提交人与审批人都是:" + createUserName + "(" + operateIdcard + ")。";
|
|
|
- //除第一个节点外,审请人和处理人同为一个人,产生《提交人与审批人重复风险》
|
|
|
- saveRiskLog(businessCode, riskIp, riskContent,
|
|
|
- title, operateIdcard, createUserName,
|
|
|
- applyIdcard, orgName, orgCode,
|
|
|
- createTime, riskScheme.getSchemeType(),
|
|
|
- approveRecordId, processInstanceId);
|
|
|
- }
|
|
|
+ // 提交人、审批人重复风险判断,跳过第一个节点,只有操作日志才分析提交、审批人风险
|
|
|
+ if (logTypeEnum.equals(LogTypeEnum.OPERATE_LOG)) {
|
|
|
|
|
|
- }
|
|
|
+ if (applyIdcard.equals(operateIdcard)) {
|
|
|
|
|
|
+ RiskScheme riskScheme = riskSchemeService.selectEnableSchemeByType(SchemeTypeEnum.COMMIT_APPROVE_REPETITION_RISK);
|
|
|
+ if (riskScheme != null) {
|
|
|
+ riskContent = "审批流程中,提交人与审批人都是:" + createUserName + "(" + operateIdcard + ")。";
|
|
|
+ //除第一个节点外,审请人和处理人同为一个人,产生《提交人与审批人重复风险》
|
|
|
+ saveRiskLog(businessCode, riskIp, riskContent,
|
|
|
+ title, operateIdcard, createUserName,
|
|
|
+ applyIdcard, orgName, orgCode,
|
|
|
+ createTime, riskScheme.getSchemeType(),
|
|
|
+ approveRecordId, processInstanceId);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
LambdaQueryWrapper<RiskScheme> riskSchemeWhere = new LambdaQueryWrapper<>();
|
|
|
riskSchemeWhere.eq(RiskScheme::getSchemeType, SchemeTypeEnum.SINGLE_APPROVE_RISK.getValue());
|
|
@@ -397,7 +400,7 @@ public class ApproveLogHelperServiceImpl implements IApproveLogHelperService {
|
|
|
entity.setProcessInstanceId(processInstanceId);
|
|
|
operateLogService.saveOperateLog(entity);
|
|
|
|
|
|
- buildRiskLog(taskKey, flowKey, entity.getIdcard(),
|
|
|
+ buildRiskLog(LogTypeEnum.OPERATE_LOG, taskKey, flowKey, entity.getIdcard(),
|
|
|
entity.getCreateUser(), entity.getApproveRecordId(),
|
|
|
entity.getBusinessCode(), entity.getCreateIp(),
|
|
|
entity.getTitle(), entity.getCreateUserName(),
|
|
@@ -415,7 +418,7 @@ public class ApproveLogHelperServiceImpl implements IApproveLogHelperService {
|
|
|
entity.setProcessInstanceId(processInstanceId);
|
|
|
requestLogService.saveRequestLog(entity);
|
|
|
|
|
|
- buildRiskLog(taskKey, flowKey, entity.getIdcard(),
|
|
|
+ buildRiskLog(LogTypeEnum.REQUEST_LOG, taskKey, flowKey, entity.getIdcard(),
|
|
|
entity.getCreateUser(), entity.getApproveRecordId(),
|
|
|
entity.getBusinessCode(), entity.getCreateIp(),
|
|
|
entity.getTitle(), entity.getCreateUserName(),
|