|
|
@@ -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<GovBizProjectBaseinfo> 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<String> 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 处于计划 (单位内部) |
|
|
|