diff --git a/src/main/java/neatlogic/module/cmdb/process/notifyhandler/CiEntitySyncNotifyHandler.java b/src/main/java/neatlogic/module/cmdb/process/notifyhandler/CiEntitySyncNotifyHandler.java index f4acd38a04fde9e8276b8ea11b2de8e07fad85fd..e75f2de9f9bcfc42e7556de8c3fc502017845b6d 100644 --- a/src/main/java/neatlogic/module/cmdb/process/notifyhandler/CiEntitySyncNotifyHandler.java +++ b/src/main/java/neatlogic/module/cmdb/process/notifyhandler/CiEntitySyncNotifyHandler.java @@ -1,42 +1,18 @@ package neatlogic.module.cmdb.process.notifyhandler; -import com.alibaba.fastjson.JSONObject; import neatlogic.framework.cmdb.auth.label.CIENTITY_MODIFY; -import neatlogic.framework.dto.ConditionParamVo; -import neatlogic.framework.notify.core.NotifyPolicyHandlerBase; -import neatlogic.framework.notify.dto.NotifyTriggerVo; +import neatlogic.framework.process.notify.core.ProcessTaskNotifyHandlerBase; import neatlogic.module.cmdb.process.stephandler.CmdbProcessStepHandlerType; +import org.springframework.stereotype.Component; -import java.util.List; - -//@Component -public class CiEntitySyncNotifyHandler extends NotifyPolicyHandlerBase { +@Component +public class CiEntitySyncNotifyHandler extends ProcessTaskNotifyHandlerBase { @Override public String getName() { return CmdbProcessStepHandlerType.CIENTITYSYNC.getName(); } - @Override - protected List myNotifyTriggerList() { - return null; - } - - @Override - protected List mySystemParamList() { - return null; - } - - @Override - protected List mySystemConditionOptionList() { - return null; - } - - @Override - protected void myAuthorityConfig(JSONObject config) { - - } - @Override public String getAuthName() { return CIENTITY_MODIFY.class.getSimpleName(); diff --git a/src/main/java/neatlogic/module/cmdb/process/notifyhandler/CmdbSyncNotifyHandler.java b/src/main/java/neatlogic/module/cmdb/process/notifyhandler/CmdbSyncNotifyHandler.java index ab2dc65125d8bd1f0765f03201b8c4b1b96c51d7..9af441153792a9c1e178422799c2b7666a83da51 100644 --- a/src/main/java/neatlogic/module/cmdb/process/notifyhandler/CmdbSyncNotifyHandler.java +++ b/src/main/java/neatlogic/module/cmdb/process/notifyhandler/CmdbSyncNotifyHandler.java @@ -17,16 +17,16 @@ package neatlogic.module.cmdb.process.notifyhandler; import com.alibaba.fastjson.JSONObject; import neatlogic.framework.cmdb.auth.label.CIENTITY_MODIFY; -import neatlogic.framework.dto.ConditionParamVo; -import neatlogic.framework.notify.core.NotifyPolicyHandlerBase; -import neatlogic.framework.notify.dto.NotifyTriggerVo; +import neatlogic.framework.process.constvalue.ProcessTaskGroupSearch; +import neatlogic.framework.process.constvalue.ProcessUserType; +import neatlogic.framework.process.notify.core.ProcessTaskNotifyHandlerBase; import neatlogic.module.cmdb.process.stephandler.CmdbProcessStepHandlerType; import org.springframework.stereotype.Component; import java.util.List; @Component -public class CmdbSyncNotifyHandler extends NotifyPolicyHandlerBase { +public class CmdbSyncNotifyHandler extends ProcessTaskNotifyHandlerBase { @Override public String getName() { @@ -34,23 +34,10 @@ public class CmdbSyncNotifyHandler extends NotifyPolicyHandlerBase { } @Override - protected List myNotifyTriggerList() { - return null; - } - - @Override - protected List mySystemParamList() { - return null; - } - - @Override - protected List mySystemConditionOptionList() { - return null; - } - - @Override - protected void myAuthorityConfig(JSONObject config) { - + protected void myCustomAuthorityConfig(JSONObject config) { + List excludeList = config.getJSONArray("excludeList").toJavaList(String.class); + excludeList.add(ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.MINOR.getValue()); + config.put("excludeList", excludeList); } @Override diff --git a/src/main/java/neatlogic/module/cmdb/process/stephandler/CIEntitySyncProcessUtilHandler.java b/src/main/java/neatlogic/module/cmdb/process/stephandler/CIEntitySyncProcessUtilHandler.java index 88d4a185e5e9c8e71ce5653dcaf92454061aaae3..eb6bb0936c6de9c2ab9ca1e4407116817013a775 100644 --- a/src/main/java/neatlogic/module/cmdb/process/stephandler/CIEntitySyncProcessUtilHandler.java +++ b/src/main/java/neatlogic/module/cmdb/process/stephandler/CIEntitySyncProcessUtilHandler.java @@ -13,6 +13,7 @@ import neatlogic.framework.process.dto.processconfig.ActionConfigActionVo; import neatlogic.framework.process.dto.processconfig.ActionConfigVo; import neatlogic.framework.process.stephandler.core.ProcessStepInternalHandlerBase; import neatlogic.framework.process.util.ProcessConfigUtil; +import neatlogic.module.cmdb.process.notifyhandler.CiEntitySyncNotifyHandler; import neatlogic.module.cmdb.process.notifyhandler.CmdbSyncNotifyHandler; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; @@ -180,7 +181,7 @@ public class CIEntitySyncProcessUtilHandler extends ProcessStepInternalHandlerBa /** 通知 **/ JSONObject notifyPolicyConfig = configObj.getJSONObject("notifyPolicyConfig"); INotifyServiceCrossoverService notifyServiceCrossoverService = CrossoverServiceFactory.getApi(INotifyServiceCrossoverService.class); - InvokeNotifyPolicyConfigVo invokeNotifyPolicyConfigVo = notifyServiceCrossoverService.regulateNotifyPolicyConfig(notifyPolicyConfig, CmdbSyncNotifyHandler.class); + InvokeNotifyPolicyConfigVo invokeNotifyPolicyConfigVo = notifyServiceCrossoverService.regulateNotifyPolicyConfig(notifyPolicyConfig, CiEntitySyncNotifyHandler.class); resultObj.put("notifyPolicyConfig", invokeNotifyPolicyConfigVo); /** 动作 **/