@@ -31,4 +31,39 @@ public class DashboardConstant { | |||
public static final String TOTAL = "TOTAL"; | |||
public static final int NONE_YEAR = 0; | |||
} | |||
public class Expert { | |||
public static final String ACCOUNT_STATUS_OK = "available"; | |||
public static final String DISTRIBUTION_SHENG = "省维度"; | |||
public static final String DISTRIBUTION_SHI = "市维度"; | |||
public static final String NETWORK_CODE = "1030000"; | |||
public static final String XINCHUANG_CODE = "2040000"; | |||
public static final String FANGAN_CODE = "2030000"; | |||
public static final String JISHU_CODE = "2010000"; | |||
public static final String DANGZHENG_CODE = "1020000"; | |||
public static final String RUANYING_CODE = "2020000"; | |||
public static final String CAIWU_CODE = "5600000"; | |||
public static final String XINCHUANG_OTTHER_CODE = "5500000"; | |||
public static final String XINXIHUA_CODE = "5400000"; | |||
public static final String EXPERT_TYPE = "expert_type"; | |||
public static final String EXPERT_TYPE_INNER = "300000"; | |||
public static final String EXPERT_TYPE_OUT = "300001"; | |||
public static final String EXPERT_LEVEL_ZHENGGAO = "900000"; | |||
public static final String EXPERT_LEVEL_FUGAO = "900001"; | |||
public static final String EXPERT_LEVEL_MID = "900002"; | |||
public static final String EXPERT_LEVEL_CHUJI = "900003"; | |||
public static final String EXPERT_LEVEL_NULL = "900004"; | |||
} | |||
} |
@@ -1,5 +1,6 @@ | |||
package com.ningdatech.pmapi.dashboard.controller; | |||
import com.ningdatech.pmapi.dashboard.manage.ExpertStatisticsManage; | |||
import com.ningdatech.pmapi.dashboard.manage.FundStatisticsManage; | |||
import com.ningdatech.pmapi.dashboard.model.vo.*; | |||
import io.swagger.annotations.Api; | |||
@@ -21,15 +22,17 @@ public class StatisticsController { | |||
private final FundStatisticsManage fundStatisticsManage; | |||
private final ExpertStatisticsManage expertStatisticsManage; | |||
@GetMapping("/fund") | |||
@ApiOperation("项目资金统计") | |||
public FundStatisticsVO fund(@RequestParam(required = false) Integer year) { | |||
return fundStatisticsManage.fund(year); | |||
return fundStatisticsManage.statistics(year); | |||
} | |||
@GetMapping("/expert") | |||
@ApiOperation("专家统计") | |||
public ExpertStatisticsVO expert(@RequestParam(required = false) Integer year) { | |||
return new ExpertStatisticsVO(); | |||
return expertStatisticsManage.statistics(year); | |||
} | |||
} |
@@ -0,0 +1,351 @@ | |||
package com.ningdatech.pmapi.dashboard.manage; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.google.common.collect.Lists; | |||
import com.google.common.collect.Maps; | |||
import com.google.common.collect.Sets; | |||
import com.ningdatech.pmapi.common.constant.RegionConst; | |||
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; | |||
import com.ningdatech.pmapi.dashboard.constant.DashboardConstant; | |||
import com.ningdatech.pmapi.dashboard.model.vo.ExpertStatisticsVO; | |||
import com.ningdatech.pmapi.expert.constant.ExpertUserInfoStepEnum; | |||
import com.ningdatech.pmapi.expert.entity.ExpertIntentionWorkRegion; | |||
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; | |||
import com.ningdatech.pmapi.expert.service.IExpertIntentionWorkRegionService; | |||
import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; | |||
import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; | |||
import com.ningdatech.pmapi.meta.model.dto.TagDTO; | |||
import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; | |||
import com.ningdatech.pmapi.meta.model.entity.ExpertTag; | |||
import com.ningdatech.pmapi.meta.service.IExpertDictionaryService; | |||
import com.ningdatech.pmapi.meta.service.IExpertTagService; | |||
import com.ningdatech.pmapi.meta.service.IMetaDictionaryService; | |||
import com.ningdatech.pmapi.meta.service.IMetaTagService; | |||
import com.ningdatech.pmapi.sys.model.dto.RegionDTO; | |||
import lombok.RequiredArgsConstructor; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.stereotype.Component; | |||
import java.time.LocalDateTime; | |||
import java.util.*; | |||
import java.util.concurrent.CompletableFuture; | |||
import java.util.concurrent.ForkJoinPool; | |||
import java.util.stream.Collectors; | |||
/** | |||
* @Classname ExpertStatisticsManage | |||
* @Description | |||
* @Date 2023/12/04 17:44 | |||
* @Author PoffyZhang | |||
*/ | |||
@Component | |||
@RequiredArgsConstructor | |||
@Slf4j | |||
public class ExpertStatisticsManage { | |||
private final RegionCacheHelper regionCacheHelper; | |||
private final IExpertUserFullInfoService userFullInfoService; | |||
private final IExpertIntentionWorkRegionService expertIntentionWorkRegionService; | |||
private final IExpertTagService expertTagService; | |||
private final IMetaTagService metaTagService; | |||
private final IExpertDictionaryService expertDictionaryService; | |||
private final IMetaDictionaryService metaDictionaryService; | |||
private Integer[] years = new Integer[]{LocalDateTime.now().getYear()-2, | |||
LocalDateTime.now().getYear()-1,LocalDateTime.now().getYear(), | |||
LocalDateTime.now().getYear()+1,LocalDateTime.now().getYear()+2}; | |||
private Integer[] threeYears = new Integer[]{LocalDateTime.now().getYear()-2, | |||
LocalDateTime.now().getYear()-1,LocalDateTime.now().getYear()}; | |||
private String[] SHENGWEIDU = new String[]{DashboardConstant.Expert.NETWORK_CODE, | |||
DashboardConstant.Expert.DANGZHENG_CODE,DashboardConstant.Expert.FANGAN_CODE, | |||
DashboardConstant.Expert.JISHU_CODE,DashboardConstant.Expert.XINCHUANG_CODE, | |||
DashboardConstant.Expert.RUANYING_CODE}; | |||
private String[] SHIWEIDU = new String[]{DashboardConstant.Expert.CAIWU_CODE, | |||
DashboardConstant.Expert.XINXIHUA_CODE,DashboardConstant.Expert.XINCHUANG_OTTHER_CODE}; | |||
private String[] TYPES = new String[]{DashboardConstant.Expert.EXPERT_TYPE_INNER, | |||
DashboardConstant.Expert.EXPERT_TYPE_OUT}; | |||
private String[] LEVELS = new String[]{DashboardConstant.Expert.EXPERT_LEVEL_ZHENGGAO, | |||
DashboardConstant.Expert.EXPERT_LEVEL_FUGAO,DashboardConstant.Expert.EXPERT_LEVEL_MID, | |||
DashboardConstant.Expert.EXPERT_LEVEL_CHUJI,DashboardConstant.Expert.EXPERT_LEVEL_NULL}; | |||
/** | |||
* 专家统计 | |||
* @param year | |||
* @return | |||
*/ | |||
public ExpertStatisticsVO statistics(Integer year) { | |||
List<ExpertUserFullInfo> experts = userFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) | |||
.eq(ExpertUserFullInfo::getExpertAccountStatus, DashboardConstant.Expert.ACCOUNT_STATUS_OK) | |||
.eq(ExpertUserFullInfo::getUserInfoStep, ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey())); | |||
List<ExpertIntentionWorkRegion> intentionWorkRegions = expertIntentionWorkRegionService.list(); | |||
List<ExpertTag> expertTags = expertTagService.list(); | |||
List<TagDTO> tags = metaTagService.queryAll(); | |||
List<DictionaryDTO> dictionaries = metaDictionaryService.queryAll(); | |||
Set<String> code = Sets.newHashSet(); | |||
Map<String, String> dictionMap = dictionaries.stream().filter(d -> code.add(d.getDictionaryCode())) | |||
.collect(Collectors.toMap(DictionaryDTO::getDictionaryCode, DictionaryDTO::getName)); | |||
List<ExpertDictionary> expertDictionaries = expertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class) | |||
.eq(ExpertDictionary::getExpertInfoField, DashboardConstant.Expert.EXPERT_TYPE)); | |||
ExpertStatisticsVO res = new ExpertStatisticsVO(); | |||
CompletableFuture.allOf( | |||
CompletableFuture.runAsync(() -> { | |||
//选择的年份去计算的数据 | |||
yearCompleteExpert(res,year,experts,intentionWorkRegions,expertTags, | |||
tags,expertDictionaries,dictionMap); | |||
}, ForkJoinPool.commonPool()), | |||
CompletableFuture.runAsync(() -> { | |||
//近三年 | |||
threeYearsCompleteExpert(res,experts); | |||
}, ForkJoinPool.commonPool()), | |||
CompletableFuture.runAsync(() -> { | |||
//近一年 | |||
lastYearsCompleteExpert(res,experts); | |||
}, ForkJoinPool.commonPool()) | |||
).join(); | |||
return res; | |||
} | |||
/** | |||
* 近一年 | |||
* @param res | |||
*/ | |||
private void lastYearsCompleteExpert(ExpertStatisticsVO res,List<ExpertUserFullInfo> experts) { | |||
List<ExpertUserFullInfo> lastYear = experts.stream().filter(expert -> { | |||
if (expert.getCreateOn().compareTo(LocalDateTime.now().plusYears(-1)) >= 0 && | |||
expert.getCreateOn().compareTo(LocalDateTime.now()) <= 0) { | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
}).collect(Collectors.toList()); | |||
res.setThisYearAdded(lastYear.size()); | |||
} | |||
/** | |||
* 近三年 | |||
* @param res | |||
*/ | |||
private void threeYearsCompleteExpert(ExpertStatisticsVO res,List<ExpertUserFullInfo> experts) { | |||
List<ExpertStatisticsVO.ExpertData> threeYearsAdds = Lists.newArrayList(); | |||
for (Integer year : threeYears){ | |||
ExpertStatisticsVO.ExpertData expert = new ExpertStatisticsVO.ExpertData(); | |||
expert.setName(year.toString()); | |||
expert.setCode(year.toString()); | |||
expert.setNum(experts.stream().filter(e -> { | |||
if (Objects.nonNull(e.getCreateOn()) && year.equals(e.getCreateOn().getYear())) { | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
}).collect(Collectors.toList()).size()); | |||
threeYearsAdds.add(expert); | |||
} | |||
res.setThreeYearsAdded(threeYearsAdds); | |||
} | |||
/** | |||
* 选择年份或者全部 | |||
* @param res | |||
* @param year | |||
*/ | |||
private void yearCompleteExpert(ExpertStatisticsVO res, Integer year, | |||
List<ExpertUserFullInfo> experts,List<ExpertIntentionWorkRegion> intentionWorkRegions, | |||
List<ExpertTag> expertTags,List<TagDTO> tags,List<ExpertDictionary> expertDictionaries, | |||
Map<String, String> dictionMap) { | |||
res.setTotal(experts.size()); | |||
Set<Long> userSet = Sets.newHashSet(); | |||
Map<Long, ExpertUserFullInfo> expertMap = experts.stream().filter(e -> userSet.add(e.getUserId())) | |||
.collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); | |||
List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_COUNTY) | |||
.stream().sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); | |||
//是否要筛选年 | |||
experts = experts.stream().filter(e -> { | |||
if (Objects.nonNull(e.getCreateOn()) && | |||
(Objects.isNull(year) || year.equals(e.getCreateOn().getYear()))) { | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
}).collect(Collectors.toList()); | |||
//计算区域专家 | |||
computeRegionExperts(res, intentionWorkRegions, expertMap, regions); | |||
//计算专家特长 | |||
computeRegionDistribution(res,experts,expertTags,tags); | |||
//计算专家类型 | |||
computeTypes(res,experts,expertDictionaries,dictionMap); | |||
//计算专家等级 | |||
computeLevels(res,experts,expertDictionaries,dictionMap); | |||
} | |||
/** | |||
* 计算 专家等级 | |||
* @param res | |||
* @param experts | |||
*/ | |||
private void computeLevels(ExpertStatisticsVO res, List<ExpertUserFullInfo> experts, | |||
List<ExpertDictionary> expertDictionaries,Map<String, String> dictionMap) { | |||
List<ExpertStatisticsVO.ExpertData> levels = Lists.newArrayList(); | |||
Set<Long> userSets = Sets.newHashSet(); | |||
Map<Long, ExpertUserFullInfo> expertUserFullInfoMap = experts.stream() | |||
.filter(u -> userSets.add(u.getUserId())) | |||
.collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); | |||
Map<String, List<ExpertDictionary>> dictionaryMap = expertDictionaries.stream() | |||
.collect(Collectors.groupingBy(ExpertDictionary::getDictionaryCode)); | |||
for(String levelCode : LEVELS){ | |||
ExpertStatisticsVO.ExpertData expertData = new ExpertStatisticsVO.ExpertData(); | |||
if(dictionaryMap.containsKey(levelCode)){ | |||
List<ExpertDictionary> dictionaries = dictionaryMap.get(levelCode); | |||
expertData.setNum(dictionaries.stream().filter(d -> { | |||
if(expertUserFullInfoMap.containsKey(d.getUserId())){ | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
}).collect(Collectors.toList()).size()); | |||
} | |||
expertData.setName(dictionMap.get(levelCode)); | |||
expertData.setCode(levelCode); | |||
levels.add(expertData); | |||
} | |||
res.setLevels(levels); | |||
} | |||
/** | |||
* 计算 专家类型 | |||
* @param res | |||
* @param experts | |||
*/ | |||
private void computeTypes(ExpertStatisticsVO res, List<ExpertUserFullInfo> experts, | |||
List<ExpertDictionary> expertDictionaries,Map<String, String> dictionMap) { | |||
List<ExpertStatisticsVO.ExpertData> types = Lists.newArrayList(); | |||
Set<Long> userSets = Sets.newHashSet(); | |||
Map<Long, ExpertUserFullInfo> expertUserFullInfoMap = experts.stream() | |||
.filter(u -> userSets.add(u.getUserId())) | |||
.collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); | |||
Map<String, List<ExpertDictionary>> dictionaryMap = expertDictionaries.stream() | |||
.collect(Collectors.groupingBy(ExpertDictionary::getDictionaryCode)); | |||
for(String typeCode : TYPES){ | |||
ExpertStatisticsVO.ExpertData expertData = new ExpertStatisticsVO.ExpertData(); | |||
if(dictionaryMap.containsKey(typeCode)){ | |||
List<ExpertDictionary> dictionaries = dictionaryMap.get(typeCode); | |||
expertData.setNum(dictionaries.stream().filter(d -> { | |||
if(expertUserFullInfoMap.containsKey(d.getUserId())){ | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
}).collect(Collectors.toList()).size()); | |||
} | |||
expertData.setName(dictionMap.get(typeCode)); | |||
expertData.setCode(typeCode); | |||
types.add(expertData); | |||
} | |||
res.setTypes(types); | |||
} | |||
//计算专家特长 | |||
private void computeRegionDistribution(ExpertStatisticsVO res, List<ExpertUserFullInfo> experts, | |||
List<ExpertTag> expertTags, List<TagDTO> tags) { | |||
Set<Long> userSets = Sets.newHashSet(); | |||
Map<Long, ExpertUserFullInfo> expertUserFullInfoMap = experts.stream() | |||
.filter(u -> userSets.add(u.getUserId())) | |||
.collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); | |||
Map<String,List<ExpertStatisticsVO.ExpertData>> typeDistribution = Maps.newHashMap(); | |||
Map<String, List<ExpertTag>> tagsMap = | |||
expertTags.stream().filter(e -> Objects.nonNull(e.getTagCode())) | |||
.collect(Collectors.groupingBy(ExpertTag::getTagCode)); | |||
Set<String> tagSets = Sets.newHashSet(); | |||
Map<String, String> tagNameMap = tags.stream().filter(t -> tagSets.add(t.getTagCode())) | |||
.collect(Collectors.toMap(TagDTO::getTagCode, TagDTO::getTagName)); | |||
//1.省维度 | |||
List<ExpertStatisticsVO.ExpertData> shengWeidu = Lists.newArrayList(); | |||
for(String code : SHENGWEIDU){ | |||
shengWeidu.add(getExpertData(expertUserFullInfoMap, | |||
tagsMap, tagNameMap, code)); | |||
} | |||
//2.市维度 | |||
List<ExpertStatisticsVO.ExpertData> shiWeidu = Lists.newArrayList(); | |||
for(String code : SHIWEIDU){ | |||
shiWeidu.add(getExpertData(expertUserFullInfoMap, | |||
tagsMap, tagNameMap, code)); | |||
} | |||
typeDistribution.put(DashboardConstant.Expert.DISTRIBUTION_SHENG,shengWeidu); | |||
typeDistribution.put(DashboardConstant.Expert.DISTRIBUTION_SHI,shiWeidu); | |||
res.setTypeDistribution(typeDistribution); | |||
} | |||
/** | |||
* 包装 | |||
* @param expertUserFullInfoMap | |||
* @param tagsMap | |||
* @param tagNameMap | |||
* @param code | |||
* @return | |||
*/ | |||
private static ExpertStatisticsVO.ExpertData getExpertData(Map<Long, ExpertUserFullInfo> expertUserFullInfoMap, Map<String, List<ExpertTag>> tagsMap, Map<String, String> tagNameMap, String code) { | |||
ExpertStatisticsVO.ExpertData data = new ExpertStatisticsVO.ExpertData(); | |||
data.setCode(code); | |||
data.setName(tagNameMap.get(code)); | |||
if(tagsMap.containsKey(code)){ | |||
List<ExpertTag> ets = tagsMap.get(code); | |||
data.setNum(ets.stream().filter(e -> { | |||
if(expertUserFullInfoMap.containsKey(e.getUserId())){ | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
}).collect(Collectors.toList()).size()); | |||
} | |||
return data; | |||
} | |||
//计算区域专家 | |||
private static void computeRegionExperts(ExpertStatisticsVO res, List<ExpertIntentionWorkRegion> intentionWorkRegions, Map<Long, ExpertUserFullInfo> expertMap, List<RegionDTO> regions) { | |||
List<ExpertStatisticsVO.ExpertData> regionExpert = Lists.newArrayList(); | |||
for(RegionDTO region : regions){ | |||
ExpertStatisticsVO.ExpertData expertData = new ExpertStatisticsVO.ExpertData(); | |||
expertData.setName(region.getRegionName()); | |||
expertData.setCode(region.getRegionCode()); | |||
expertData.setNum(intentionWorkRegions.stream().filter(w -> { | |||
if(Objects.nonNull(w) && Objects.nonNull(w.getRegionCode()) && | |||
w.getRegionCode().equals(region.getRegionCode()) && | |||
expertMap.containsKey(w.getUserId())){ | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
}).collect(Collectors.toList()).size()); | |||
regionExpert.add(expertData); | |||
} | |||
res.setRegionExpert(regionExpert); | |||
} | |||
} |
@@ -58,7 +58,7 @@ public class FundStatisticsManage { | |||
* @param year | |||
* @return | |||
*/ | |||
public FundStatisticsVO fund(Integer year) { | |||
public FundStatisticsVO statistics(Integer year) { | |||
FundStatisticsVO res = new FundStatisticsVO(); | |||
CompletableFuture.allOf( | |||
@@ -1,14 +1,10 @@ | |||
package com.ningdatech.pmapi.dashboard.model.vo; | |||
import com.ningdatech.pmapi.dashboard.model.entity.CockpitApplication; | |||
import com.ningdatech.pmapi.portrait.model.entity.Tag; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.math.BigDecimal; | |||
import java.time.LocalDateTime; | |||
import java.util.List; | |||
import java.util.Map; | |||
@@ -17,359 +13,39 @@ import java.util.Map; | |||
public class ExpertStatisticsVO implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("区域code") | |||
private String regionCode; | |||
@ApiModelProperty("入驻专家总数") | |||
private Integer total = 0; | |||
@ApiModelProperty("区域名") | |||
private String regionName; | |||
@ApiModelProperty("近一年新增专家数") | |||
private Integer thisYearAdded = 0; | |||
@ApiModelProperty("年份") | |||
private Integer year; | |||
@ApiModelProperty("活跃专家数") | |||
private Integer active = 0; | |||
@ApiModelProperty("年份") | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("各区县专家数") | |||
private List<ExpertData> regionExpert; | |||
@ApiModelProperty("项目监测数据") | |||
private Monitor monitorData; | |||
@ApiModelProperty("近三年专家数") | |||
private List<ExpertData> threeYearsAdded; | |||
@ApiModelProperty("项目专家数据") | |||
private Expert expertData; | |||
@ApiModelProperty("专家类型分布") | |||
private Map<String,List<ExpertData>> typeDistribution; | |||
@ApiModelProperty("顶部数据") | |||
private TopData topData; | |||
@ApiModelProperty("专家类型") | |||
private List<ExpertData> types; | |||
@ApiModelProperty("地图-项目数") | |||
private List<MapProjectsData> mapProjectData; | |||
@ApiModelProperty("状态-项目数") | |||
private StatusProjectsData statusProjectsData; | |||
@ApiModelProperty("优秀项目数据") | |||
private ExcellentData excellentData; | |||
@ApiModelProperty("核减数据") | |||
private ReduceData reduceData; | |||
@ApiModelProperty("产出数据") | |||
private ProduceData produceData; | |||
@ApiModelProperty("绩效数据") | |||
private PerformanceData performanceData; | |||
@ApiModelProperty("最佳应用or重大应用") | |||
private Map<String,List<CockpitApplication>> appDatas; | |||
@ApiModelProperty("数据质量区域信息") | |||
private List<QualityData> qualityDatas; | |||
@Data | |||
public static class Monitor { | |||
@ApiModelProperty("项目监控-超期建设项目数") | |||
private Integer monitorOverdueConstructionProjectsNum; | |||
@ApiModelProperty("项目监控-超期建设项目-增长比例") | |||
private String monitorOverdueConstructionProjectsRise; | |||
@ApiModelProperty("项目监控-环节滞后项目数") | |||
private Integer monitorLaggingProjectsNum; | |||
@ApiModelProperty("项目监控-环节滞后项目-增长比例") | |||
private String monitorLaggingProjectsRise; | |||
@ApiModelProperty("项目监控-预审驳回项目数") | |||
private Integer monitorRejectedPreReviewProjectsNum; | |||
@ApiModelProperty("项目监控-预审驳回项目-增长比例") | |||
private String monitorRejectedPreReviewProjectsRise; | |||
@ApiModelProperty("项目监控-评审驳回项目数") | |||
private Integer monitorRejectedApproveProjectsNum; | |||
@ApiModelProperty("项目监控-评审驳回项目-增长比例") | |||
private String monitorRejectedApproveProjectsRise; | |||
@ApiModelProperty("项目监控-验收条件未达标") | |||
private Integer monitorAcceptConditionsNotStandardsNum; | |||
@ApiModelProperty("项目监控-验收条件未达标-增长比例") | |||
private String monitorAcceptConditionsNotStandardsRise; | |||
@ApiModelProperty("项目监控-安全投入占比 图") | |||
private List<SafetyInput> monitorSafetyInputRate; | |||
@ApiModelProperty("项目监控-等保等级图") | |||
private List<SecrecyGradeChart> secrecyGradeCharts; | |||
@ApiModelProperty("项目监控-密保等级图") | |||
private List<PasswordGradeChart> passwordGradeCharts; | |||
} | |||
@Data | |||
public static class SecrecyGradeChart { | |||
public SecrecyGradeChart (Integer level,Integer num){ | |||
this.level = level; | |||
this.num = num; | |||
} | |||
@ApiModelProperty("等保等级") | |||
private Integer level; | |||
@ApiModelProperty("等保数量") | |||
private Integer num; | |||
} | |||
@Data | |||
public static class PasswordGradeChart { | |||
public PasswordGradeChart (Integer level,Integer num){ | |||
this.level = level; | |||
this.num = num; | |||
} | |||
@ApiModelProperty("密保等级") | |||
private Integer level; | |||
@ApiModelProperty("密保数量") | |||
private Integer num; | |||
} | |||
@Data | |||
public static class SafetyInput { | |||
private Integer year; | |||
private BigDecimal rate; | |||
private Integer amount; | |||
} | |||
@Data | |||
public static class Expert { | |||
@ApiModelProperty("专家-各区域专家数") | |||
private List<ExpertRegion> expertRegionData; | |||
@ApiModelProperty("专家-总人数") | |||
private Integer expertTotalNum; | |||
@ApiModelProperty("专家-总人数-包含这些标签的专家总人数") | |||
private Integer specialExpertNum; | |||
@ApiModelProperty("专家-方案合理性 数量") | |||
private Integer expertPlanRationalityNum; | |||
@ApiModelProperty("专家-计数可行性评估 数量") | |||
private Integer expertTechnicalFeasibilityAssessmentNum; | |||
@ApiModelProperty("专家-信创 数量") | |||
private Integer expertXinchuangNum; | |||
@ApiModelProperty("专家-软硬件核价 数量") | |||
private Integer expertSoftHardPricingNum; | |||
@ApiModelProperty("专家-党政信息 数量") | |||
private Integer expertPartyGovInfoNum; | |||
@ApiModelProperty("专家-网络安全 数量") | |||
private Integer expertNetworkSecurityNum; | |||
@ApiModelProperty("专家-信息化专家 数量") | |||
private Integer expertPromotionInfoTechnologyNum; | |||
@ApiModelProperty("专家-财务专家 数量") | |||
private Integer expertFinancialNum; | |||
@ApiModelProperty("专家-信创专家 数量") | |||
private Integer expertXinchuangOtherNum; | |||
} | |||
@Data | |||
public static class ExpertRegion { | |||
@ApiModelProperty("区域CODE") | |||
private String regionCode; | |||
@ApiModelProperty("区域名字") | |||
private String regionName; | |||
@ApiModelProperty("专家数量") | |||
private Integer expertNum; | |||
} | |||
@Data | |||
public static class TopData { | |||
@ApiModelProperty("顶部-计划项目数") | |||
private Integer topPlanProjectsNum; | |||
@ApiModelProperty("顶部-批复项目数") | |||
private Integer topApprovalProjectsNum; | |||
@ApiModelProperty("顶部-批复金额") | |||
private BigDecimal topApprovalProjectsAmount; | |||
@ApiModelProperty("顶部-平均建设周期") | |||
private Integer topAverageConstructionPeriod; | |||
@ApiModelProperty("顶部-在建项目数") | |||
private Integer topOngoingProjectsNum; | |||
} | |||
@Data | |||
public static class MapProjectsData { | |||
@ApiModelProperty("区域CODE") | |||
private String regionCode; | |||
@ApiModelProperty("区域名字") | |||
private String regionName; | |||
@ApiModelProperty("项目数量") | |||
private Integer projectsNum; | |||
} | |||
@Data | |||
public static class QualityData { | |||
@ApiModelProperty("区域CODE") | |||
private String regionCode; | |||
@ApiModelProperty("区域名字") | |||
private String regionName; | |||
@ApiModelProperty("质量分数") | |||
private BigDecimal quality = BigDecimal.ZERO; | |||
} | |||
@Data | |||
public static class StatusProjectsData { | |||
@ApiModelProperty("项目总数-计划状态") | |||
private Integer projectsTotalPlan; | |||
@ApiModelProperty("项目总数-申报状态") | |||
private Integer projectsTotalApply; | |||
@ApiModelProperty("项目总数-审批状态") | |||
private Integer projectsTotalApprove; | |||
@ApiModelProperty("项目总数-建设状态") | |||
private Integer projectsTotalConstruction; | |||
@ApiModelProperty("项目总数-验收状态") | |||
private Integer projectsTotalAccept; | |||
@ApiModelProperty("项目总数-运维状态") | |||
private Integer projectsTotalOperation; | |||
@ApiModelProperty("项目总数-绩效状态") | |||
private Integer projectsTotalPerformance; | |||
@ApiModelProperty("项目总数-注销状态") | |||
private Integer projectsTotalLogOff; | |||
} | |||
@Data | |||
public static class ExcellentData { | |||
@ApiModelProperty("优秀项目-最佳应用") | |||
private Integer excellentBestAppNum; | |||
@ApiModelProperty("优秀项目-重大应用") | |||
private Integer excellentMajorAppNum; | |||
@ApiModelProperty("优秀项目-跨域共享数") | |||
private Integer excellentCrossDomainSharingNum; | |||
@ApiModelProperty("优秀项目-跨域共享数") | |||
private Integer excellentCrossLevelSharingNum; | |||
@ApiModelProperty("优秀项目-列表") | |||
private List<ExcellentProjects> excellentProjects; | |||
} | |||
@Data | |||
public static class ExcellentProjects { | |||
@ApiModelProperty("项目CODE") | |||
private String projectCode; | |||
@ApiModelProperty("项目名") | |||
private String projectName; | |||
@ApiModelProperty("项目简介") | |||
private String projectIntroduction; | |||
@ApiModelProperty("标签") | |||
private List<Tag> tags; | |||
} | |||
@ApiModelProperty("专家等级") | |||
private List<ExpertData> levels; | |||
@Data | |||
public static class ReduceData { | |||
@ApiModelProperty("核减资金") | |||
private BigDecimal reduceFundsTotal; | |||
@ApiModelProperty("驳回节约资金") | |||
private BigDecimal rejectSavingsFunds; | |||
@ApiModelProperty("资金对比图") | |||
private List<AmountComparisonChart> amountComparisonCharts; | |||
} | |||
@Data | |||
public static class AmountComparisonChart { | |||
public AmountComparisonChart (String statusName,BigDecimal declaredAmount,BigDecimal approvalAmount,BigDecimal differenceAmount){ | |||
this.statusName = statusName; | |||
this.declaredAmount = declaredAmount; | |||
this.approvalAmount = approvalAmount; | |||
this.differenceAmount = differenceAmount; | |||
} | |||
@ApiModelProperty("状态名") | |||
private String statusName; | |||
@ApiModelProperty("申报金额") | |||
private BigDecimal declaredAmount; | |||
@ApiModelProperty("批复金额") | |||
private BigDecimal approvalAmount; | |||
@ApiModelProperty("差额") | |||
private BigDecimal differenceAmount; | |||
} | |||
@Data | |||
public static class ProduceData { | |||
@ApiModelProperty("产出-应用数量") | |||
private Integer produceAppNum; | |||
@ApiModelProperty("产出-数据产品") | |||
private Integer produceDataNum; | |||
@ApiModelProperty("产出-组件数") | |||
private Integer produceComponentNum; | |||
@ApiModelProperty("产出-大脑要素") | |||
private Integer produceBrainElementsNum; | |||
@ApiModelProperty("产出-大脑要素") | |||
private Integer produceBrainModelNum; | |||
} | |||
@Data | |||
public static class PerformanceData { | |||
@ApiModelProperty("绩效-项目总数量") | |||
private Integer performanceTotal; | |||
@ApiModelProperty("绩效-未评价数量") | |||
private Integer performanceTobeReviewTotal; | |||
@ApiModelProperty("绩效-已评价数量") | |||
private Integer performanceReviewedTotal; | |||
@ApiModelProperty("绩效-top数据") | |||
private List<PerformanceTop> performanceTops; | |||
} | |||
@Data | |||
public static class PerformanceTop { | |||
public PerformanceTop (String topName,BigDecimal score,String appName){ | |||
this.topName = topName; | |||
this.score = score; | |||
this.appName = appName; | |||
} | |||
@ApiModelProperty("绩效-top") | |||
private String topName; | |||
public static class ExpertData { | |||
@ApiModelProperty("名称") | |||
private String name; | |||
@ApiModelProperty("分数") | |||
private BigDecimal score; | |||
@ApiModelProperty("编码") | |||
private String code; | |||
@ApiModelProperty("应用名称") | |||
private String appName; | |||
@ApiModelProperty("数量") | |||
private Integer num = 0; | |||
} | |||
} |
@@ -394,13 +394,13 @@ public class CockpitStatsStatisticsTask { | |||
Map<Long, List<ExpertTag>> tagMap = goodAt.stream() | |||
.collect(Collectors.groupingBy(ExpertTag::getUserId)); | |||
String networkCode = "1030000"; | |||
String xinchuangCode = "2040000"; | |||
String fanganCode = "2030000"; | |||
String jishuCode = "2010000"; | |||
String dangzhengCode = "1020000"; | |||
String ruanyingCode = "2020000"; | |||
String caiwuCode = "5600000"; | |||
String networkCode = DashboardConstant.Expert.NETWORK_CODE; | |||
String xinchuangCode = DashboardConstant.Expert.XINCHUANG_CODE; | |||
String fanganCode = DashboardConstant.Expert.FANGAN_CODE; | |||
String jishuCode = DashboardConstant.Expert.JISHU_CODE; | |||
String dangzhengCode = DashboardConstant.Expert.DANGZHENG_CODE; | |||
String ruanyingCode = DashboardConstant.Expert.RUANYING_CODE; | |||
String caiwuCode = DashboardConstant.Expert.CAIWU_CODE; | |||
List<String> specialTags = Lists.newArrayList(networkCode,xinchuangCode,fanganCode,jishuCode, | |||
dangzhengCode,ruanyingCode,caiwuCode); | |||