diff --git a/src/main/java/neatlogic/framework/process/crossover/IProcessTaskStepTimeAuditCrossoverMapper.java b/src/main/java/neatlogic/framework/process/crossover/IProcessTaskStepTimeAuditCrossoverMapper.java index de9d41590baa363c7424be82846f5ad996ebf038..858ce5a53255704a795c547a6ee1e0456cc1edc2 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 52fbf2c9e851ea65559b5436350a2eb2914cf7dc..35c876f6f28569f898093d968c8af92efb5e6017 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 aec98e720669f0389e43a4fb5298355c9bf31d52..b273fbe1d66f5ed47ed35dce3b0f2f95a13e65f5 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);