From f2e939d697d59b3f80eb0e5b773aa0fa3b96831a Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 8 Dec 2023 11:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=20=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E4=BE=9D=E6=8D=AE=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/enumeration/ExportOptionEnum.java | 2 +- .../pmapi/common/util/ExcelDownUtil.java | 2 +- .../dashboard/controller/StatisticsController.java | 14 ++++++++ .../manage/PerformanceStatisticsManage.java | 33 ++++++++++++++++++ .../model/vo/PerformanceStatisticsVO.java | 40 ++++++++++++++++++++++ 5 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/PerformanceStatisticsManage.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/PerformanceStatisticsVO.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java index e246973..689021f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java @@ -69,7 +69,7 @@ public enum ExportOptionEnum { projectIntroduction(24, "项目简介"), - buildBasis(25, "立项依据"), + baseBasisEstablish(25, "立项依据说明"), buildLevel(26, "建设层级"), diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java index 4d6fb17..4952536 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java @@ -217,7 +217,7 @@ public class ExcelDownUtil { List nameList = CollUtils.fieldList(fileArray, w -> w.getString(CommonConst.FILE_NAME)); columnValue = String.join(StrPool.COMMA, nameList); } else { - columnValue = String.valueOf(jsonObject.get(column.toString())); + columnValue = jsonObject.getString(column.toString()); } if (CommonConst.NULL.equals(columnValue)) { columnValue = ""; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/controller/StatisticsController.java b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/controller/StatisticsController.java index f6e0e5e..f25556e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/controller/StatisticsController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/controller/StatisticsController.java @@ -29,6 +29,8 @@ public class StatisticsController { private final EarlyWarningStatisticsManage earlyWarningStatisticsManage; + private final PerformanceStatisticsManage performanceStatisticsManage; + @GetMapping("/fund") @ApiOperation("项目资金统计") public FundStatisticsVO fund(@RequestParam(required = false) Integer year) { @@ -58,4 +60,16 @@ public class StatisticsController { public EarlyWarningStatisticsVO earlyWarning(@RequestParam(required = false) Integer year) { return earlyWarningStatisticsManage.statistics(year); } + + @GetMapping("/performance") + @ApiOperation("绩效统计") + public PerformanceStatisticsVO performance(@RequestParam(required = false) Integer year) { + return performanceStatisticsManage.statistics(year); + } + + @GetMapping("/project") + @ApiOperation("项目统计") + public EarlyWarningStatisticsVO project(@RequestParam(required = false) Integer year) { + return earlyWarningStatisticsManage.statistics(year); + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/PerformanceStatisticsManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/PerformanceStatisticsManage.java new file mode 100644 index 0000000..f194c7d --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/PerformanceStatisticsManage.java @@ -0,0 +1,33 @@ +package com.ningdatech.pmapi.dashboard.manage; + +import com.google.common.collect.Lists; +import com.ningdatech.pmapi.dashboard.model.vo.PerformanceStatisticsVO; +import com.ningdatech.pmapi.performance.service.IPerformanceAppraisalProjectService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; +import java.time.LocalDateTime; +import java.util.List; + +/** + * @Classname PerformanceStatisticsManage + * @Description + * @Date 2023/12/05 17:44 + * @Author PoffyZhang + */ +@Component +@RequiredArgsConstructor +@Slf4j +public class PerformanceStatisticsManage { + + private final IPerformanceAppraisalProjectService performanceAppraisalProjectService; + + List thisTwoYears = Lists.newArrayList(LocalDateTime.now().getYear() - 1 + ,LocalDateTime.now().getYear()); + + public PerformanceStatisticsVO statistics(Integer year) { + PerformanceStatisticsVO res = new PerformanceStatisticsVO(); + + return res; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/PerformanceStatisticsVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/PerformanceStatisticsVO.java new file mode 100644 index 0000000..95c08fe --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/PerformanceStatisticsVO.java @@ -0,0 +1,40 @@ +package com.ningdatech.pmapi.dashboard.model.vo; + +import com.ningdatech.pmapi.common.model.entity.DataDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +@Data +@ApiModel(value = "绩效统计", description = "") +public class PerformanceStatisticsVO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("当前已完成项目总数") + private Integer finishedTotalNow = 0; + + @ApiModelProperty("当前已完成自评总数") + private Integer finishedSelfNow = 0; + + @ApiModelProperty("当前已完成复评总数") + private Integer finishedReAppraisalNow = 0; + + @ApiModelProperty("当前需整改项目总数") + private Integer rectifyTotalNow = 0; + + @ApiModelProperty("是否评价") + private List regionMeetings; + + @ApiModelProperty("预审/验收 会议情况") + private List meetingTypes; + + @ApiModelProperty("各区县不通过率") + private List notPassRegionMeetings; + + @ApiModelProperty("各部门不通过top10") + private List notPassTop10; +} \ No newline at end of file