From d9f4958b526ef31fc673dc1651a57bdd3bf35691 Mon Sep 17 00:00:00 2001 From: huangzj <826100833@qq.com> Date: Thu, 23 Mar 2023 15:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=AF=8D=E7=BA=BF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../njcn/process/pojo/vo/SurveyPlanExcel.java | 4 +-- .../impl/RGeneralSurveyPlanPOServiceImpl.java | 32 ++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java index 15e4a2a3c..60e6f895e 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/vo/SurveyPlanExcel.java @@ -38,8 +38,8 @@ public class SurveyPlanExcel implements Serializable { @Excel(name = "变电站数量", width = 15) private Long subCount; - @Excel(name = "母线数量", width = 15) - private Long busCount; +// @Excel(name = "母线数量", width = 15) +// private Long busCount; @Excel(name = "计划状态", width = 15) private String status; diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java index 23467dc85..d15a87b73 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java @@ -325,22 +325,46 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))). - map (RGeneralSurveyPlanDetail::getBusbarId).distinct ( ).count ( ); +// long Busbarcount = rGeneralSurveyPlanDetails.stream ( ). +// filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))). +// map (RGeneralSurveyPlanDetail::getBusbarId).distinct ( ).count ( ); long Subcount = rGeneralSurveyPlanDetails.stream ( ). filter (surveyPlanDetail -> Objects.equals (surveyPlanDetail.getPlanNo ( ), temp.getPlanNo ( ))). map (RGeneralSurveyPlanDetail::getSubId).distinct ( ).count ( ); - surveyPlanExcel.setBusCount (Busbarcount); +// surveyPlanExcel.setBusCount (Busbarcount); surveyPlanExcel.setSubCount (Subcount); surveyPlanExcel.setOrgNo (pvTerminalTreeVOMap.get (surveyPlanExcel.getOrgNo ( ))); + surveyPlanExcel.setStatus (getPlanStatus(temp.getStatus ())); surveyPlanExcels.add (surveyPlanExcel); }); return surveyPlanExcels; } + private String getPlanStatus(int status) { + String result = ""; + switch (status) { + case 0: + result = "新建"; + break; + case 1: + result = "待审核"; + break; + case 2: + result = "审核未通过"; + break; + case 3: + result = "已发布"; + break; + case 4: + result = "已完成"; + break; + default: + result = ""; + } + return result; + } /** * @param questionQueryParm * @Description: querySurveyPlanOnQuestion