diff --git a/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java b/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java index 98ea53c03..9f950177d 100644 --- a/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java +++ b/src/main/java/com/nis/web/service/configuration/ObjectGroupService.java @@ -190,13 +190,6 @@ public class ObjectGroupService extends BaseService { logger.info("数据保存出错"); throw e; } - - if(isValid==1) { - entity.setIsAudit(1); - entity.setIsValid(1); - auditPolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION); - } - }else{ //处理公共分组 if(MapUtils.isNotEmpty(entity.getUserRegion())){ @@ -226,12 +219,6 @@ public class ObjectGroupService extends BaseService { areaIpCfgDao.saveAreaIpCfg(cfg); } } - - if(isValid==1) { - entity.setIsAudit(1); - entity.setIsValid(1); - auditPolicy(entity, entity.getIsAudit(), Constants.UPDATE_ACTION); - } } //更新UD_FLAG if(StringUtils.isNotBlank(oldCommonGroupIds)){ @@ -301,6 +288,17 @@ public class ObjectGroupService extends BaseService { } //处理定时任务 handelScheduleCfg(entity, entity.getIndexTable(), entity); + //修复已经生效的配置添加定时任务 + if(isValid==1) { + entity.setIsAudit(1); + entity.setIsValid(1); + if(entity.getCfgId()==null){ + auditPolicy(entity, entity.getIsAudit(),Constants.INSERT_ACTION); + }else{ + auditPolicy(entity, entity.getIsAudit(), Constants.UPDATE_ACTION); + } + + } } public CfgIndexInfo getObjGroupPolicyWithoutSubCfg(Long cfgId){ CfgIndexInfo entity = commonPolicyDao.getPolicyById(cfgId);