包头工作流bug修复
This commit is contained in:
parent
08b8204893
commit
459df86558
@ -36,7 +36,6 @@ import com.wflow.workflow.config.WflowGlobalVarDef;
|
|||||||
import com.wflow.workflow.extension.cmd.RecallToHisApprovalNodeCmd;
|
import com.wflow.workflow.extension.cmd.RecallToHisApprovalNodeCmd;
|
||||||
import com.wflow.workflow.service.*;
|
import com.wflow.workflow.service.*;
|
||||||
import com.wflow.workflow.utils.FlowableUtils;
|
import com.wflow.workflow.utils.FlowableUtils;
|
||||||
import com.zhgd.xmgl.security.SecurityUtil;
|
|
||||||
import com.zhgd.xmgl.security.util.SecurityUtils;
|
import com.zhgd.xmgl.security.util.SecurityUtils;
|
||||||
import com.zhgd.xmgl.tenant.TenantContextHolder;
|
import com.zhgd.xmgl.tenant.TenantContextHolder;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -63,7 +62,6 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -75,9 +73,6 @@ import java.util.stream.Collectors;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Service("processTaskService")
|
@Service("processTaskService")
|
||||||
public class ProcessTaskServiceImpl implements ProcessTaskService {
|
public class ProcessTaskServiceImpl implements ProcessTaskService {
|
||||||
@Autowired
|
|
||||||
private WflowCcmeReadMapper ccmeReadMapper;
|
|
||||||
|
|
||||||
//超时缓存,数据缓存20秒,用来存储审批人防止flowable高频调用
|
//超时缓存,数据缓存20秒,用来存储审批人防止flowable高频调用
|
||||||
private static final TimedCache<String, List<String>> taskCache = CacheUtil.newTimedCache(20000);
|
private static final TimedCache<String, List<String>> taskCache = CacheUtil.newTimedCache(20000);
|
||||||
//用来存储正在处理的节点,防止并发处理
|
//用来存储正在处理的节点,防止并发处理
|
||||||
@ -87,6 +82,8 @@ public class ProcessTaskServiceImpl implements ProcessTaskService {
|
|||||||
taskCache.schedulePrune(10000);
|
taskCache.schedulePrune(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WflowCcmeReadMapper ccmeReadMapper;
|
||||||
@Lazy
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProcessInstanceService processService;
|
private ProcessInstanceService processService;
|
||||||
@ -650,7 +647,7 @@ public class ProcessTaskServiceImpl implements ProcessTaskService {
|
|||||||
refuseListPage.getRecords().forEach(o -> {
|
refuseListPage.getRecords().forEach(o -> {
|
||||||
o.setIsRefuse(true);
|
o.setIsRefuse(true);
|
||||||
});
|
});
|
||||||
List<ProcessInstanceVo> ccMeInstanceList = ccMeInstance.getRecords();
|
List<ProcessInstanceVo> ccMeInstanceList = ccMeInstance.getRecords().size() > 0 ? ccMeInstance.getRecords() : new ArrayList<>();
|
||||||
ccMeInstanceList.addAll(refuseListPage.getRecords());
|
ccMeInstanceList.addAll(refuseListPage.getRecords());
|
||||||
List<ProcessTaskVo> ccMeList = ccMeInstanceList.stream().map(o -> {
|
List<ProcessTaskVo> ccMeList = ccMeInstanceList.stream().map(o -> {
|
||||||
ProcessTaskVo vo = new ProcessTaskVo();
|
ProcessTaskVo vo = new ProcessTaskVo();
|
||||||
@ -666,7 +663,7 @@ public class ProcessTaskServiceImpl implements ProcessTaskService {
|
|||||||
o.setStatus("审批进行中");
|
o.setStatus("审批进行中");
|
||||||
o.setResult(ProcessResultEnum.RUNNING);
|
o.setResult(ProcessResultEnum.RUNNING);
|
||||||
});
|
});
|
||||||
List<ProcessTaskVo> allRecords = userTodoList.getRecords();
|
List<ProcessTaskVo> allRecords = userTodoList.getRecords().size() > 0 ? userTodoList.getRecords() : new ArrayList<>();
|
||||||
allRecords.addAll(ccMeList);
|
allRecords.addAll(ccMeList);
|
||||||
allRecords.sort((o1, o2) -> o2.getCreateTime().compareTo(o1.getCreateTime()));
|
allRecords.sort((o1, o2) -> o2.getCreateTime().compareTo(o1.getCreateTime()));
|
||||||
Page<ProcessTaskVo> page = new Page<>();
|
Page<ProcessTaskVo> page = new Page<>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user