From 4d8189d6fcc8191a8bc69cbda0f53715d5342a26 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Fri, 13 Dec 2024 15:22:39 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E6=B5=81=E7=A8=8B=E8=8A=82=E7=82=B9=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E2=80=9C=E9=87=8D=E6=96=B0=E6=BF=80=E6=B4=BB=E2=80=9D?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1310221434060800]通知策略流程节点增加“重新激活”触发点 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1310221434060800 --- ...ocessTaskStepTimeAuditCrossoverMapper.java | 3 +++ .../ProcessTaskStepNotifyTriggerType.java | 4 ++++ .../core/ProcessStepHandlerBase.java | 20 ++++++++++++------- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskStepTimeAuditCrossoverMapper.java b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskStepTimeAuditCrossoverMapper.java index de9d4159..858ce5a5 100644 --- a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskStepTimeAuditCrossoverMapper.java +++ b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskStepTimeAuditCrossoverMapper.java @@ -19,10 +19,13 @@ package neatlogic.framework.process.crossover; import neatlogic.framework.crossover.ICrossoverService; import neatlogic.framework.process.dto.ProcessTaskStepTimeAuditVo; +import org.apache.ibatis.annotations.Param; import java.util.List; public interface IProcessTaskStepTimeAuditCrossoverMapper extends ICrossoverService { List getProcessTaskStepTimeAuditBySlaId(Long slaId); + + int getProcessTaskStepCostCountByProcessTaskStepIdAndStartOperateList(@Param("processTaskStepId") Long processTaskStepId, @Param("startOperateList") List startOperateList); } diff --git a/src/main/java/neatlogic/framework/process/notify/constvalue/ProcessTaskStepNotifyTriggerType.java b/src/main/java/neatlogic/framework/process/notify/constvalue/ProcessTaskStepNotifyTriggerType.java index 52fbf2c9..35c876f6 100755 --- a/src/main/java/neatlogic/framework/process/notify/constvalue/ProcessTaskStepNotifyTriggerType.java +++ b/src/main/java/neatlogic/framework/process/notify/constvalue/ProcessTaskStepNotifyTriggerType.java @@ -14,6 +14,10 @@ public enum ProcessTaskStepNotifyTriggerType implements INotifyTriggerType { ACTIVE("active", "nfpnc.processtaskstepnotifytriggertype.text.active", "nfpnc.processtaskstepnotifytriggertype.description.active", Arrays.asList(ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.MAJOR.getValue(), ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.MINOR.getValue())), + + REACTIVATE("reactivate", "nfpnc.processtaskstepnotifytriggertype.text.reactivate", "nfpnc.processtaskstepnotifytriggertype.description.reactivate", + Arrays.asList(ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.MAJOR.getValue(), + ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.MINOR.getValue())), ASSIGNEXCEPTION("assignexception", "nfpnc.processtaskstepnotifytriggertype.text.assignexception", "nfpnc.processtaskstepnotifytriggertype.description.assignexception", Arrays.asList(ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.MAJOR.getValue(), ProcessTaskGroupSearch.PROCESSUSERTYPE.getValue() + "#" + ProcessUserType.MINOR.getValue(), diff --git a/src/main/java/neatlogic/framework/process/stephandler/core/ProcessStepHandlerBase.java b/src/main/java/neatlogic/framework/process/stephandler/core/ProcessStepHandlerBase.java index aec98e72..b273fbe1 100644 --- a/src/main/java/neatlogic/framework/process/stephandler/core/ProcessStepHandlerBase.java +++ b/src/main/java/neatlogic/framework/process/stephandler/core/ProcessStepHandlerBase.java @@ -283,13 +283,19 @@ public abstract class ProcessStepHandlerBase implements IProcessStepHandler { /* 计算SLA并触发超时警告 **/ processStepHandlerCrossoverUtil.calculateSla(currentProcessTaskStepVo); - /* 触发通知 **/ - processStepHandlerCrossoverUtil.notify(currentProcessTaskStepVo, ProcessTaskStepNotifyTriggerType.ACTIVE); - - - - /* 执行动作 **/ - processStepHandlerCrossoverUtil.action(currentProcessTaskStepVo, ProcessTaskStepNotifyTriggerType.ACTIVE); + IProcessTaskStepTimeAuditCrossoverMapper processTaskStepTimeAuditCrossoverMapper = CrossoverServiceFactory.getApi(IProcessTaskStepTimeAuditCrossoverMapper.class); + int count = processTaskStepTimeAuditCrossoverMapper.getProcessTaskStepCostCountByProcessTaskStepIdAndStartOperateList(currentProcessTaskStepVo.getId(), Arrays.asList(ProcessTaskStepOperationType.STEP_COMPLETE.getValue(), ProcessTaskStepOperationType.STEP_BACK.getValue())); + if (count == 0) { + /* 触发通知 **/ + processStepHandlerCrossoverUtil.notify(currentProcessTaskStepVo, ProcessTaskStepNotifyTriggerType.ACTIVE); + /* 执行动作 **/ + processStepHandlerCrossoverUtil.action(currentProcessTaskStepVo, ProcessTaskStepNotifyTriggerType.ACTIVE); + } else { + /* 触发通知 **/ + processStepHandlerCrossoverUtil.notify(currentProcessTaskStepVo, ProcessTaskStepNotifyTriggerType.REACTIVATE); + /* 执行动作 **/ + processStepHandlerCrossoverUtil.action(currentProcessTaskStepVo, ProcessTaskStepNotifyTriggerType.REACTIVATE); + } } else if (this.getMode().equals(ProcessStepMode.AT)) { myActive(currentProcessTaskStepVo); currentProcessTaskStepVo.setIsActive(1); -- Gitee