|
|
@@ -66,14 +66,17 @@ public class EarlyWarningManage { |
|
|
|
case PROCESS_WARNING: |
|
|
|
content = convertContent(noticeContent,project.getProjectName(), |
|
|
|
InstTypeEnum.getByCode(biz),timeout); |
|
|
|
records.setRuleType(WarningRuleTypeEnum.PROCESS_WARNING.getCode()); |
|
|
|
break; |
|
|
|
case DECLARED_WARNING: |
|
|
|
content = convertContent(noticeContent,project.getProjectName(), |
|
|
|
WarningFlowTypeEnum.getByCode(biz),timeout); |
|
|
|
records.setRuleType(WarningRuleTypeEnum.DECLARED_WARNING.getCode()); |
|
|
|
break; |
|
|
|
case OPERATION_WARNING: |
|
|
|
content = convertContent(noticeContent,project.getProjectName(), |
|
|
|
WarningOperationTypeEnum.getByCode(biz),timeout); |
|
|
|
records.setRuleType(WarningRuleTypeEnum.OPERATION_WARNING.getCode()); |
|
|
|
break; |
|
|
|
default: |
|
|
|
log.info("匹配不到 规则类型"); |
|
|
@@ -90,7 +93,6 @@ public class EarlyWarningManage { |
|
|
|
records.setNoticeMethod(noticeMethod); |
|
|
|
records.setNoticeContent(content); |
|
|
|
records.setProjectName(project.getProjectName()); |
|
|
|
records.setRuleType(WarningRuleTypeEnum.PROCESS_WARNING.getCode()); |
|
|
|
records.setWarningUsername(Objects.nonNull(user) ? user.getUsername() : StringUtils.EMPTY); |
|
|
|
records.setWarningEmployeecode(employeeCode); |
|
|
|
earlyWarningRecordsService.save(records); |
|
|
|