diff --git a/huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java b/huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java index 871963c..13104df 100644 --- a/huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java +++ b/huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java @@ -1913,7 +1913,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl projectAndChildInfoPageList = projectinfoMapper.getProjectAndChildInfoPageList(page, projectInfoAuthSelect); List projectAndChildInfoList = projectAndChildInfoPageList.getRecords().stream().collect(Collectors.toList()); for(HuzhouProjectinfoOV p:projectAndChildInfoList){ -// HuzhouProjectinfoOV p = projectAndChildInfoList.stream().filter(x -> x.getId().equals("1808752649789734913")).collect(Collectors.toList()).get(0); +// HuzhouProjectinfoOV p = projectAndChildInfoList.stream().filter(x -> x.getId().equals("1783670295790608386")).collect(Collectors.toList()).get(0); ShowStageOV showStage=new ShowStageOV(); BeanUtils.copyProperties(p,showStage); String declareStage=""; @@ -1921,6 +1921,9 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl query1=new LambdaQueryWrapper<>(); query1.eq(HuzhouPlaninfo::getProjectId,p.getId()); - query1.eq(HuzhouPlaninfo::getSuperior,"0"); + query1.eq(HuzhouPlaninfo::getSuperior,level); List planList = planinfoService.list(query1); List collect = planList.stream().map(x -> x.getIsfinish()).collect(Collectors.toList()); if(collect.contains("1")||collect.contains("2")){ @@ -1954,11 +1957,54 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl reviewList = allPlanList.stream().filter(x -> x.getTaskName().equals("联合技术审查")).collect(Collectors.toList()); + List verifyList = allPlanList.stream().filter(x -> x.getTaskName().equals("集中核验")).collect(Collectors.toList()); + List approvalList = allPlanList.stream().filter(x -> x.getTaskName().equals("立项审批")).collect(Collectors.toList()); + if(reviewList.size()>0){ + String review =reviewList.get(0).getIsfinish(); + if(review.equals("2")){ + reviewStage="已完成"; + } else if (review.equals("1")) { + reviewStage="进行中"; + }else { + reviewStage="未完成"; + } + }else { + reviewStage="未完成"; + } + if(verifyList.size()>0){ + String verify =verifyList.get(0).getIsfinish(); + if(verify.equals("2")){ + verifyStage="已完成"; + } else if (verify.equals("1")) { + verifyStage="进行中"; + }else { + verifyStage="未完成"; + } + }else { + verifyStage="未完成"; + } + if(approvalList.size()>0){ + String approval =approvalList.get(0).getIsfinish(); + if(approval.equals("2")){ + approvalStage="已完成"; + } else if (approval.equals("1")) { + approvalStage="进行中"; + }else { + approvalStage="未完成"; + } + }else { + approvalStage="未完成"; + } + showStage.setReviewStage(reviewStage); + showStage.setVerifyStage(verifyStage); + showStage.setApprovalStage(approvalStage); records.add(showStage); } List sortedRecord = records.stream().filter(x -> x.getSort() != null).sorted(Comparator.comparingInt(ShowStageOV::getSort)).collect(Collectors.toList()); @@ -1979,11 +2025,16 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl value = entry.getValue(); Integer projectNum=value.size(); - Integer declareNum=0; - Integer proposalNum=0; - Integer purchaseNum=0; - Integer buildNum=0; - Integer acceptanceNum=0; + int declareNum=0; + int proposalNum=0; + int purchaseNum=0; + int buildNum=0; + int acceptanceNum=0; + int reviewNum=0; + int verifyNum=0; + int approvalNum=0; + + countStageByRefromOV.setReformName(value.get(0).getReformName()); countStageByRefromOV.setSuperLeader(value.get(0).getSuperLeader()); declareNum=value.stream().filter(x->x.getDeclareStage().equals("已完成")).collect(Collectors.toList()).size(); @@ -1991,12 +2042,18 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImplx.getPurchaseStage().equals("已完成")).collect(Collectors.toList()).size(); buildNum=value.stream().filter(x->x.getBuildStage().equals("已完成")).collect(Collectors.toList()).size(); acceptanceNum=value.stream().filter(x->x.getAcceptanceStage().equals("已完成")).collect(Collectors.toList()).size(); + reviewNum=value.stream().filter(x->x.getReviewStage().equals("已完成")).collect(Collectors.toList()).size(); + verifyNum=value.stream().filter(x->x.getVerifyStage().equals("已完成")).collect(Collectors.toList()).size(); + approvalNum=value.stream().filter(x->x.getApprovalStage().equals("已完成")).collect(Collectors.toList()).size(); countStageByRefromOV.setProjectNum(projectNum.toString()); - countStageByRefromOV.setDeclareNum(declareNum.toString()); - countStageByRefromOV.setProposalNum(proposalNum.toString()); - countStageByRefromOV.setPurchaseNum(purchaseNum.toString()); - countStageByRefromOV.setBuildNum(buildNum.toString()); - countStageByRefromOV.setAcceptanceNum(acceptanceNum.toString()); + countStageByRefromOV.setDeclareNum(Integer.toString(declareNum)); + countStageByRefromOV.setProposalNum(Integer.toString(proposalNum)); + countStageByRefromOV.setPurchaseNum(Integer.toString(purchaseNum)); + countStageByRefromOV.setBuildNum(Integer.toString(buildNum)); + countStageByRefromOV.setAcceptanceNum(Integer.toString(acceptanceNum)); + countStageByRefromOV.setReviewNum(String.valueOf(reviewNum)); + countStageByRefromOV.setVerifyNum(String.valueOf(verifyNum)); + countStageByRefromOV.setApprovalNum(String.valueOf(approvalNum)); re.add(countStageByRefromOV); } //手动分页 diff --git a/huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/CountStageByRefromOV.java b/huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/CountStageByRefromOV.java index 6479947..a2393c9 100644 --- a/huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/CountStageByRefromOV.java +++ b/huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/CountStageByRefromOV.java @@ -22,6 +22,10 @@ public class CountStageByRefromOV { private String acceptanceNum; + private String reviewNum; + private String verifyNum; + private String approvalNum; + diff --git a/huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ShowStageOV.java b/huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ShowStageOV.java index e6d87ce..e4ec48d 100644 --- a/huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ShowStageOV.java +++ b/huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ShowStageOV.java @@ -24,6 +24,12 @@ public class ShowStageOV { private String acceptanceStage; + private String reviewStage; + + private String verifyStage; + + private String approvalStage; + private Integer sort;