From dfb9911c97069106d301f686e9330eabbab33360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=AE=9D=E9=BE=99?= Date: Fri, 26 Jun 2026 17:06:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnalysisSectorTalentController.java | 101 ++++++++++++ .../ruoyi/cms/domain/vo/QueryResultVo.java | 4 + .../cms/domain/vo/SectorTalentOverviewVo.java | 79 +++++++++ .../vo/SectorTalentProsperityIndexVo.java | 27 ++++ .../cms/domain/vo/SectorTalentTreadVo.java | 48 ++++++ .../service/AnalysisSectorTalentService.java | 75 +++++++++ ...rIndustryEmploymentMonitorServiceImpl.java | 2 +- .../impl/AnalysisSectorTalentServiceImpl.java | 151 ++++++++++++++++++ 8 files changed, 486 insertions(+), 1 deletion(-) create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/AnalysisSectorTalentController.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentOverviewVo.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentProsperityIndexVo.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentTreadVo.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/AnalysisSectorTalentService.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisSectorTalentServiceImpl.java diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/AnalysisSectorTalentController.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/AnalysisSectorTalentController.java new file mode 100644 index 0000000..e65c929 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/controller/AnalysisSectorTalentController.java @@ -0,0 +1,101 @@ +package com.ruoyi.cms.controller; + +import com.ruoyi.cms.domain.dto.QueryParamDto; +import com.ruoyi.cms.service.AnalysisSectorTalentService; +import com.ruoyi.common.core.domain.AjaxResult; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 产业发展与人才供需分析 + * + * @author 马宝龙 + * @date 2026/6/26 + */ +@RestController +@RequestMapping("/analysis/sectorTalent") +@RequiredArgsConstructor +public class AnalysisSectorTalentController { + + private final AnalysisSectorTalentService analysisSectorTalentService; + + /** + * 数据总览 + * + * @param dto 查询参数 + * @return 数据总览 + */ + @PostMapping("/overview") + public AjaxResult overview(@RequestBody QueryParamDto dto) { + return AjaxResult.success(analysisSectorTalentService.overview(dto)); + } + + /** + * 产业景气指数 + * + * @param dto 查询参数 + * @return 产业景气指数 + */ + @PostMapping("/sectorProsperityIndex") + public AjaxResult sectorProsperityIndex(@RequestBody QueryParamDto dto) { + return AjaxResult.success(analysisSectorTalentService.sectorProsperityIndex(dto)); + } + + /** + * 产业发展趋势分析 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + @PostMapping("/sectorDevelopTrend") + public AjaxResult sectorDevelopTrend(@RequestBody QueryParamDto dto) { + return AjaxResult.success(analysisSectorTalentService.sectorDevelopTrend(dto)); + } + + /** + * 人才需求结构分析 + * + * @param dto 查询参数 + * @return 结果列表 + */ + @PostMapping("/talentDemandStructure") + public AjaxResult talentDemandStructure(@RequestBody QueryParamDto dto) { + return AjaxResult.success(analysisSectorTalentService.talentDemandStructure(dto)); + } + + /** + * 高校毕业生人才供给专业分布 + * + * @param dto 查询参数 + * @return 结果列表 + */ + @PostMapping("/talentSupplyDistribution") + public AjaxResult talentSupplyDistribution(@RequestBody QueryParamDto dto) { + return AjaxResult.success(analysisSectorTalentService.talentSupplyDistribution(dto)); + } + + /** + * 职业培训技能人才等级分布 + * + * @param dto 查询参数 + * @return 结果列表 + */ + @PostMapping("/talentSkillLevelDistribution") + public AjaxResult talentSkillLevelDistribution(@RequestBody QueryParamDto dto) { + return AjaxResult.success(analysisSectorTalentService.talentSkillLevelDistribution(dto)); + } + + /** + * 人才供需匹配度评估 + * + * @param dto 查询参数 + * @return 结果列表 + */ + @PostMapping("/talentSupplyDemandMatchingDegree") + public AjaxResult talentSupplyDemandMatchingDegree(@RequestBody QueryParamDto dto) { + return AjaxResult.success(analysisSectorTalentService.talentSupplyDemandMatchingDegree(dto)); + } +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/QueryResultVo.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/QueryResultVo.java index bba767e..019c67a 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/QueryResultVo.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/QueryResultVo.java @@ -60,4 +60,8 @@ public class QueryResultVo implements Serializable { * 其他金额占比 */ private BigDecimal anotherAmountPercentage; + /** + * 比率 + */ + private BigDecimal rate; } diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentOverviewVo.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentOverviewVo.java new file mode 100644 index 0000000..b8fae9b --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentOverviewVo.java @@ -0,0 +1,79 @@ +package com.ruoyi.cms.domain.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 产业发展与人才供需分析 - 数据总览 + * + * @author 马宝龙 + * @date 2026/6/25 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class SectorTalentOverviewVo implements Serializable { + private static final long serialVersionUID = -8478307079421272922L; + /** + * 产业产值 + */ + private BigDecimal sectorAmount; + /** + * 产业产值环比 + */ + private BigDecimal sectorAmountMom; + /** + * 企业新增投资额 + */ + private BigDecimal companyNewInvestmentAmount; + /** + * 企业新增投资额环比 + */ + private BigDecimal companyNewInvestmentAmountMom; + /** + * 人才需求 + */ + private Long talentDemandCount; + /** + * 人才需求环比 + */ + private BigDecimal talentDemandCountMom; + /** + * 人才供给 + */ + private Long talentSupplyCount; + /** + * 人才供给环比 + */ + private BigDecimal talentSupplyCountMom; + /** + * 供需匹配度 + */ + private BigDecimal supplyDemandMatchingDegree; + /** + * 供需匹配度环比 + */ + private BigDecimal supplyDemandMatchingDegreeMom; + /** + * 人才缺口 + */ + private Long talentGapCount; + /** + * 人才缺口环比 + */ + private BigDecimal talentGapCountMom; + /** + * 技能培训人数 + */ + private Long skillTrainCount; + /** + * 人才缺口环比 + */ + private BigDecimal skillTrainCountMom; +} diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentProsperityIndexVo.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentProsperityIndexVo.java new file mode 100644 index 0000000..f12d49e --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentProsperityIndexVo.java @@ -0,0 +1,27 @@ +package com.ruoyi.cms.domain.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 产业发展与人才供需分析 - 产业景气指数 + * + * @author 马宝龙 + * @date 2026/6/25 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class SectorTalentProsperityIndexVo implements Serializable { + private static final long serialVersionUID = 6863893452822473926L; + /** + * 景气指数 + */ + private BigDecimal prosperityIndex; +} diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentTreadVo.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentTreadVo.java new file mode 100644 index 0000000..626024b --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/SectorTalentTreadVo.java @@ -0,0 +1,48 @@ +package com.ruoyi.cms.domain.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 产业发展与人才供需分析 - 产业发展趋势分析 + * + * @author 马宝龙 + * @date 2026/6/25 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class SectorTalentTreadVo implements Serializable { + private static final long serialVersionUID = -8478307079421272922L; + /** + * 编码 + */ + private String code; + /** + * 描述 + */ + private String desc; + /** + * 岗位需求 + */ + private Long jobDemandCount; + /** + * 产业投资 + */ + private BigDecimal sectorInvestmentAmount; + /** + * 产业增加值 + */ + private BigDecimal sectorIncreaseValue; + /** + * 增长率 + */ + private BigDecimal growthRate; + +} diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/AnalysisSectorTalentService.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/AnalysisSectorTalentService.java new file mode 100644 index 0000000..e346792 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/AnalysisSectorTalentService.java @@ -0,0 +1,75 @@ +package com.ruoyi.cms.service; + +import com.ruoyi.cms.domain.dto.QueryParamDto; +import com.ruoyi.cms.domain.vo.QueryResultVo; +import com.ruoyi.cms.domain.vo.SectorTalentOverviewVo; +import com.ruoyi.cms.domain.vo.SectorTalentProsperityIndexVo; +import com.ruoyi.cms.domain.vo.SectorTalentTreadVo; + +import java.util.List; + +/** + * 产业发展与人才供需分析 + * + * @author 马宝龙 + * @date 2026/6/26 + */ +public interface AnalysisSectorTalentService { + + + /** + * 数据总览 + * + * @param queryParamDto 查询参数 + * @return 数据总览 + */ + SectorTalentOverviewVo overview(QueryParamDto queryParamDto); + + /** + * 产业景气指数 + * + * @param queryParamDto 查询参数 + * @return 产业景气指数 + */ + SectorTalentProsperityIndexVo sectorProsperityIndex(QueryParamDto queryParamDto); + + /** + * 产业发展趋势分析 + * + * @param queryParamDto 查询参数 + * @return 趋势列表 + */ + List sectorDevelopTrend(QueryParamDto queryParamDto); + + /** + * 人才需求结构分析 + * + * @param dto 查询参数 + * @return 结果列表 + */ + List talentDemandStructure(QueryParamDto dto); + + /** + * 高校毕业生人才供给专业分布 + * + * @param dto 查询参数 + * @return 结果列表 + */ + List talentSupplyDistribution(QueryParamDto dto); + + /** + * 职业培训技能人才等级分布 + * + * @param dto 查询参数 + * @return 结果列表 + */ + List talentSkillLevelDistribution(QueryParamDto dto); + + /** + * 人才供需匹配度评估 + * + * @param dto 查询参数 + * @return 结果列表 + */ + List talentSupplyDemandMatchingDegree(QueryParamDto dto); +} \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisMajorIndustryEmploymentMonitorServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisMajorIndustryEmploymentMonitorServiceImpl.java index 96c72c7..e2a80bc 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisMajorIndustryEmploymentMonitorServiceImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisMajorIndustryEmploymentMonitorServiceImpl.java @@ -77,7 +77,7 @@ public class AnalysisMajorIndustryEmploymentMonitorServiceImpl implements Analys .code(industry.getT1()) .desc(industry.getT2()) .count((long) Math.floor(Math.random() * 10000) + 1) - .amount(BigDecimal.valueOf(Math.random() * 5 + 2).setScale(1, RoundingMode.HALF_UP)) + .rate(BigDecimal.valueOf(Math.random() * 30 + 2).setScale(1, RoundingMode.HALF_UP)) .build()); } return list; diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisSectorTalentServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisSectorTalentServiceImpl.java new file mode 100644 index 0000000..bdd48c2 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisSectorTalentServiceImpl.java @@ -0,0 +1,151 @@ +package com.ruoyi.cms.service.impl; + +import com.ruoyi.cms.constant.CommonConstant; +import com.ruoyi.cms.domain.dto.QueryParamDto; +import com.ruoyi.cms.domain.vo.QueryResultVo; +import com.ruoyi.cms.domain.vo.SectorTalentOverviewVo; +import com.ruoyi.cms.domain.vo.SectorTalentProsperityIndexVo; +import com.ruoyi.cms.domain.vo.SectorTalentTreadVo; +import com.ruoyi.cms.service.AnalysisSectorTalentService; +import com.ruoyi.cms.util.MathUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; +import reactor.util.function.Tuple2; +import reactor.util.function.Tuples; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * 产业发展与人才供需分析 + * + * @author 马宝龙 + * @date 2026/6/26 + */ +@Service +@Validated +@Slf4j +public class AnalysisSectorTalentServiceImpl implements AnalysisSectorTalentService { + + @Override + public SectorTalentOverviewVo overview(QueryParamDto dto) { + return SectorTalentOverviewVo.builder() + .sectorAmount(BigDecimal.valueOf(156.8)) + .sectorAmountMom(BigDecimal.valueOf(5.2)) + .companyNewInvestmentAmount(BigDecimal.valueOf(23.5)) + .companyNewInvestmentAmountMom(BigDecimal.valueOf(8.1)) + .talentDemandCount(32000L) + .talentDemandCountMom(BigDecimal.valueOf(6.5)) + .talentSupplyCount(28500L) + .talentSupplyCountMom(BigDecimal.valueOf(4.3)) + .supplyDemandMatchingDegree(BigDecimal.valueOf(85.6)) + .supplyDemandMatchingDegreeMom(BigDecimal.valueOf(2.1)) + .talentGapCount(3500L) + .talentGapCountMom(BigDecimal.valueOf(-3.2)) + .skillTrainCount(12000L) + .skillTrainCountMom(BigDecimal.valueOf(12.5)) + .build(); + } + + @Override + public SectorTalentProsperityIndexVo sectorProsperityIndex(QueryParamDto dto) { + return SectorTalentProsperityIndexVo.builder() + .prosperityIndex(BigDecimal.valueOf(112.5)) + .build(); + } + + @Override + public List sectorDevelopTrend(QueryParamDto dto) { + List list = new ArrayList<>(); + for (int i = 0; i < 12; i++) { + list.add(SectorTalentTreadVo.builder() + .code(i + 1 + "") + .desc(i + 1 + "月") + .jobDemandCount((long) Math.floor(Math.random() * 20000) + 1000) + .sectorInvestmentAmount(BigDecimal.valueOf(Math.random() * 100 + 10).setScale(2, + RoundingMode.HALF_UP)) + .sectorIncreaseValue(BigDecimal.valueOf(Math.random() * 50 + 5).setScale(2, RoundingMode.HALF_UP)) + .growthRate(BigDecimal.valueOf(Math.random() * 15 + 1).setScale(1, RoundingMode.HALF_UP)) + .build()); + } + return list; + } + + @Override + public List talentDemandStructure(QueryParamDto dto) { + List list = new ArrayList<>(); + + for (Tuple2 industry : CommonConstant.INDUSTRY_LIST) { + list.add(QueryResultVo.builder() + .code(industry.getT1()) + .desc(industry.getT2()) + .count((long) Math.floor(Math.random() * 100000) + 1) + .build()); + } + MathUtil.calculatePercentage(list); + return list; + } + + @Override + public List talentSupplyDistribution(QueryParamDto dto) { + List list = new ArrayList<>(); + List> majorList = + Collections.unmodifiableList(new ArrayList<>(Arrays.asList( + Tuples.of("1", "机械制造"), + Tuples.of("2", "电子信息"), + Tuples.of("3", "管理类"), + Tuples.of("4", "基础科学"), + Tuples.of("5", "其他") + ))); + for (Tuple2 major : majorList) { + list.add(QueryResultVo.builder() + .code(major.getT1()) + .desc(major.getT2()) + .count((long) Math.floor(Math.random() * 100000) + 1) + .build()); + } + MathUtil.calculatePercentage(list); + return list; + } + + @Override + public List talentSkillLevelDistribution(QueryParamDto dto) { + List list = new ArrayList<>(); + List> skillLevelList = + Collections.unmodifiableList(new ArrayList<>(Arrays.asList( + Tuples.of("1", "初级工及其他"), + Tuples.of("2", "中级工"), + Tuples.of("3", "高级工"), + Tuples.of("4", "技师/高级技师") + ))); + for (Tuple2 level : skillLevelList) { + list.add(QueryResultVo.builder() + .code(level.getT1()) + .desc(level.getT2()) + .count((long) Math.floor(Math.random() * 100000) + 1) + .build()); + } + MathUtil.calculatePercentage(list); + return list; + } + + @Override + public List talentSupplyDemandMatchingDegree(QueryParamDto dto) { + List list = new ArrayList<>(); + for (Tuple2 industry : CommonConstant.MAJOR_INDUSTRY_LIST) { + list.add(QueryResultVo.builder() + .code(industry.getT1()) + .desc(industry.getT2()) + .count((long) Math.floor(Math.random() * 100000) + 1) + .anotherCount((long) Math.floor(Math.random() * 100000) + 1) + .rate(BigDecimal.valueOf(Math.random() * 30 + 1).setScale(1, RoundingMode.HALF_UP)) + .build()); + } + return list; + } +} \ No newline at end of file