Browse Source

新增需求

changchun
Jinyuanyuan 2 months ago
parent
commit
66a2e32a9a
  1. 81
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java
  2. 4
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/CountStageByRefromOV.java
  3. 6
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ShowStageOV.java

81
huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java

@ -1913,7 +1913,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM
Page<HuzhouProjectinfoOV> projectAndChildInfoPageList = projectinfoMapper.getProjectAndChildInfoPageList(page, projectInfoAuthSelect);
List<HuzhouProjectinfoOV> 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<HuzhouProjectinfoM
String purchaseStage="";
String buildStage="";
String acceptanceStage="";
String reviewStage;
String verifyStage;
String approvalStage;
//申报阶段完成情况,项目申报完成2以后的是完成,待申报0的是未完成,申报中1是进行中
if(p.getStage().equals("0")){
declareStage="未完成";
@ -1945,7 +1948,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM
}else {
LambdaQueryWrapper<HuzhouPlaninfo> query1=new LambdaQueryWrapper<>();
query1.eq(HuzhouPlaninfo::getProjectId,p.getId());
query1.eq(HuzhouPlaninfo::getSuperior,"0");
query1.eq(HuzhouPlaninfo::getSuperior,level);
List<HuzhouPlaninfo> planList = planinfoService.list(query1);
List<String> 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<HuzhouProjectinfoM
valueMap.put(level,"未完成");
}
}
}
showStage.setProposalStage(valueMap.get("1"));
showStage.setPurchaseStage(valueMap.get("2"));
showStage.setBuildStage(valueMap.get("3"));
showStage.setAcceptanceStage(valueMap.get("5"));
List<HuzhouPlaninfo> reviewList = allPlanList.stream().filter(x -> x.getTaskName().equals("联合技术审查")).collect(Collectors.toList());
List<HuzhouPlaninfo> verifyList = allPlanList.stream().filter(x -> x.getTaskName().equals("集中核验")).collect(Collectors.toList());
List<HuzhouPlaninfo> 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<ShowStageOV> 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<HuzhouProjectinfoM
CountStageByRefromOV countStageByRefromOV=new CountStageByRefromOV();
List<ShowStageOV> 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 ServiceImpl<HuzhouProjectinfoM
purchaseNum=value.stream().filter(x->x.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);
}
//手动分页

4
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;

6
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;

Loading…
Cancel
Save