|
@@ -16,7 +16,6 @@ import com.qmth.sop.business.util.SmsSendUtil;
|
|
|
import com.qmth.sop.common.contant.SpringContextHolder;
|
|
|
import com.qmth.sop.common.contant.SystemConstant;
|
|
|
import com.qmth.sop.common.enums.*;
|
|
|
-import com.qmth.sop.common.lock.MemoryLock;
|
|
|
import com.qmth.sop.common.util.JacksonUtil;
|
|
|
import org.activiti.engine.HistoryService;
|
|
|
import org.activiti.engine.TaskService;
|
|
@@ -182,28 +181,16 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
|
|
|
Optional.ofNullable(tfCustomFlowEntity)
|
|
|
.orElseThrow(() -> ExceptionResultEnum.FLOW_ENTITY_NO_DATA.exception());
|
|
|
//此处统一发送流程节点待办消息
|
|
|
- MemoryLock memoryLock = SpringContextHolder.getBean(MemoryLock.class);
|
|
|
- String key = tfCustomFlowEntity.getCode() + tfFlowLog.getId();
|
|
|
- boolean lock = memoryLock.lock(SystemConstant.LOCK_FLOW_TASK_MSG_PREFIX + key, key,
|
|
|
- SystemConstant.LOCK_FLOW_MSG_TIME_OUT);
|
|
|
- if (lock) {
|
|
|
- try {
|
|
|
- if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW
|
|
|
- && tfFlowLog.getApproveSetup().intValue() == 3) {
|
|
|
- Boolean finish = (Boolean) taskService.getVariable(task.getId(),
|
|
|
- SystemConstant.FINISH);
|
|
|
- if (Objects.nonNull(finish) && finish) {
|
|
|
- activitiService.sendSopFlowDoneMsg(tfCustomFlow.getType(), tfCustomFlowEntity,
|
|
|
- tfFlowLog.getApproveSetup(), Long.parseLong(task.getId()),
|
|
|
- task.getName());
|
|
|
- }
|
|
|
- } else {
|
|
|
- activitiService.sendSopFlowDoneMsg(tfCustomFlow.getType(), tfCustomFlowEntity,
|
|
|
- tfFlowLog.getApproveSetup(), Long.parseLong(task.getId()), task.getName());
|
|
|
- }
|
|
|
- } finally {
|
|
|
- memoryLock.unlock(SystemConstant.LOCK_FLOW_TASK_PREFIX + key);
|
|
|
+ if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW
|
|
|
+ && tfFlowLog.getApproveSetup().intValue() == 3) {
|
|
|
+ Boolean finish = (Boolean) taskService.getVariable(task.getId(), SystemConstant.FINISH);
|
|
|
+ if (Objects.nonNull(finish) && finish) {
|
|
|
+ activitiService.sendSopFlowDoneMsg(tfCustomFlow.getType(), tfCustomFlowEntity,
|
|
|
+ tfFlowLog.getApproveSetup(), Long.parseLong(task.getId()), task.getName());
|
|
|
}
|
|
|
+ } else {
|
|
|
+ activitiService.sendSopFlowDoneMsg(tfCustomFlow.getType(), tfCustomFlowEntity,
|
|
|
+ tfFlowLog.getApproveSetup(), Long.parseLong(task.getId()), task.getName());
|
|
|
}
|
|
|
}
|
|
|
}
|