|
@@ -1,25 +1,10 @@
|
|
|
package com.lc.ibps.bpmn.listener;
|
|
package com.lc.ibps.bpmn.listener;
|
|
|
|
|
|
|
|
-import java.util.Date;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
-
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
|
|
-
|
|
|
|
|
-import org.slf4j.Logger;
|
|
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
|
|
-import org.springframework.context.ApplicationListener;
|
|
|
|
|
-import org.springframework.core.Ordered;
|
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
|
-
|
|
|
|
|
import com.lc.ibps.base.core.util.BeanUtils;
|
|
import com.lc.ibps.base.core.util.BeanUtils;
|
|
|
import com.lc.ibps.base.core.util.string.StringUtil;
|
|
import com.lc.ibps.base.core.util.string.StringUtil;
|
|
|
import com.lc.ibps.bpmn.api.cmd.ActionCmd;
|
|
import com.lc.ibps.bpmn.api.cmd.ActionCmd;
|
|
|
import com.lc.ibps.bpmn.api.cmd.TaskFinishCmd;
|
|
import com.lc.ibps.bpmn.api.cmd.TaskFinishCmd;
|
|
|
-import com.lc.ibps.bpmn.api.constant.ActionType;
|
|
|
|
|
-import com.lc.ibps.bpmn.api.constant.BpmConstants;
|
|
|
|
|
-import com.lc.ibps.bpmn.api.constant.NodeStatus;
|
|
|
|
|
-import com.lc.ibps.bpmn.api.constant.TemplateType;
|
|
|
|
|
-import com.lc.ibps.bpmn.api.constant.TemplateVar;
|
|
|
|
|
|
|
+import com.lc.ibps.bpmn.api.constant.*;
|
|
|
import com.lc.ibps.bpmn.api.context.BpmnContextUtil;
|
|
import com.lc.ibps.bpmn.api.context.BpmnContextUtil;
|
|
|
import com.lc.ibps.bpmn.api.context.ContextVariableUtil;
|
|
import com.lc.ibps.bpmn.api.context.ContextVariableUtil;
|
|
|
import com.lc.ibps.bpmn.api.event.TaskCompleteEvent;
|
|
import com.lc.ibps.bpmn.api.event.TaskCompleteEvent;
|
|
@@ -29,30 +14,21 @@ import com.lc.ibps.bpmn.api.model.task.SkipRes;
|
|
|
import com.lc.ibps.bpmn.api.nat.inst.NatProInstService;
|
|
import com.lc.ibps.bpmn.api.nat.inst.NatProInstService;
|
|
|
import com.lc.ibps.bpmn.api.nat.task.NatTaskService;
|
|
import com.lc.ibps.bpmn.api.nat.task.NatTaskService;
|
|
|
import com.lc.ibps.bpmn.builder.BpmOperLogBuilder;
|
|
import com.lc.ibps.bpmn.builder.BpmOperLogBuilder;
|
|
|
-import com.lc.ibps.bpmn.domain.ActExecution;
|
|
|
|
|
-import com.lc.ibps.bpmn.domain.BpmApprove;
|
|
|
|
|
-import com.lc.ibps.bpmn.domain.BpmExec;
|
|
|
|
|
-import com.lc.ibps.bpmn.domain.BpmOperNotify;
|
|
|
|
|
-import com.lc.ibps.bpmn.domain.BpmTask;
|
|
|
|
|
-import com.lc.ibps.bpmn.domain.BpmTaskAssign;
|
|
|
|
|
-import com.lc.ibps.bpmn.domain.BpmTaskChange;
|
|
|
|
|
-import com.lc.ibps.bpmn.persistence.entity.ActExecutionPo;
|
|
|
|
|
-import com.lc.ibps.bpmn.persistence.entity.BpmApprovePo;
|
|
|
|
|
-import com.lc.ibps.bpmn.persistence.entity.BpmExecPo;
|
|
|
|
|
-import com.lc.ibps.bpmn.persistence.entity.BpmInstPo;
|
|
|
|
|
-import com.lc.ibps.bpmn.persistence.entity.BpmOperLogPo;
|
|
|
|
|
-import com.lc.ibps.bpmn.persistence.entity.BpmOperNotifyPo;
|
|
|
|
|
-import com.lc.ibps.bpmn.persistence.entity.BpmTaskPo;
|
|
|
|
|
-import com.lc.ibps.bpmn.repository.ActExecutionRepository;
|
|
|
|
|
-import com.lc.ibps.bpmn.repository.BpmApproveRepository;
|
|
|
|
|
-import com.lc.ibps.bpmn.repository.BpmExecRepository;
|
|
|
|
|
-import com.lc.ibps.bpmn.repository.BpmInstRepository;
|
|
|
|
|
-import com.lc.ibps.bpmn.repository.BpmOperNotifyRepository;
|
|
|
|
|
-import com.lc.ibps.bpmn.repository.BpmTaskChangeRepository;
|
|
|
|
|
-import com.lc.ibps.bpmn.repository.BpmTaskRepository;
|
|
|
|
|
|
|
+import com.lc.ibps.bpmn.domain.*;
|
|
|
|
|
+import com.lc.ibps.bpmn.persistence.entity.*;
|
|
|
|
|
+import com.lc.ibps.bpmn.repository.*;
|
|
|
import com.lc.ibps.bpmn.utils.BpmExecUtil;
|
|
import com.lc.ibps.bpmn.utils.BpmExecUtil;
|
|
|
import com.lc.ibps.bpmn.utils.BpmUtil;
|
|
import com.lc.ibps.bpmn.utils.BpmUtil;
|
|
|
import com.lc.ibps.bpmn.utils.NotifyUtil;
|
|
import com.lc.ibps.bpmn.utils.NotifyUtil;
|
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
|
+import org.springframework.context.ApplicationListener;
|
|
|
|
|
+import org.springframework.core.Ordered;
|
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
|
+
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
|
+import java.util.Date;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 任务完成监听器,做相应动作
|
|
* 任务完成监听器,做相应动作
|
|
@@ -97,7 +73,7 @@ public class TaskCompleteEventListener implements ApplicationListener<TaskComple
|
|
|
private BpmOperNotifyRepository bpmOperNotifyRepository;
|
|
private BpmOperNotifyRepository bpmOperNotifyRepository;
|
|
|
@Resource
|
|
@Resource
|
|
|
private BpmTaskChangeRepository bpmTaskChangeRepository;
|
|
private BpmTaskChangeRepository bpmTaskChangeRepository;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public int getOrder(){return 1;}
|
|
public int getOrder(){return 1;}
|
|
|
|
|
|
|
@@ -148,6 +124,7 @@ public class TaskCompleteEventListener implements ApplicationListener<TaskComple
|
|
|
|
|
|
|
|
// 更新流程实例
|
|
// 更新流程实例
|
|
|
// updateProcInst(cmd);
|
|
// updateProcInst(cmd);
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 完成转办代理任务
|
|
// 完成转办代理任务
|
|
|
BpmTaskChange bpmTaskChangeDomain = bpmTaskChangeRepository.newInstance();
|
|
BpmTaskChange bpmTaskChangeDomain = bpmTaskChangeRepository.newInstance();
|
|
@@ -166,7 +143,8 @@ public class TaskCompleteEventListener implements ApplicationListener<TaskComple
|
|
|
this.handleRevokedComplete(delegateTask, cmd, actionCmd);
|
|
this.handleRevokedComplete(delegateTask, cmd, actionCmd);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
private void saveLog(TaskFinishCmd cmd, IBpmTask bpmTask){
|
|
private void saveLog(TaskFinishCmd cmd, IBpmTask bpmTask){
|
|
|
// 流程操作日志
|
|
// 流程操作日志
|
|
|
BpmOperLogPo po = BpmOperLogBuilder.build(bpmTask, cmd);
|
|
BpmOperLogPo po = BpmOperLogBuilder.build(bpmTask, cmd);
|
|
@@ -606,5 +584,4 @@ public class TaskCompleteEventListener implements ApplicationListener<TaskComple
|
|
|
bpmTaskAssignDomain.delByTask(taskId);
|
|
bpmTaskAssignDomain.delByTask(taskId);
|
|
|
bpmTaskDomain.delete(taskId);
|
|
bpmTaskDomain.delete(taskId);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|