|
@@ -402,9 +402,11 @@ public class GroupAlarmRuleServiceImpl extends ServiceImpl<GroupAlarmRuleMapper,
|
|
|
alarmConditionService.deleteAlarmCondition(deleteGroupAlarmRuleDTO.getAlarmConditionId());
|
|
|
// 异步删除项目上的报警规则
|
|
|
PoemsContextContent context = PoemsContext.getContext();
|
|
|
+ String requestUri=request.getRequestURI();
|
|
|
executor.execute(() -> {
|
|
|
PoemsContext.setContext(context);
|
|
|
try {
|
|
|
+ dynamicDataSourceHandler.resetDataSource(requestUri);
|
|
|
projectAlarmRuleService.deleteBatchByGroupRule(groupAlarmRule);
|
|
|
String condition = deleteGroupAlarmRuleDTO.getCondition();
|
|
|
String classCode = deleteGroupAlarmRuleDTO.getClassCode();
|
|
@@ -521,9 +523,12 @@ public class GroupAlarmRuleServiceImpl extends ServiceImpl<GroupAlarmRuleMapper,
|
|
|
String projectId = PoemsContext.getContext().getProjectId();
|
|
|
String pd = PoemsContext.getContext().getPd();
|
|
|
String loginDevice = PoemsContext.getContext().getLoginDevice();
|
|
|
+ String resquestUri = request.getRequestURI();
|
|
|
executor.execute(() -> {
|
|
|
+
|
|
|
// 切换线程需要重新设置线程中的通用变量
|
|
|
PoemsContext.setContext(userId, loginDevice, pd, groupCode, projectId);
|
|
|
+ dynamicDataSourceHandler.resetDataSource(resquestUri);
|
|
|
projectAlarmRuleService.addProjectAlarmRulesPM(addGroupAlarmRuleDTO);
|
|
|
});
|
|
|
|