Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
WendyYang 1 year ago
parent
commit
da973b9bfe
3 changed files with 47 additions and 5 deletions
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionLimitHelperImpl.java
  2. +4
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java
  3. +42
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/RegionLimitHelperImpl.java View File

@@ -115,7 +115,7 @@ public class RegionLimitHelperImpl extends AbstractRegionLimitHelper {
regionContainsBO.setParentRegionTreeLevel(expertAdminRegion.getRegionLevel()); regionContainsBO.setParentRegionTreeLevel(expertAdminRegion.getRegionLevel());
regionContainsBOList.add(regionContainsBO); regionContainsBOList.add(regionContainsBO);
}*/ }*/
return null;
return new ArrayList<>();
} }






+ 4
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java View File

@@ -68,7 +68,7 @@ public class ExpertMetaApplyManage {
private final IExpertMetaApplyService iMetaApplyService; private final IExpertMetaApplyService iMetaApplyService;
private final IExpertDictionaryService expertDictionaryService; private final IExpertDictionaryService expertDictionaryService;


// private final IExpertAdminManageService ExpertAdminManageService;
// private final IExpertAdminManageService ExpertAdminManageService;
private final RegionCacheHelper regionCacheHelper; private final RegionCacheHelper regionCacheHelper;
private final IExpertUserFullInfoService userFullInfoService; private final IExpertUserFullInfoService userFullInfoService;
private final DictionaryCache dictionaryCache; private final DictionaryCache dictionaryCache;
@@ -89,7 +89,9 @@ public class ExpertMetaApplyManage {
ExpertAdminExpertManageQueryCmd queryCmd = buildExpertAdminExpertManageQueryCmd(req, viewRegions); ExpertAdminExpertManageQueryCmd queryCmd = buildExpertAdminExpertManageQueryCmd(req, viewRegions);
// TODO // TODO
// List<Long> filterExpertUserIdList = expertAdminManageService.filterExpertUserIdList(queryCmd); // List<Long> filterExpertUserIdList = expertAdminManageService.filterExpertUserIdList(queryCmd);
List<Long> filterExpertUserIdList = new ArrayList<>();
List<ExpertUserFullInfo> expertUserFullInfoList = userFullInfoService.list();
// TODO 获取所有的专家审核列表
List<Long> filterExpertUserIdList = expertUserFullInfoList.stream().map(ExpertUserFullInfo::getUserId).distinct().collect(Collectors.toList());
if (CollUtil.isEmpty(filterExpertUserIdList)) { if (CollUtil.isEmpty(filterExpertUserIdList)) {
return PageVo.empty(); return PageVo.empty();
} }


+ 42
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -65,6 +65,7 @@ import org.flowable.bpmn.model.*;
import org.flowable.engine.HistoryService; import org.flowable.engine.HistoryService;
import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.runtime.ActivityInstance; import org.flowable.engine.runtime.ActivityInstance;
import org.mockito.internal.matchers.CompareTo;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -122,7 +123,27 @@ public class TodoCenterManage {
} }
List<String> instCodes = userTodoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList()); List<String> instCodes = userTodoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList());


Map<String, ProcessTaskVo> taskVoMap = userTodoList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v));
List<ProcessTaskVo> resList = new ArrayList<>();
List<String> instList = new ArrayList<>();
for (ProcessTaskVo processTaskVo : userTodoList) {
Map<String, ProcessTaskVo> map = resList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v));
if (instList.contains(processTaskVo.getInstanceId())){
// 比较两个processTaskVo的endTime,保留最后处理的
ProcessTaskVo vo = map.get(processTaskVo.getInstanceId());
int compare = processTaskVo.getTaskEndTime().compareTo(vo.getTaskEndTime());
if (compare > 0){
instList.remove(processTaskVo.getInstanceId());
resList.remove(vo);
}else {
continue;
}
}
instList.add(processTaskVo.getInstanceId());
resList.add(processTaskVo);
}

Map<String, ProcessTaskVo> taskVoMap = resList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v));

//2.再分页查询项目信息 //2.再分页查询项目信息
ProjectListReq projectListReq = new ProjectListReq(); ProjectListReq projectListReq = new ProjectListReq();
projectListReq.setInstCodes(instCodes); projectListReq.setInstCodes(instCodes);
@@ -620,10 +641,29 @@ public class TodoCenterManage {
if (CollUtil.isEmpty(userIdoList)) { if (CollUtil.isEmpty(userIdoList)) {
return PageVo.empty(); return PageVo.empty();
} }

List<String> instCodes = userIdoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList()); List<String> instCodes = userIdoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList());
Map<String, ProcessTaskVo> taskVoMap = userIdoList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v));


List<ProcessTaskVo> resList = new ArrayList<>();
List<String> instList = new ArrayList<>();
for (ProcessTaskVo processTaskVo : userIdoList) {
Map<String, ProcessTaskVo> map = resList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v));
if (instList.contains(processTaskVo.getInstanceId())){
// 比较两个processTaskVo的endTime,保留最后处理的
ProcessTaskVo vo = map.get(processTaskVo.getInstanceId());
int compare = processTaskVo.getTaskEndTime().compareTo(vo.getTaskEndTime());
if (compare > 0){
instList.remove(processTaskVo.getInstanceId());
resList.remove(vo);
}else {
continue;
}
}
instList.add(processTaskVo.getInstanceId());
resList.add(processTaskVo);
}


Map<String, ProcessTaskVo> taskVoMap = resList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v));
// 分页查询项目信息 // 分页查询项目信息
ProjectListReq projectListReq = new ProjectListReq(); ProjectListReq projectListReq = new ProjectListReq();
projectListReq.setInstCodes(instCodes); projectListReq.setInstCodes(instCodes);


Loading…
Cancel
Save