@@ -3,6 +3,11 @@ package com.ningdatech.pmapi.sys.manage; | |||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import java.util.concurrent.ExecutorService; | |||||
import java.util.concurrent.LinkedBlockingDeque; | |||||
import java.util.concurrent.ThreadPoolExecutor; | |||||
import java.util.concurrent.TimeUnit; | |||||
/** | /** | ||||
* @Classname CpuManage | * @Classname CpuManage | ||||
* @Description | * @Description | ||||
@@ -17,6 +22,21 @@ public class CpuManage { | |||||
private int[][] matrix = new int[1][1]; | private int[][] matrix = new int[1][1]; | ||||
private static ExecutorService executorService = null; | |||||
private static Integer THREAD_MAX = 10; | |||||
private static Integer THREAD_IDLE = 20; | |||||
private static Integer THREAD_CAPACITY = 30; | |||||
// static { | |||||
// executorService = new ThreadPoolExecutor(THREAD_MAX,THREAD_MAX, | |||||
// THREAD_IDLE, TimeUnit.SECONDS, | |||||
// new LinkedBlockingDeque<>(THREAD_CAPACITY), | |||||
// null,null); | |||||
// } | |||||
public void open(int i){ | public void open(int i){ | ||||
Double pow = Math.pow(10, i); | Double pow = Math.pow(10, i); | ||||
matrix = new int[pow.intValue()][pow.intValue()]; | matrix = new int[pow.intValue()][pow.intValue()]; | ||||
@@ -808,6 +808,10 @@ public class TodoCenterManage { | |||||
// 获取登录用户浙政钉code | // 获取登录用户浙政钉code | ||||
String employeeCode = userFullInfo.getEmployeeCode(); | String employeeCode = userFullInfo.getEmployeeCode(); | ||||
if(StringUtils.isBlank(employeeCode)){ | |||||
return PageVo.empty(); | |||||
} | |||||
// 查出项目库项目 | // 查出项目库项目 | ||||
ProjectListReq projectListReq = new ProjectListReq(); | ProjectListReq projectListReq = new ProjectListReq(); | ||||
BeanUtils.copyProperties(param, projectListReq); | BeanUtils.copyProperties(param, projectListReq); | ||||
@@ -888,6 +892,11 @@ public class TodoCenterManage { | |||||
List<ProcessInstanceVo> userSubmittedList = Lists.newArrayList(); | List<ProcessInstanceVo> userSubmittedList = Lists.newArrayList(); | ||||
Map<String, Project> projectInfoMap = Maps.newHashMap(); | Map<String, Project> projectInfoMap = Maps.newHashMap(); | ||||
if(StringUtils.isBlank(employeeCode)){ | |||||
projects = Collections.emptyList(); | |||||
} | |||||
if (CollUtil.isNotEmpty(projects)) { | if (CollUtil.isNotEmpty(projects)) { | ||||
Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); | Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v)); | ||||
// 再查出项目关联的流程实例ID | // 再查出项目关联的流程实例ID | ||||