diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/RegionConst.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/RegionConst.java index 2d28d0e..87854aa 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/RegionConst.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/RegionConst.java @@ -1,5 +1,9 @@ package com.ningdatech.pmapi.common.constant; +import com.google.common.collect.Lists; + +import java.util.List; + /** *

* RegionConst @@ -44,6 +48,24 @@ public interface RegionConst { String RC_ZJ = "330000"; String NINE_CODE_LAST = "000"; + //莲都 + String LD = "331102"; + //青田 + String QT = "331121"; + //缙云 + String JY = "331122"; + //遂昌 + String SC = "331123"; + //松阳 + String SY = "331124"; + //云和 + String YH = "331125"; + //庆元 + String QY = "331126"; + String QN = "331127"; + String LQ = "331181"; + + List LS_ARR = Lists.newArrayList(RC_LS,LS_KF,LD,QT,JY,SC,SY,YH,QY,QN,LQ); //----------------------------------------地区父级ID(缩写PID)--------------------------------------------------------- diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java new file mode 100644 index 0000000..8f518fa --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java @@ -0,0 +1,34 @@ +package com.ningdatech.pmapi.gov.utils; + +import com.ningdatech.pmapi.gov.model.vo.GovBizProjectDetailVO; +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.Objects; + +/** + * @Classname ProjectCollectionUtil + * @Description + * @Date 2023/9/14 9:07 + * @Author PoffyZhang + */ +public class ProjectConvertUtil { + + /** + * 申报项目 转为 项目归集 + * @param project + * @return + */ + public static GovBizProjectDetailVO declaredToCollection(Project project){ + GovBizProjectDetailVO projectCollection = new GovBizProjectDetailVO(); + if(Objects.isNull(project)){ + return projectCollection; + } + String projectCode = project.getProjectCode(); + String projectName = project.getProjectName(); + projectCollection.setBaseProjId(projectCode); + return projectCollection; + } + +} 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 9de2a72..edefc62 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 @@ -22,7 +22,6 @@ import com.ningdatech.pmapi.gov.enumeration.GovProjectStatusEnum; import com.ningdatech.pmapi.gov.model.entity.*; import com.ningdatech.pmapi.gov.service.*; import com.ningdatech.pmapi.meta.model.entity.ExpertTag; -import com.ningdatech.pmapi.meta.model.entity.MetaTag; import com.ningdatech.pmapi.meta.service.IExpertTagService; import com.ningdatech.pmapi.meta.service.IMetaTagService; import com.ningdatech.pmapi.performance.model.entity.PerformanceAppraisalProject; @@ -106,9 +105,6 @@ public class CockpitStatsStatisticsTask { private IGovBizProjectCimplementService cimplementService; @Autowired - private IGovOperationProjectBaseinfoService operationBaseInfoService; - - @Autowired private IEarlyWarningRecordsService earlyWarningRecordsService; private List years = Lists.newArrayList(2021,2022,2023,2024,2025); @@ -371,9 +367,12 @@ public class CockpitStatsStatisticsTask { } //2.专家统计 + List lsRegionCodes = RegionConst.LS_ARR; List experts = expertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) .eq(StringUtils.isNotBlank(regionCode) && !DashboardConstant.CockpitStats.TOTAL.equals(regionCode), - ExpertUserFullInfo::getRegionCode, regionCode)); + ExpertUserFullInfo::getRegionCode, regionCode) + .in(StringUtils.isBlank(regionCode) || DashboardConstant.CockpitStats.TOTAL.equals(regionCode), + ExpertUserFullInfo::getRegionCode,lsRegionCodes)); List goodAt = expertTagService.list(Wrappers.lambdaQuery(ExpertTag.class)); Map> tagMap = goodAt.stream()