添加功能
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.cms.service;
|
||||
|
||||
import com.ruoyi.cms.domain.dto.QueryParamDto;
|
||||
import com.ruoyi.cms.domain.vo.EchartsVo;
|
||||
import com.ruoyi.cms.domain.vo.QueryResultVo;
|
||||
import com.ruoyi.cms.domain.vo.SectorOccupationSkillGapVo;
|
||||
import com.ruoyi.cms.domain.vo.SectorOccupationSkillOverviewVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产业发展与职业技能提升分析
|
||||
*
|
||||
* @author 马宝龙
|
||||
* @date 2026/6/26
|
||||
*/
|
||||
public interface AnalysisSectorOccupationSkillService {
|
||||
|
||||
|
||||
/**
|
||||
* 数据总览
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 数据总览
|
||||
*/
|
||||
SectorOccupationSkillOverviewVo overview(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 产业发展与人才需求趋势
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 趋势数据
|
||||
*/
|
||||
EchartsVo sectorAndTalentDemandTread(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 重点产业的核心职业技能需求
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> coreSkillDemand(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 职业技能供给与缺口分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<SectorOccupationSkillGapVo> skillSupplyAndGap(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 重点群体技能培训覆盖率
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> keyGroupSkillCoverageRate(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 职业培训技能人才等级分布
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> talentSkillLevelDistribution(QueryParamDto dto);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
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.EchartsSeriesVo;
|
||||
import com.ruoyi.cms.domain.vo.EchartsVo;
|
||||
import com.ruoyi.cms.domain.vo.QueryResultVo;
|
||||
import com.ruoyi.cms.domain.vo.SectorOccupationSkillGapVo;
|
||||
import com.ruoyi.cms.domain.vo.SectorOccupationSkillOverviewVo;
|
||||
import com.ruoyi.cms.service.AnalysisSectorOccupationSkillService;
|
||||
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;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
/**
|
||||
* 产业发展与职业技能提升分析
|
||||
*
|
||||
* @author 马宝龙
|
||||
* @date 2026/6/26
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class AnalysisSectorOccupationSkillServiceImpl implements AnalysisSectorOccupationSkillService {
|
||||
|
||||
@Override
|
||||
public SectorOccupationSkillOverviewVo overview(QueryParamDto dto) {
|
||||
return SectorOccupationSkillOverviewVo.builder()
|
||||
.skillTrainCount(25000L)
|
||||
.skillTrainCountMom(BigDecimal.valueOf(8.5))
|
||||
.trainCoverageRate(BigDecimal.valueOf(68.3))
|
||||
.trainCoverageRateMom(BigDecimal.valueOf(3.2))
|
||||
.averageSalary(BigDecimal.valueOf(6850.50))
|
||||
.averageSalaryMom(BigDecimal.valueOf(4.2))
|
||||
.afterTrainEmploymentRate(BigDecimal.valueOf(82.5))
|
||||
.afterTrainEmploymentRateMom(BigDecimal.valueOf(2.1))
|
||||
.advanceSkillTalentCount(5800L)
|
||||
.advanceSkillTalentCountMom(BigDecimal.valueOf(6.8))
|
||||
.newSkillGapCount(3200L)
|
||||
.newSkillGapCountMom(BigDecimal.valueOf(-2.5))
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EchartsVo sectorAndTalentDemandTread(QueryParamDto dto) {
|
||||
|
||||
List<String> xAxis = IntStream.rangeClosed(1, 12)
|
||||
.mapToObj(i -> i + "月")
|
||||
.collect(Collectors.toList());
|
||||
List<EchartsSeriesVo> series = new ArrayList<>();
|
||||
for (Tuple2<String, String> sector : CommonConstant.SECTOR_LIST) {
|
||||
List<Long> dataList = new ArrayList<>();
|
||||
for (int i = 0; i < 12; i++) {
|
||||
dataList.add((long) Math.floor(Math.random() * 20000) + 5000);
|
||||
}
|
||||
series.add(EchartsSeriesVo.builder().name(sector.getT2()).data(dataList).build());
|
||||
}
|
||||
|
||||
return EchartsVo.builder().xAxis(xAxis).series(series).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> coreSkillDemand(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> skillList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "光伏技术"),
|
||||
Tuples.of("2", "化工工艺"),
|
||||
Tuples.of("3", "机械设计"),
|
||||
Tuples.of("4", "食品工艺"),
|
||||
Tuples.of("5", "纺织工艺"),
|
||||
Tuples.of("6", "数据中心运维")
|
||||
)));
|
||||
for (Tuple2<String, String> skill : skillList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(skill.getT1())
|
||||
.desc(skill.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SectorOccupationSkillGapVo> skillSupplyAndGap(QueryParamDto dto) {
|
||||
List<SectorOccupationSkillGapVo> list = new ArrayList<>();
|
||||
for (Tuple2<String, String> sector : CommonConstant.SECTOR_LIST) {
|
||||
long demand = (long) Math.floor(Math.random() * 10000) + 500;
|
||||
long supply = (long) Math.floor(Math.random() * 5000) + 100;
|
||||
list.add(SectorOccupationSkillGapVo.builder()
|
||||
.code(sector.getT1())
|
||||
.desc(sector.getT2())
|
||||
.recruitmentDemandCount(demand)
|
||||
.trainSupplyCount(supply)
|
||||
.gapCount((demand - supply) > 0 ? demand - supply : 0)
|
||||
.build());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> keyGroupSkillCoverageRate(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> groupList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "高校毕业生"),
|
||||
Tuples.of("2", "失业人员"),
|
||||
Tuples.of("3", "残疾人"),
|
||||
Tuples.of("4", "低保家庭"),
|
||||
Tuples.of("5", "零就业家庭"),
|
||||
Tuples.of("6", "其他重点群体")
|
||||
)));
|
||||
for (Tuple2<String, String> group : groupList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(group.getT1())
|
||||
.desc(group.getT2())
|
||||
.count((long) Math.floor(Math.random() * 20000) + 5000)
|
||||
.anotherCount((long) Math.floor(Math.random() * 20000) + 5000)
|
||||
.rate(BigDecimal.valueOf(Math.random() * 100 + 1).setScale(1, RoundingMode.HALF_UP))
|
||||
.build());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> talentSkillLevelDistribution(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> skillLevelList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "初级工及其他"),
|
||||
Tuples.of("2", "中级工"),
|
||||
Tuples.of("3", "高级工"),
|
||||
Tuples.of("4", "技师/高级技师")
|
||||
)));
|
||||
for (Tuple2<String, String> 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user