@@ -25,4 +25,10 @@ public class DashboardConstant { | |||
public static final String ZREO_PERCEN = "0%"; | |||
} | |||
public class CockpitStats{ | |||
//总数 | |||
public static final String TOTAL = "TOTAL"; | |||
public static final int NONE_YEAR = 0; | |||
} | |||
} |
@@ -1,6 +1,7 @@ | |||
package com.ningdatech.pmapi.dashboard.controller; | |||
import com.ningdatech.log.annotation.WebLog; | |||
import com.ningdatech.pmapi.dashboard.manage.CockpitStatsManage; | |||
import com.ningdatech.pmapi.dashboard.manage.DashboardExpertManage; | |||
import com.ningdatech.pmapi.dashboard.manage.DashboardProjectManage; | |||
import com.ningdatech.pmapi.dashboard.model.po.QueryYearPO; | |||
@@ -27,6 +28,8 @@ public class DashboardController { | |||
private final DashboardExpertManage dashboardExpertManage; | |||
private final DashboardProjectManage dashboardProjectManage; | |||
private final CockpitStatsManage cockpitStatsManage; | |||
@PostMapping("/expert-summary") | |||
@ApiOperation("专家驾驶舱统计数据") | |||
@WebLog("专家驾驶舱统计数据") | |||
@@ -57,7 +60,14 @@ public class DashboardController { | |||
@GetMapping("/project-portrait/{projectCode}") | |||
@ApiOperation("驾驶舱-项目画像接口") | |||
public DashboardProjectProtraitVO projectPortrait(@PathVariable String projectCode) { | |||
public DashboardProjectProtraitVO getProjectPortrait(@PathVariable String projectCode) { | |||
return dashboardProjectManage.getProjectPortrait(projectCode); | |||
} | |||
@GetMapping("cockpit-stats") | |||
@ApiOperation("驾驶舱-统计数据接口") | |||
public CockpitStatsVO getData(@RequestParam(required = false) String regionCode, | |||
@RequestParam(required = false) Integer year) { | |||
return cockpitStatsManage.getData(regionCode,year); | |||
} | |||
} |
@@ -0,0 +1,170 @@ | |||
package com.ningdatech.pmapi.dashboard.handle; | |||
import cn.hutool.core.bean.BeanUtil; | |||
import com.google.common.collect.Lists; | |||
import com.ningdatech.pmapi.common.constant.RegionConst; | |||
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; | |||
import com.ningdatech.pmapi.dashboard.model.entity.CockpitStats; | |||
import com.ningdatech.pmapi.dashboard.model.vo.CockpitStatsVO; | |||
import com.ningdatech.pmapi.sys.model.dto.RegionDTO; | |||
import lombok.RequiredArgsConstructor; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.stereotype.Component; | |||
import java.math.BigDecimal; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.Objects; | |||
import java.util.stream.Collectors; | |||
/** | |||
* @Classname CockpitStatsHandler | |||
* @Description | |||
* @Date 2023/10/9 14:11 | |||
* @Author PoffyZhang | |||
*/ | |||
@Component | |||
@RequiredArgsConstructor | |||
@Slf4j | |||
public class CockpitStatsHandler { | |||
private final RegionCacheHelper regionCacheHelper; | |||
public CockpitStatsVO convertCockpitStats(CockpitStats cockpitStats) { | |||
CockpitStatsVO res = BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.class); | |||
if(Objects.isNull(cockpitStats)){ | |||
return res; | |||
} | |||
//监测数据 | |||
res.setMonitorData(convertMonitor(cockpitStats)); | |||
//专家数据 | |||
res.setExpertData(convertExpertData(cockpitStats)); | |||
//顶部数据 | |||
res.setTopData(convertTopData(cockpitStats)); | |||
//地图数据 | |||
res.setMapProjectData(convertMapProjectsData(cockpitStats)); | |||
//项目项目数据 | |||
res.setStatusProjectsData(convertStatusProjectsData(cockpitStats)); | |||
//项目效益 优秀项目 | |||
res.setExcellentData(convertExcellentData(cockpitStats)); | |||
//核减信息 | |||
res.setReduceData(convertReduceData(cockpitStats)); | |||
//产出信息 | |||
res.setProduceData(convertProduceData(cockpitStats)); | |||
//绩效 | |||
res.setPerformanceData(convertPerformanceData(cockpitStats)); | |||
return res; | |||
} | |||
private CockpitStatsVO.PerformanceData convertPerformanceData(CockpitStats cockpitStats) { | |||
CockpitStatsVO.PerformanceData data = BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.PerformanceData.class); | |||
data.setPerformanceTops(convertTops(cockpitStats)); | |||
return data; | |||
} | |||
private List<CockpitStatsVO.PerformanceTop> convertTops(CockpitStats cockpitStats) { | |||
List<CockpitStatsVO.PerformanceTop> tops = Lists.newArrayList(); | |||
tops.add(new CockpitStatsVO.PerformanceTop("top1",BigDecimal.valueOf(4.92),"应用1")); | |||
tops.add(new CockpitStatsVO.PerformanceTop("top2",BigDecimal.valueOf(4.82),"应用2")); | |||
tops.add(new CockpitStatsVO.PerformanceTop("top3",BigDecimal.valueOf(4.72),"应用3")); | |||
tops.add(new CockpitStatsVO.PerformanceTop("top4",BigDecimal.valueOf(4.62),"应用4")); | |||
tops.add(new CockpitStatsVO.PerformanceTop("top5",BigDecimal.valueOf(4.52),"应用5")); | |||
return tops; | |||
} | |||
private CockpitStatsVO.ProduceData convertProduceData(CockpitStats cockpitStats) { | |||
return BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.ProduceData.class); | |||
} | |||
private CockpitStatsVO.ReduceData convertReduceData(CockpitStats cockpitStats) { | |||
CockpitStatsVO.ReduceData data = BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.ReduceData.class); | |||
data.setAmountComparisonCharts(convertAmountComparisonChart(cockpitStats)); | |||
return data; | |||
} | |||
private List<CockpitStatsVO.AmountComparisonChart> convertAmountComparisonChart(CockpitStats cockpitStats) { | |||
List<CockpitStatsVO.AmountComparisonChart> res = Lists.newArrayList(); | |||
res.add(new CockpitStatsVO.AmountComparisonChart("申报", cockpitStats.getDeclaredAmountApprove(),cockpitStats.getApprovalAmountApprove(),cockpitStats.getDifferenceApprove())); | |||
res.add(new CockpitStatsVO.AmountComparisonChart("批复", cockpitStats.getDeclaredAmountApproval(),cockpitStats.getApprovalAmountApproval(),cockpitStats.getDifferenceApproval())); | |||
res.add(new CockpitStatsVO.AmountComparisonChart("合同", cockpitStats.getDeclaredAmountContract(),cockpitStats.getApprovalAmountContract(),cockpitStats.getDifferenceContract())); | |||
return res; | |||
} | |||
private CockpitStatsVO.ExcellentData convertExcellentData(CockpitStats cockpitStats) { | |||
CockpitStatsVO.ExcellentData data = BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.ExcellentData.class); | |||
data.setExcellentProjects(Lists.newArrayList()); | |||
return data; | |||
} | |||
private CockpitStatsVO.StatusProjectsData convertStatusProjectsData(CockpitStats cockpitStats) { | |||
return BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.StatusProjectsData.class); | |||
} | |||
private List<CockpitStatsVO.MapProjectsData> convertMapProjectsData(CockpitStats cockpitStats) { | |||
List<CockpitStatsVO.MapProjectsData> mapProjectsDatas = Lists.newArrayList(); | |||
List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_COUNTY); | |||
regions = regions.stream().sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); | |||
for(RegionDTO region : regions){ | |||
CockpitStatsVO.MapProjectsData mapProjectsData = new CockpitStatsVO.MapProjectsData(); | |||
mapProjectsData.setRegionCode(region.getRegionCode()); | |||
mapProjectsData.setRegionName(region.getRegionName()); | |||
//TODO: 项目数据 | |||
mapProjectsData.setProjectsNum(0); | |||
mapProjectsDatas.add(mapProjectsData); | |||
} | |||
return mapProjectsDatas; | |||
} | |||
private CockpitStatsVO.TopData convertTopData(CockpitStats cockpitStats) { | |||
return BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.TopData.class); | |||
} | |||
private CockpitStatsVO.Expert convertExpertData(CockpitStats cockpitStats) { | |||
CockpitStatsVO.Expert expert = BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.Expert.class); | |||
expert.setExpertRegionData(buidExpertRegionData(cockpitStats)); | |||
return expert; | |||
} | |||
private List<CockpitStatsVO.ExpertRegion> buidExpertRegionData(CockpitStats cockpitStats) { | |||
List<CockpitStatsVO.ExpertRegion> regionData = Lists.newArrayList(); | |||
List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_COUNTY); | |||
regions = regions.stream().sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); | |||
for(RegionDTO region : regions){ | |||
CockpitStatsVO.ExpertRegion expertRegion = new CockpitStatsVO.ExpertRegion(); | |||
expertRegion.setRegionCode(region.getRegionCode()); | |||
expertRegion.setRegionName(region.getRegionName()); | |||
//TODO: 区域数据 | |||
expertRegion.setExpertNum(0); | |||
regionData.add(expertRegion); | |||
} | |||
return regionData; | |||
} | |||
private CockpitStatsVO.Monitor convertMonitor(CockpitStats cockpitStats) { | |||
CockpitStatsVO.Monitor monitor = BeanUtil.copyProperties(cockpitStats,CockpitStatsVO.Monitor.class); | |||
monitor.setPasswordGradeCharts(buidPasswordGradeCharts(cockpitStats)); | |||
monitor.setSecrecyGradeCharts(buidSecrecyGradeCharts(cockpitStats)); | |||
return monitor; | |||
} | |||
private List<CockpitStatsVO.SecrecyGradeChart> buidSecrecyGradeCharts(CockpitStats cockpitStats) { | |||
List<CockpitStatsVO.SecrecyGradeChart> chars = Lists.newArrayList(); | |||
chars.add(new CockpitStatsVO.SecrecyGradeChart(1,cockpitStats.getMonitorSecrecyGrade1Num())); | |||
chars.add(new CockpitStatsVO.SecrecyGradeChart(2,cockpitStats.getMonitorSecrecyGrade2Num())); | |||
chars.add(new CockpitStatsVO.SecrecyGradeChart(3,cockpitStats.getMonitorSecrecyGrade3Num())); | |||
chars.add(new CockpitStatsVO.SecrecyGradeChart(4,cockpitStats.getMonitorSecrecyGrade4Num())); | |||
chars.add(new CockpitStatsVO.SecrecyGradeChart(5,cockpitStats.getMonitorSecrecyGrade5Num())); | |||
return chars; | |||
} | |||
private List<CockpitStatsVO.PasswordGradeChart> buidPasswordGradeCharts(CockpitStats cockpitStats) { | |||
List<CockpitStatsVO.PasswordGradeChart> chars = Lists.newArrayList(); | |||
chars.add(new CockpitStatsVO.PasswordGradeChart(1,cockpitStats.getMonitorPasswordGrade1Num())); | |||
chars.add(new CockpitStatsVO.PasswordGradeChart(2,cockpitStats.getMonitorPasswordGrade2Num())); | |||
chars.add(new CockpitStatsVO.PasswordGradeChart(3,cockpitStats.getMonitorPasswordGrade3Num())); | |||
chars.add(new CockpitStatsVO.PasswordGradeChart(4,cockpitStats.getMonitorPasswordGrade4Num())); | |||
chars.add(new CockpitStatsVO.PasswordGradeChart(5,cockpitStats.getMonitorPasswordGrade5Num())); | |||
return chars; | |||
} | |||
} |
@@ -1,7 +1,10 @@ | |||
package com.ningdatech.pmapi.dashboard.helper; | |||
import cn.hutool.core.bean.BeanUtil; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.ningdatech.pmapi.dashboard.constant.AnalysisBasicConstant; | |||
import com.ningdatech.pmapi.dashboard.model.entity.CockpitStats; | |||
import com.ningdatech.pmapi.dashboard.model.vo.CockpitStatsVO; | |||
import com.ningdatech.pmapi.sys.model.entity.Region; | |||
import com.ningdatech.pmapi.sys.service.IRegionService; | |||
import lombok.RequiredArgsConstructor; | |||
@@ -10,6 +13,7 @@ import org.springframework.stereotype.Component; | |||
import java.util.HashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Objects; | |||
import java.util.stream.Collectors; | |||
/** | |||
@@ -72,6 +76,4 @@ public class DashboardHelper { | |||
map.put(8, "基层智治"); | |||
return map; | |||
} | |||
} |
@@ -0,0 +1,52 @@ | |||
package com.ningdatech.pmapi.dashboard.manage; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.ningdatech.pmapi.common.constant.BizConst; | |||
import com.ningdatech.pmapi.dashboard.constant.DashboardConstant; | |||
import com.ningdatech.pmapi.dashboard.handle.CockpitStatsHandler; | |||
import com.ningdatech.pmapi.dashboard.model.entity.CockpitStats; | |||
import com.ningdatech.pmapi.dashboard.model.vo.CockpitStatsVO; | |||
import com.ningdatech.pmapi.dashboard.service.ICockpitStatsService; | |||
import lombok.RequiredArgsConstructor; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.springframework.stereotype.Component; | |||
import java.util.Objects; | |||
/** | |||
* @Classname CockpitStatsManage | |||
* @Description | |||
* @Date 2023/10/11 17:44 | |||
* @Author PoffyZhang | |||
*/ | |||
@Component | |||
@RequiredArgsConstructor | |||
@Slf4j | |||
public class CockpitStatsManage { | |||
private final ICockpitStatsService cockpitStatsService; | |||
private final CockpitStatsHandler convertCockpitStats; | |||
/** | |||
* 驾驶舱 统计数据 | |||
* @param regionCode | |||
* @param year | |||
* @return | |||
*/ | |||
public CockpitStatsVO getData(String regionCode, Integer year) { | |||
CockpitStats cockpitStats = cockpitStatsService.getOne(Wrappers.lambdaQuery(CockpitStats.class) | |||
.eq(StringUtils.isNotBlank(regionCode), CockpitStats::getRegionCode, regionCode) | |||
.eq(StringUtils.isBlank(regionCode), CockpitStats::getRegionCode, DashboardConstant.CockpitStats.TOTAL) | |||
.eq(Objects.nonNull(year), CockpitStats::getYear, year) | |||
.eq(Objects.isNull(year), CockpitStats::getYear, DashboardConstant.CockpitStats.NONE_YEAR) | |||
.last(BizConst.LIMIT_1)); | |||
if(Objects.isNull(cockpitStats)){ | |||
return new CockpitStatsVO(); | |||
} | |||
return convertCockpitStats.convertCockpitStats(cockpitStats); | |||
} | |||
} |
@@ -0,0 +1,16 @@ | |||
package com.ningdatech.pmapi.dashboard.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.ningdatech.pmapi.dashboard.model.entity.CockpitStats; | |||
/** | |||
* <p> | |||
* Mapper 接口 | |||
* </p> | |||
* | |||
* @author zpf | |||
* @since 2023-02-05 | |||
*/ | |||
public interface CockpitStatsMapper extends BaseMapper<CockpitStats> { | |||
} |
@@ -0,0 +1,243 @@ | |||
package com.ningdatech.pmapi.dashboard.model.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
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; | |||
@Data | |||
@TableName("nd_cockpit_stats") | |||
@ApiModel(value = "驾驶舱统计数据对象", description = "") | |||
public class CockpitStats implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("主键") | |||
@TableId(type = IdType.AUTO) | |||
private Long id; | |||
@ApiModelProperty("区域code") | |||
private String regionCode; | |||
@ApiModelProperty("区域名") | |||
private String regionName; | |||
@ApiModelProperty("年份") | |||
private Integer year; | |||
@ApiModelProperty("年份") | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("项目监控-超期建设项目数") | |||
private Integer monitorOverdueConstructionProjectsNum; | |||
@ApiModelProperty("项目监控-环节滞后项目数") | |||
private Integer monitorLaggingProjectsNum; | |||
@ApiModelProperty("项目监控-预审驳回项目数") | |||
private Integer monitorRejectedPreReviewProjectsNum; | |||
@ApiModelProperty("项目监控-评审驳回项目数") | |||
private Integer monitorRejectedApproveProjectsNum; | |||
@ApiModelProperty("项目监控-验收条件未达标") | |||
private Integer monitorAcceptConditionsNotStandardsNum; | |||
@ApiModelProperty("项目监控-安全投入金额(用于算安全投入占比)") | |||
private BigDecimal monitorSafetyInputAmount; | |||
@ApiModelProperty("项目监控-总申报金额(用于算安全投入占比)") | |||
private BigDecimal monitorDeclaredAmount; | |||
@ApiModelProperty("项目监控-等保1级数量") | |||
private Integer monitorSecrecyGrade1Num; | |||
@ApiModelProperty("项目监控-等保2级数量") | |||
private Integer monitorSecrecyGrade2Num; | |||
@ApiModelProperty("项目监控-等保3级数量") | |||
private Integer monitorSecrecyGrade3Num; | |||
@ApiModelProperty("项目监控-等保4级数量") | |||
private Integer monitorSecrecyGrade4Num; | |||
@ApiModelProperty("项目监控-等保5级数量") | |||
private Integer monitorSecrecyGrade5Num; | |||
@ApiModelProperty("项目监控-密评1级数量") | |||
private Integer monitorPasswordGrade1Num; | |||
@ApiModelProperty("项目监控-密评2级数量") | |||
private Integer monitorPasswordGrade2Num; | |||
@ApiModelProperty("项目监控-密评3级数量") | |||
private Integer monitorPasswordGrade3Num; | |||
@ApiModelProperty("项目监控-密评4级数量") | |||
private Integer monitorPasswordGrade4Num; | |||
@ApiModelProperty("项目监控-密评5级数量") | |||
private Integer monitorPasswordGrade5Num; | |||
@ApiModelProperty("专家-总人数") | |||
private Integer expertTotalNum; | |||
@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 topPlanProjectsNum; | |||
@ApiModelProperty("顶部-批复项目数") | |||
private Integer topApprovalProjectsNum; | |||
@ApiModelProperty("顶部-批复金额") | |||
private BigDecimal topApprovalProjectsAmount; | |||
@ApiModelProperty("顶部-平均建设周期") | |||
private Integer topAverageConstructionPeriod; | |||
@ApiModelProperty("顶部-在建项目数") | |||
private Integer topOngoingProjectsNum; | |||
@ApiModelProperty("项目总数") | |||
private Integer projectsTotal; | |||
@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; | |||
@ApiModelProperty("优秀项目-最佳应用") | |||
private Integer excellentBestAppNum; | |||
@ApiModelProperty("优秀项目-重大应用") | |||
private Integer excellentMajorAppNum; | |||
@ApiModelProperty("优秀项目-跨域共享数") | |||
private Integer excellentCrossDomainSharingNum; | |||
@ApiModelProperty("优秀项目-跨域共享数") | |||
private Integer excellentCrossLevelSharingNum; | |||
@ApiModelProperty("核减资金") | |||
private BigDecimal reduceFundsTotal; | |||
@ApiModelProperty("驳回节约资金") | |||
private BigDecimal rejectSavingsFunds; | |||
@ApiModelProperty("申报金额-申报状态") | |||
private BigDecimal declaredAmountApprove; | |||
@ApiModelProperty("批复金额-申报状态") | |||
private BigDecimal approvalAmountApprove; | |||
@ApiModelProperty("差额-申报状态") | |||
private BigDecimal differenceApprove; | |||
@ApiModelProperty("申报金额-批复状态") | |||
private BigDecimal declaredAmountApproval; | |||
@ApiModelProperty("批复金额-批复状态") | |||
private BigDecimal approvalAmountApproval; | |||
@ApiModelProperty("差额-批复状态") | |||
private BigDecimal differenceApproval; | |||
@ApiModelProperty("申报金额-建设状态") | |||
private BigDecimal declaredAmountContract; | |||
@ApiModelProperty("批复金额-建设状态") | |||
private BigDecimal approvalAmountContract; | |||
@ApiModelProperty("差额-建设状态") | |||
private BigDecimal differenceContract; | |||
@ApiModelProperty("产出-应用数量") | |||
private Integer produceAppNum; | |||
@ApiModelProperty("产出-数据产品") | |||
private Integer produceDataNum; | |||
@ApiModelProperty("产出-组件数") | |||
private Integer produceComponentNum; | |||
@ApiModelProperty("产出-大脑要素") | |||
private Integer produceBrainElementsNum; | |||
@ApiModelProperty("绩效-项目总数量") | |||
private Integer performanceTotal; | |||
@ApiModelProperty("绩效-未评价数量") | |||
private Integer performanceTobeReviewTotal; | |||
@ApiModelProperty("绩效-已评价数量") | |||
private Integer performanceReviewedTotal; | |||
@ApiModelProperty("绩效-top1分数") | |||
private BigDecimal performanceTop1Score; | |||
@ApiModelProperty("绩效-top1名称") | |||
private String performanceTop1Name; | |||
@ApiModelProperty("绩效-top2分数") | |||
private double performanceTop2Score; | |||
@ApiModelProperty("绩效-top2名称") | |||
private String performanceTop2Name; | |||
@ApiModelProperty("绩效-top3分数") | |||
private double performanceTop3Score; | |||
@ApiModelProperty("绩效-top3名称") | |||
private String performanceTop3Name; | |||
@ApiModelProperty("绩效-top4分数") | |||
private double performanceTop4Score; | |||
@ApiModelProperty("绩效-top4名称") | |||
private String performanceTop4Name; | |||
@ApiModelProperty("绩效-top5分数") | |||
private double performanceTop5Score; | |||
@ApiModelProperty("绩效-top5名称") | |||
private String performanceTop5Name; | |||
} |
@@ -0,0 +1,335 @@ | |||
package com.ningdatech.pmapi.dashboard.model.vo; | |||
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; | |||
@Data | |||
@ApiModel(value = "驾驶舱统计数据对象VO", description = "") | |||
public class CockpitStatsVO implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("主键") | |||
private Long id; | |||
@ApiModelProperty("区域code") | |||
private String regionCode; | |||
@ApiModelProperty("区域名") | |||
private String regionName; | |||
@ApiModelProperty("年份") | |||
private Integer year; | |||
@ApiModelProperty("年份") | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("项目监测数据") | |||
private Monitor monitorData; | |||
@ApiModelProperty("项目专家数据") | |||
private Expert expertData; | |||
@ApiModelProperty("顶部数据") | |||
private TopData topData; | |||
@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; | |||
@Data | |||
public static class Monitor { | |||
@ApiModelProperty("项目监控-超期建设项目数") | |||
private Integer monitorOverdueConstructionProjectsNum; | |||
@ApiModelProperty("项目监控-环节滞后项目数") | |||
private Integer monitorLaggingProjectsNum; | |||
@ApiModelProperty("项目监控-预审驳回项目数") | |||
private Integer monitorRejectedPreReviewProjectsNum; | |||
@ApiModelProperty("项目监控-评审驳回项目数") | |||
private Integer monitorRejectedApproveProjectsNum; | |||
@ApiModelProperty("项目监控-验收条件未达标") | |||
private Integer monitorAcceptConditionsNotStandardsNum; | |||
@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 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; | |||
} | |||
@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 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; | |||
} | |||
@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; | |||
} | |||
@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; | |||
@ApiModelProperty("分数") | |||
private BigDecimal score; | |||
@ApiModelProperty("应用名称") | |||
private String appName; | |||
} | |||
} |
@@ -0,0 +1,16 @@ | |||
package com.ningdatech.pmapi.dashboard.service; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.ningdatech.pmapi.dashboard.model.entity.CockpitStats; | |||
/** | |||
* <p> | |||
* 服务类 | |||
* </p> | |||
* | |||
* @author zpf | |||
* @since 2023-05-29 | |||
*/ | |||
public interface ICockpitStatsService extends IService<CockpitStats> { | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.ningdatech.pmapi.dashboard.service.impl; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.ningdatech.pmapi.dashboard.mapper.CockpitStatsMapper; | |||
import com.ningdatech.pmapi.dashboard.model.entity.CockpitStats; | |||
import com.ningdatech.pmapi.dashboard.service.ICockpitStatsService; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* <p> | |||
* 服务实现类 | |||
* </p> | |||
* | |||
* @author zpf | |||
* @since 2023-02-05 | |||
*/ | |||
@Service | |||
public class CockpitStatsServiceImpl extends ServiceImpl<CockpitStatsMapper, CockpitStats> | |||
implements ICockpitStatsService { | |||
} |