From 289fe72275f8f130018b6e2d2895762577ebb944 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Mon, 16 Oct 2023 15:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=BA=E8=AE=BE=E6=96=B9=E6=A1=88=20?= =?UTF-8?q?=E4=B8=93=E5=AE=B6=E5=BB=BA=E8=AE=AE=20=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=88=B0=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statemachine/contants/RegionContant.java | 2 ++ .../organization/controller/ProcDefController.java | 2 +- .../scheduler/task/CockpitStatsStatisticsTask.java | 31 ++++++++++++++++++++-- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/contants/RegionContant.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/contants/RegionContant.java index 1067e24..43b7a5c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/contants/RegionContant.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/contants/RegionContant.java @@ -29,4 +29,6 @@ public class RegionContant { public static final String LS_LQ_CODE = "331181"; //开发区 public static final String LS_KFQ_CODE = "331199"; + + public static final String MORE_CODE = "000"; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/ProcDefController.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/ProcDefController.java index 747ab2f..29bb12d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/ProcDefController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/ProcDefController.java @@ -51,7 +51,7 @@ public class ProcDefController { @PostMapping("/save") @WebLog("单位流程配置保存") public String save(@Validated @RequestBody WflowOrgProcdefDto wflowOrgProcdefDto) { - return orgProcessModelService.saveProcess(wflowOrgProcdefDto); + return orgProcessModelService.saveProcessLs(wflowOrgProcdefDto); } @ApiOperation(value = "单位流程配置启用", notes = "单位流程配置启用") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java index 4eb1b7b..4f30290 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java @@ -10,12 +10,17 @@ import com.google.common.collect.Lists; import com.ningdatech.pmapi.common.constant.BizConst; import com.ningdatech.pmapi.common.constant.RegionConst; import com.ningdatech.pmapi.common.helper.RegionCacheHelper; +import com.ningdatech.pmapi.common.statemachine.contants.RegionContant; import com.ningdatech.pmapi.dashboard.constant.DashboardConstant; import com.ningdatech.pmapi.dashboard.model.entity.CockpitStats; import com.ningdatech.pmapi.dashboard.model.po.SecrecyPasswordGradePO; import com.ningdatech.pmapi.dashboard.service.ICockpitStatsService; import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; +import com.ningdatech.pmapi.gov.model.entity.GovBizProjectApply; +import com.ningdatech.pmapi.gov.model.entity.GovBizProjectBaseinfo; +import com.ningdatech.pmapi.gov.service.IGovBizProjectApplyService; +import com.ningdatech.pmapi.gov.service.IGovBizProjectBaseinfoService; import com.ningdatech.pmapi.performance.model.entity.PerformanceAppraisalProject; import com.ningdatech.pmapi.performance.service.IPerformanceAppraisalProjectService; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; @@ -67,6 +72,11 @@ public class CockpitStatsStatisticsTask { @Autowired private IPerformanceAppraisalProjectService performanceAppraisalProjectService; + @Autowired + private IGovBizProjectBaseinfoService baseinfoService; + + @Autowired + private IGovBizProjectApplyService applyService; /** @@ -145,6 +155,22 @@ public class CockpitStatsStatisticsTask { Project::getProjectYear, year) .in(Objects.isNull(year) && year.equals(DashboardConstant.CockpitStats.NONE_YEAR), Project::getProjectYear, Lists.newArrayList(2021,2022,2023,2024))); + List baseInfos = baseinfoService.list(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) + .eq(GovBizProjectBaseinfo::getDeleted, Boolean.FALSE) + .eq(StringUtils.isNotBlank(regionCode) && !DashboardConstant.CockpitStats.TOTAL.equals(regionCode), + GovBizProjectBaseinfo::getBaseAreaCode, regionCode + RegionContant.MORE_CODE)); + List baseProjIds = baseInfos.stream().map(b -> b.getBaseProjId()).collect(Collectors.toList()); + Integer baseProjCount = 0; + if(CollUtil.isNotEmpty(baseProjIds)){ + Long count = applyService.count(Wrappers.lambdaQuery(GovBizProjectApply.class) + .in(GovBizProjectApply::getBaseProjId, baseProjIds) + .eq(Objects.nonNull(year) && !year.equals(DashboardConstant.CockpitStats.NONE_YEAR), + GovBizProjectApply::getBaseProjSetYear, year) + .in(Objects.isNull(year) && year.equals(DashboardConstant.CockpitStats.NONE_YEAR), + GovBizProjectApply::getBaseProjSetYear, Lists.newArrayList(2021, 2022, 2023, 2024))); + baseProjCount = count.intValue(); + } + //1.项目监测 //1.1 超期在建项目 Integer overdueConstructionProjectsNum = projects.stream().filter(p -> { @@ -272,8 +298,9 @@ public class CockpitStatsStatisticsTask { return Boolean.FALSE; }).collect(Collectors.toList()).size(); cockpitStats.setTopOngoingProjectsNum(contructionNum); - //4.地图 只要放总数 取的时候 会有逻辑 - cockpitStats.setProjectsTotal(projects.size()); + //4.地图 只要放总数 取的时候 会有逻辑(也要取项目归集) + + cockpitStats.setProjectsTotal(projects.size() + baseProjCount); //5.下面项目状态数 //5.1 处于计划 (单位内部)