From 70b975addea7221abf4f333733c52d061ca793ac Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Fri, 16 Aug 2024 17:20:48 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?= =?UTF-8?q?=E6=8C=87=E6=B4=BE=E5=89=8D=E7=BD=AE=E6=AD=A5=E9=AA=A4=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E9=80=89=E6=B2=A1=E6=9C=89=E5=A4=84=E7=90=86=E4=BA=BA?= =?UTF-8?q?=E7=9A=84=E6=AD=A5=E9=AA=A4=E6=8C=87=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1211578056146944]通知策略梳理每个触发点的收件人,没用的收件人去掉,如激活的处理人 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1211578056146944 --- .../handler/EventNotifyPolicyHandler.java | 73 ++----------------- 1 file changed, 6 insertions(+), 67 deletions(-) diff --git a/src/main/java/neatlogic/module/event/notify/handler/EventNotifyPolicyHandler.java b/src/main/java/neatlogic/module/event/notify/handler/EventNotifyPolicyHandler.java index de5e60b..d3be69a 100644 --- a/src/main/java/neatlogic/module/event/notify/handler/EventNotifyPolicyHandler.java +++ b/src/main/java/neatlogic/module/event/notify/handler/EventNotifyPolicyHandler.java @@ -1,22 +1,12 @@ package neatlogic.module.event.notify.handler; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import neatlogic.framework.common.constvalue.Expression; -import neatlogic.framework.common.constvalue.ParamType; -import neatlogic.framework.condition.core.IConditionHandler; import neatlogic.framework.dto.ConditionParamVo; -import neatlogic.framework.dto.ExpressionVo; import neatlogic.framework.event.constvalue.EventProcessStepHandlerType; -import neatlogic.framework.form.constvalue.FormConditionModel; -import neatlogic.framework.notify.core.NotifyPolicyHandlerBase; import neatlogic.framework.notify.dto.NotifyTriggerVo; import neatlogic.framework.process.auth.PROCESS_MODIFY; -import neatlogic.framework.process.condition.core.ProcessTaskConditionFactory; -import neatlogic.framework.process.constvalue.ConditionProcessTaskOptions; -import neatlogic.framework.process.constvalue.ProcessTaskGroupSearch; -import neatlogic.framework.process.constvalue.ProcessUserType; -import neatlogic.framework.process.notify.constvalue.*; +import neatlogic.framework.process.notify.constvalue.ProcessTaskStepTaskNotifyParam; +import neatlogic.framework.process.notify.constvalue.ProcessTaskStepTaskNotifyTriggerType; +import neatlogic.framework.process.notify.core.ProcessTaskNotifyHandlerBase; import org.springframework.stereotype.Component; import java.util.ArrayList; @@ -31,7 +21,7 @@ import java.util.List; **/ @Component -public class EventNotifyPolicyHandler extends NotifyPolicyHandlerBase { +public class EventNotifyPolicyHandler extends ProcessTaskNotifyHandlerBase { @Override public String getName() { return EventProcessStepHandlerType.EVENT.getName(); @@ -51,11 +41,8 @@ public class EventNotifyPolicyHandler extends NotifyPolicyHandlerBase { // } @Override - protected List myNotifyTriggerList() { + protected List myCustomNotifyTriggerList() { List returnList = new ArrayList<>(); - for (ProcessTaskStepNotifyTriggerType notifyTriggerType : ProcessTaskStepNotifyTriggerType.values()) { - returnList.add(new NotifyTriggerVo(notifyTriggerType)); - } //任务 for (ProcessTaskStepTaskNotifyTriggerType notifyTriggerType : ProcessTaskStepTaskNotifyTriggerType.values()) { returnList.add(new NotifyTriggerVo(notifyTriggerType)); @@ -64,59 +51,11 @@ public class EventNotifyPolicyHandler extends NotifyPolicyHandlerBase { } @Override - protected List mySystemParamList() { + protected List myCustomSystemParamList() { List notifyPolicyParamList = new ArrayList<>(); - for(ProcessTaskNotifyParam param : ProcessTaskNotifyParam.values()) { - notifyPolicyParamList.add(createConditionParam(param)); - } - for(ProcessTaskStepNotifyParam param : ProcessTaskStepNotifyParam.values()) { - notifyPolicyParamList.add(createConditionParam(param)); - } for(ProcessTaskStepTaskNotifyParam param : ProcessTaskStepTaskNotifyParam.values()) { notifyPolicyParamList.add(createConditionParam(param)); } return notifyPolicyParamList; } - - @Override - protected List mySystemConditionOptionList() { - List notifyPolicyParamList = new ArrayList<>(); - for (ConditionProcessTaskOptions option : ConditionProcessTaskOptions.values()) { - IConditionHandler condition = ProcessTaskConditionFactory.getHandler(option.getValue()); - if (condition != null) { - ConditionParamVo param = new ConditionParamVo(); - param.setName(condition.getName()); - param.setLabel(condition.getDisplayName()); - param.setController(condition.getHandler(FormConditionModel.CUSTOM)); - if (condition.getConfig() != null) { - param.setConfig(condition.getConfig().toJSONString()); - } - param.setType(condition.getType()); - ParamType paramType = condition.getParamType(); - if (paramType != null) { - param.setParamType(paramType.getName()); - param.setParamTypeName(paramType.getText()); - param.setDefaultExpression(paramType.getDefaultExpression().getExpression()); - for (Expression expression : paramType.getExpressionList()) { - param.getExpressionList().add(new ExpressionVo(expression.getExpression(), expression.getExpressionName(), expression.getIsShowConditionValue())); - } - } - - param.setIsEditable(0); - notifyPolicyParamList.add(param); - } - } - return notifyPolicyParamList; - } - - @Override - protected void myAuthorityConfig(JSONObject config) { - List groupList = JSON.parseArray(config.getJSONArray("groupList").toJSONString(), String.class); - groupList.add(ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue()); - config.put("groupList", groupList); - List includeList = JSON.parseArray(config.getJSONArray("includeList").toJSONString(), String.class); - includeList.add(ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.DEFAULT_WORKER.getValue()); - includeList.add(ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.FOCUS_USER.getValue()); - config.put("includeList", includeList); - } } -- Gitee