|
@ -1447,6 +1447,48 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
result.setCurrent(pageNo).setSize(pageSize).setRecords(records).setTotal(projectAndChildInfoPageList.getTotal()); |
|
|
result.setCurrent(pageNo).setSize(pageSize).setRecords(records).setTotal(projectAndChildInfoPageList.getTotal()); |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
public List<CountStageOV> countStage(HuzhouProjectinfo projectInfo){ |
|
|
|
|
|
List<CountStageOV> result = new ArrayList<>(); |
|
|
|
|
|
HashMap<String,Integer> stageMap=new HashMap<>(); |
|
|
|
|
|
stageMap.put("1",0); |
|
|
|
|
|
stageMap.put("2",0); |
|
|
|
|
|
stageMap.put("3",0); |
|
|
|
|
|
stageMap.put("4",0); |
|
|
|
|
|
stageMap.put("5",0); |
|
|
|
|
|
//只要入库项目
|
|
|
|
|
|
projectInfo.setType("1"); |
|
|
|
|
|
ProjectInfoAuthSelect projectInfoAuthSelect = CommonUtils.setGetProjectInfoAuth(projectInfo); |
|
|
|
|
|
Page page = new Page(1, 10000); |
|
|
|
|
|
List<HuzhouProjectinfoOV> projectAndChildInfoList = projectinfoMapper.getProjectAndChildInfoPageList(page, projectInfoAuthSelect).getRecords(); |
|
|
|
|
|
List<String> projectIds = projectAndChildInfoList.stream().map(x -> x.getId()).collect(Collectors.toList()); |
|
|
|
|
|
for(String id:projectIds){ |
|
|
|
|
|
LambdaQueryWrapper<HuzhouPlaninfo> query=new LambdaQueryWrapper<>(); |
|
|
|
|
|
query.eq(HuzhouPlaninfo::getProjectId,id); |
|
|
|
|
|
query.eq(HuzhouPlaninfo::getIsfinish,"2"); |
|
|
|
|
|
List<String[]> levelList = planinfoService.list(query).stream().map(x -> x.getTaskLevel().split("\\.")).collect(Collectors.toList()); |
|
|
|
|
|
String taskLevel; |
|
|
|
|
|
int count; |
|
|
|
|
|
if(!levelList.isEmpty()){ |
|
|
|
|
|
List<String[]> keyList = levelList.stream().filter(x -> x.length == 2).collect(Collectors.toList()); |
|
|
|
|
|
int max = keyList.stream().mapToInt(x -> Integer.parseInt(x[0])).summaryStatistics().getMax(); |
|
|
|
|
|
taskLevel=String.valueOf(max); |
|
|
|
|
|
}else { |
|
|
|
|
|
taskLevel="1"; |
|
|
|
|
|
} |
|
|
|
|
|
if(stageMap.containsKey(taskLevel)){ |
|
|
|
|
|
count=stageMap.get(taskLevel)+1; |
|
|
|
|
|
stageMap.put(taskLevel,count); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
for(Map.Entry<String,Integer> entry:stageMap.entrySet()){ |
|
|
|
|
|
CountStageOV countStageOV=new CountStageOV(); |
|
|
|
|
|
countStageOV.setName(entry.getKey()); |
|
|
|
|
|
countStageOV.setValue(entry.getValue()); |
|
|
|
|
|
result.add(countStageOV); |
|
|
|
|
|
} |
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|