|
@ -1890,7 +1890,9 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
public IPage<ShowStageOV> showStagePage(HuzhouProjectinfo projectInfo,Integer pageNo, Integer pageSize){ |
|
|
public IPage<ShowStageOV> showStagePage(HuzhouProjectinfo projectInfo,Integer pageNo, Integer pageSize, |
|
|
|
|
|
String declareStage,String reviewStage,String verifyStage, String approvalStage, |
|
|
|
|
|
String purchaseStage,String buildStage,String acceptanceStage){ |
|
|
IPage<ShowStageOV> result = new Page<>(); |
|
|
IPage<ShowStageOV> result = new Page<>(); |
|
|
List<ShowStageOV> records=new ArrayList<>(); |
|
|
List<ShowStageOV> records=new ArrayList<>(); |
|
|
HashMap<String,String> stageMap=new HashMap<>(); |
|
|
HashMap<String,String> stageMap=new HashMap<>(); |
|
@ -1915,23 +1917,19 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
for(HuzhouProjectinfoOV p:projectAndChildInfoList){ |
|
|
for(HuzhouProjectinfoOV p:projectAndChildInfoList){ |
|
|
ShowStageOV showStage=new ShowStageOV(); |
|
|
ShowStageOV showStage=new ShowStageOV(); |
|
|
BeanUtils.copyProperties(p,showStage); |
|
|
BeanUtils.copyProperties(p,showStage); |
|
|
String declareStage=""; |
|
|
String declareStageName=""; |
|
|
String proposalStage=""; |
|
|
String reviewStageName; |
|
|
String purchaseStage=""; |
|
|
String verifyStageName; |
|
|
String buildStage=""; |
|
|
String approvalStageName; |
|
|
String acceptanceStage=""; |
|
|
|
|
|
String reviewStage; |
|
|
|
|
|
String verifyStage; |
|
|
|
|
|
String approvalStage; |
|
|
|
|
|
//申报阶段完成情况,项目申报完成2以后的是完成,待申报0的是未完成,申报中1是进行中
|
|
|
//申报阶段完成情况,项目申报完成2以后的是完成,待申报0的是未完成,申报中1是进行中
|
|
|
if(p.getStage().equals("0")){ |
|
|
if(p.getStage().equals("0")){ |
|
|
declareStage="未完成"; |
|
|
declareStageName="未完成"; |
|
|
}else if(p.getStage().equals("1")){ |
|
|
}else if(p.getStage().equals("1")){ |
|
|
declareStage="进行中"; |
|
|
declareStageName="进行中"; |
|
|
}else { |
|
|
}else { |
|
|
declareStage="已完成"; |
|
|
declareStageName="已完成"; |
|
|
} |
|
|
} |
|
|
showStage.setDeclareStage(declareStage); |
|
|
showStage.setDeclareStage(declareStageName); |
|
|
//申报阶段以后的
|
|
|
//申报阶段以后的
|
|
|
//找大阶段,为2则是完成,0是未完成或未开始
|
|
|
//找大阶段,为2则是完成,0是未完成或未开始
|
|
|
//对于0的该大阶段里的小阶段,如果全是0的就是为完成,如果不全是0的就是进行中
|
|
|
//对于0的该大阶段里的小阶段,如果全是0的就是为完成,如果不全是0的就是进行中
|
|
@ -1968,57 +1966,149 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
if(reviewList.size()>0){ |
|
|
if(reviewList.size()>0){ |
|
|
String review =reviewList.get(0).getIsfinish(); |
|
|
String review =reviewList.get(0).getIsfinish(); |
|
|
if(review.equals("2")){ |
|
|
if(review.equals("2")){ |
|
|
reviewStage="已完成"; |
|
|
reviewStageName="已完成"; |
|
|
} else if (review.equals("1")) { |
|
|
} else if (review.equals("1")) { |
|
|
reviewStage="进行中"; |
|
|
reviewStageName="进行中"; |
|
|
}else { |
|
|
}else { |
|
|
reviewStage="未完成"; |
|
|
reviewStageName="未完成"; |
|
|
} |
|
|
} |
|
|
}else { |
|
|
}else { |
|
|
reviewStage="未完成"; |
|
|
reviewStageName="未完成"; |
|
|
} |
|
|
} |
|
|
if(verifyList.size()>0){ |
|
|
if(verifyList.size()>0){ |
|
|
String verify =verifyList.get(0).getIsfinish(); |
|
|
String verify =verifyList.get(0).getIsfinish(); |
|
|
if(verify.equals("2")){ |
|
|
if(verify.equals("2")){ |
|
|
verifyStage="已完成"; |
|
|
verifyStageName="已完成"; |
|
|
} else if (verify.equals("1")) { |
|
|
} else if (verify.equals("1")) { |
|
|
verifyStage="进行中"; |
|
|
verifyStageName="进行中"; |
|
|
}else { |
|
|
}else { |
|
|
verifyStage="未完成"; |
|
|
verifyStageName="未完成"; |
|
|
} |
|
|
} |
|
|
}else { |
|
|
}else { |
|
|
verifyStage="未完成"; |
|
|
verifyStageName="未完成"; |
|
|
} |
|
|
} |
|
|
if(approvalList.size()>0){ |
|
|
if(approvalList.size()>0){ |
|
|
String approval =approvalList.get(0).getIsfinish(); |
|
|
String approval =approvalList.get(0).getIsfinish(); |
|
|
if(approval.equals("2")){ |
|
|
if(approval.equals("2")){ |
|
|
approvalStage="已完成"; |
|
|
approvalStageName="已完成"; |
|
|
} else if (approval.equals("1")) { |
|
|
} else if (approval.equals("1")) { |
|
|
approvalStage="进行中"; |
|
|
approvalStageName="进行中"; |
|
|
}else { |
|
|
}else { |
|
|
approvalStage="未完成"; |
|
|
approvalStageName="未完成"; |
|
|
} |
|
|
} |
|
|
}else { |
|
|
}else { |
|
|
approvalStage="未完成"; |
|
|
approvalStageName="未完成"; |
|
|
} |
|
|
} |
|
|
showStage.setReviewStage(reviewStage); |
|
|
showStage.setReviewStage(reviewStageName); |
|
|
showStage.setVerifyStage(verifyStage); |
|
|
showStage.setVerifyStage(verifyStageName); |
|
|
showStage.setApprovalStage(approvalStage); |
|
|
showStage.setApprovalStage(approvalStageName); |
|
|
records.add(showStage); |
|
|
records.add(showStage); |
|
|
} |
|
|
} |
|
|
|
|
|
//先筛选再排序
|
|
|
|
|
|
List<ShowStageOV> detailSortedList=new ArrayList<>(); |
|
|
|
|
|
List<String> conditionList=new ArrayList<>(); |
|
|
|
|
|
//筛选条件集合
|
|
|
|
|
|
HashMap<String,String> filterMap= new HashMap<>(); |
|
|
|
|
|
filterMap.put("declareStage",declareStage); |
|
|
|
|
|
filterMap.put("reviewStage",reviewStage); |
|
|
|
|
|
filterMap.put("verifyStage",verifyStage); |
|
|
|
|
|
filterMap.put("approvalStage",approvalStage); |
|
|
|
|
|
filterMap.put("purchaseStage",purchaseStage); |
|
|
|
|
|
filterMap.put("buildStage",buildStage); |
|
|
|
|
|
filterMap.put("acceptanceStage",acceptanceStage); |
|
|
|
|
|
for (Map.Entry<String, String> entry : filterMap.entrySet()){ |
|
|
|
|
|
if (!entry.getValue().equals("")){ |
|
|
|
|
|
conditionList.add(entry.getKey()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//筛选
|
|
|
|
|
|
if(!conditionList.isEmpty()){ |
|
|
|
|
|
List<ShowStageOV> tempList=new ArrayList<>(); |
|
|
|
|
|
tempList.addAll(records); |
|
|
|
|
|
List<ShowStageOV> filteredList=new ArrayList<>(); |
|
|
|
|
|
for(String condition:conditionList){ |
|
|
|
|
|
if(condition.equals("declareStage")){ |
|
|
|
|
|
String[] splitArray = declareStage.split(","); |
|
|
|
|
|
if(splitArray.length>1){ |
|
|
|
|
|
List<String> paramsList = new ArrayList<>(Arrays.asList(splitArray)); |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> paramsList.contains(x.getDeclareStage())).collect(Collectors.toList()); |
|
|
|
|
|
}else { |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> x.getDeclareStage().equals(declareStage)).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
}else if (condition.equals("reviewStage")){ |
|
|
|
|
|
String[] splitArray = reviewStage.split(","); |
|
|
|
|
|
if(splitArray.length>1){ |
|
|
|
|
|
List<String> paramsList = new ArrayList<>(Arrays.asList(splitArray)); |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> paramsList.contains(x.getReviewStage())).collect(Collectors.toList()); |
|
|
|
|
|
}else { |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> x.getReviewStage().equals(reviewStage)).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else if (condition.equals("verifyStage")) { |
|
|
|
|
|
String[] splitArray = verifyStage.split(","); |
|
|
|
|
|
if(splitArray.length>1){ |
|
|
|
|
|
List<String> paramsList = new ArrayList<>(Arrays.asList(splitArray)); |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> paramsList.contains(x.getVerifyStage())).collect(Collectors.toList()); |
|
|
|
|
|
}else { |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> x.getVerifyStage().equals(verifyStage)).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else if (condition.equals("approvalStage")){ |
|
|
|
|
|
String[] splitArray = approvalStage.split(","); |
|
|
|
|
|
if(splitArray.length>1){ |
|
|
|
|
|
List<String> paramsList = new ArrayList<>(Arrays.asList(splitArray)); |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> paramsList.contains(x.getApprovalStage())).collect(Collectors.toList()); |
|
|
|
|
|
}else { |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> x.getApprovalStage().equals(approvalStage)).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else if (condition.equals("purchaseStage")) { |
|
|
|
|
|
String[] splitArray = purchaseStage.split(","); |
|
|
|
|
|
if(splitArray.length>1){ |
|
|
|
|
|
List<String> paramsList = new ArrayList<>(Arrays.asList(splitArray)); |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> paramsList.contains(x.getPurchaseStage())).collect(Collectors.toList()); |
|
|
|
|
|
}else { |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> x.getPurchaseStage().equals(purchaseStage)).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else if (condition.equals("buildStage")){ |
|
|
|
|
|
String[] splitArray = buildStage.split(","); |
|
|
|
|
|
if(splitArray.length>1){ |
|
|
|
|
|
List<String> paramsList = new ArrayList<>(Arrays.asList(splitArray)); |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> paramsList.contains(x.getBuildStage())).collect(Collectors.toList()); |
|
|
|
|
|
}else { |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> x.getBuildStage().equals(buildStage)).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else if (condition.equals("acceptanceStage")) { |
|
|
|
|
|
String[] splitArray = acceptanceStage.split(","); |
|
|
|
|
|
if(splitArray.length>1){ |
|
|
|
|
|
List<String> paramsList = new ArrayList<>(Arrays.asList(splitArray)); |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> paramsList.contains(x.getAcceptanceStage())).collect(Collectors.toList()); |
|
|
|
|
|
}else { |
|
|
|
|
|
filteredList = tempList.stream().filter(x -> x.getAcceptanceStage().equals(acceptanceStage)).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
tempList.clear(); |
|
|
|
|
|
tempList.addAll(filteredList); |
|
|
|
|
|
} |
|
|
|
|
|
records=filteredList; |
|
|
|
|
|
} |
|
|
List<ShowStageOV> sortedRecord = records.stream().filter(x -> x.getSort() != null).sorted(Comparator.comparingInt(ShowStageOV::getSort)).collect(Collectors.toList()); |
|
|
List<ShowStageOV> sortedRecord = records.stream().filter(x -> x.getSort() != null).sorted(Comparator.comparingInt(ShowStageOV::getSort)).collect(Collectors.toList()); |
|
|
List<ShowStageOV> commonRecord = records.stream().filter(x -> x.getSort() == null).collect(Collectors.toList()); |
|
|
List<ShowStageOV> commonRecord = records.stream().filter(x -> x.getSort() == null).collect(Collectors.toList()); |
|
|
sortedRecord.addAll(commonRecord); |
|
|
sortedRecord.addAll(commonRecord); |
|
|
|
|
|
|
|
|
//手动分页
|
|
|
//手动分页
|
|
|
int fromIndex = (pageNo - 1) * pageSize; |
|
|
int fromIndex = (pageNo - 1) * pageSize; |
|
|
List<ShowStageOV> currentPageData = sortedRecord.subList(fromIndex, Math.min(fromIndex + pageSize, records.size())); |
|
|
List<ShowStageOV> currentPageData = sortedRecord.subList(fromIndex, Math.min(fromIndex + pageSize, records.size())); |
|
|
result.setSize(pageSize).setCurrent(pageNo).setRecords(currentPageData).setTotal(projectAndChildInfoList.size()); |
|
|
result.setSize(pageSize).setCurrent(pageNo).setRecords(currentPageData).setTotal(records.size()); |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
public IPage<CountStageByRefromOV> countStageByRefrom(HuzhouProjectinfo projectInfo,Integer pageNo, Integer pageSize){ |
|
|
public IPage<CountStageByRefromOV> countStageByRefrom(HuzhouProjectinfo projectInfo,Integer pageNo, Integer pageSize){ |
|
|
IPage<CountStageByRefromOV> result = new Page<>(); |
|
|
IPage<CountStageByRefromOV> result = new Page<>(); |
|
|
List<CountStageByRefromOV> re=new ArrayList<>(); |
|
|
List<CountStageByRefromOV> re=new ArrayList<>(); |
|
|
List<ShowStageOV> records = showStagePage(projectInfo, 1, 10000).getRecords(); |
|
|
List<ShowStageOV> records = showStagePage(projectInfo, 1, 10000,"","","","","","","").getRecords(); |
|
|
Map<String, List<ShowStageOV>> reformMap = records.stream().collect(Collectors.groupingBy(x -> x.getReformName())); |
|
|
Map<String, List<ShowStageOV>> reformMap = records.stream().collect(Collectors.groupingBy(x -> x.getReformName())); |
|
|
for(Map.Entry<String, List<ShowStageOV>> entry : reformMap.entrySet()){ |
|
|
for(Map.Entry<String, List<ShowStageOV>> entry : reformMap.entrySet()){ |
|
|
CountStageByRefromOV countStageByRefromOV=new CountStageByRefromOV(); |
|
|
CountStageByRefromOV countStageByRefromOV=new CountStageByRefromOV(); |
|
|