添加功能

This commit is contained in:
马宝龙
2026-07-15 11:18:49 +08:00
parent 2fc7a1bb46
commit d007c100f6
4 changed files with 268 additions and 4 deletions

View File

@@ -189,6 +189,14 @@ public interface ThemeRecruitmentJobMapper {
*/
List<HeatmapVo> heatmap(QueryParamDto dto);
/**
* 热力图
*
* @param dto 查询参数
* @return 热力图列表
*/
List<HeatmapVo> heatmapDemandCount(QueryParamDto dto);
/**
* 招聘需求规模趋势 - 年度
*

View File

@@ -126,7 +126,7 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
break;
// 智慧就业大数据分析展示系统-产业与人才供需技能提升分析
case WISDOM_EMPLOYMENT_SECTOR_TALENT_SKILL:
test(response, dto);
exportWisdomSectorTalentSkill(response, dto);
break;
// 智慧就业大数据分析展示系统-重点人群跟踪服务情况分析
case WISDOM_EMPLOYMENT_KEY_GROUP_SERVICE_SITUATION:
@@ -2217,6 +2217,242 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
}
/**
* 导出 产业与人才供需技能提升分析
*
* @param response 响应
* @param dto 查询参数
* @throws IOException 异常
*/
private void exportWisdomSectorTalentSkill(HttpServletResponse response, QueryParamDto dto) throws IOException {
MultiSheetExcelUtil multiSheetExcelUtil = new MultiSheetExcelUtil();
String exportTime = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS);
// 数据总览
List<ExcelRow> basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("导出时间", exportTime));
basicExportList.add(new ExcelRow("数据总览"));
basicExportList.add(new ExcelRow("指标名称(单位)", "指标值", "较上期变化(%"));
QueryParamDto newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
SectorTalentOverviewVo overview =
analysisSectorTalentService.overview(newParam);
basicExportList.add(new ExcelRow(
"产业产值(亿元)", transform(overview.getSectorAmount()),
transform(overview.getSectorAmountMom())
));
basicExportList.add(new ExcelRow(
"企业新增投资额(亿元)", transform(overview.getCompanyNewInvestmentAmount()),
transform(overview.getCompanyNewInvestmentAmountMom())
));
basicExportList.add(new ExcelRow(
"人才需求(人)", transform(overview.getTalentDemandCount()),
transform(overview.getTalentDemandCountMom())
));
basicExportList.add(new ExcelRow(
"人才供给(人)", transform(overview.getTalentSupplyCount()),
transform(overview.getTalentSupplyCountMom())
));
basicExportList.add(new ExcelRow(
"供需匹配度(%", transform(overview.getSupplyDemandMatchingDegree()),
transform(overview.getSupplyDemandMatchingDegreeMom())
));
basicExportList.add(new ExcelRow(
"人才缺口(人)", transform(overview.getTalentGapCount()),
transform(overview.getTalentGapCountMom())
));
basicExportList.add(new ExcelRow(
"技能培训人数(人)", transform(overview.getSkillTrainCount()),
transform(overview.getSkillTrainCountMom())
));
// 创建Excel工具类并添加工作表
ExcelUtil<ExcelRow> basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("数据总览");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 区域就业热力图
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("区域就业热力图"));
basicExportList.add(new ExcelRow("地区", "岗位需求(人)"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
List<HeatmapVo> heatmapList = analysisSectorTalentService.heatmap(newParam);
for (HeatmapVo heatmap : heatmapList) {
basicExportList.add(new ExcelRow(
heatmap.getAreaName(), transform(heatmap.getCount())
));
}
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("区域就业热力图");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 产业景气指数
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("产业景气指数"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
SectorTalentProsperityIndexVo sectorTalentProsperityIndexVo =
analysisSectorTalentService.sectorProsperityIndex(newParam);
basicExportList.add(new ExcelRow("指数", transform(sectorTalentProsperityIndexVo.getProsperityIndex())));
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("产业景气指数");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 产业发展趋势分析
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("产业发展趋势分析"));
basicExportList.add(new ExcelRow("时间", "岗位需求(人)", "产业投资(亿元)",
"产业增加值(亿元)", "产值增长率(%"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
List<SectorTalentTreadVo> sectorTalentList = analysisSectorTalentService.sectorDevelopTrend(newParam);
for (SectorTalentTreadVo tread : sectorTalentList) {
basicExportList.add(new ExcelRow(
tread.getDesc(), transform(tread.getJobDemandCount()), transform(tread.getSectorInvestmentAmount()),
transform(tread.getSectorIncreaseValue()), transform(tread.getGrowthRate())
));
}
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("产业发展趋势分析");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 产业人才需求
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("产业人才需求"));
basicExportList.add(new ExcelRow("产业", "需求人数(人)", "占比(%"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
List<QueryResultVo> resultList = analysisSectorTalentService.talentDemandStructure(newParam);
for (QueryResultVo result : resultList) {
basicExportList.add(new ExcelRow(
result.getDesc(), transform(result.getCount()), transform(result.getCountPercentage())
));
}
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("产业人才需求");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 重点产业的核心职业技能需求
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("重点产业的核心职业技能需求"));
basicExportList.add(new ExcelRow("产业", "薪资水平(元)"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
resultList = analysisSectorOccupationSkillService.coreSkillDemand(newParam);
for (QueryResultVo result : resultList) {
basicExportList.add(new ExcelRow(
result.getDesc(), transform(result.getAmount())
));
}
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("重点产业的核心职业技能需求");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 重点群体技能培训覆盖率
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("重点群体技能培训覆盖率"));
basicExportList.add(new ExcelRow("人员类型", "人员总数(人)", "培训人数(人)", "覆盖率(%"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
resultList = analysisSectorOccupationSkillService.keyGroupSkillCoverageRate(newParam);
for (QueryResultVo result : resultList) {
basicExportList.add(new ExcelRow(
result.getDesc(), transform(result.getCount()), transform(result.getAnotherCount()),
transform(result.getRate())
));
}
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("重点群体技能培训覆盖率");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 人才供需匹配度评估
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("人才供需匹配度评估"));
basicExportList.add(new ExcelRow("产业", "人才需求(人)", "人才供给(人)", "供需比(%"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
resultList = analysisSectorTalentService.talentSupplyDemandMatchingDegree(newParam);
for (QueryResultVo result : resultList) {
basicExportList.add(new ExcelRow(
result.getDesc(), transform(result.getCount()), transform(result.getAnotherCount()),
transform(result.getRate())
));
}
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("人才供需匹配度评估");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 技能人才等级分布
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("技能人才等级分布"));
basicExportList.add(new ExcelRow("技能等级", "人数(人)", "占比(%"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
resultList = analysisSectorTalentService.talentSkillLevelDistribution(newParam);
for (QueryResultVo result : resultList) {
basicExportList.add(new ExcelRow(
result.getDesc(), transform(result.getCount()), transform(result.getCountPercentage())
));
}
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("技能人才等级分布");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
// 高校毕业生人才供给专业分布
basicExportList = new ArrayList<>();
basicExportList.add(new ExcelRow("高校毕业生人才供给专业分布"));
basicExportList.add(new ExcelRow("专业", "人数(人)", "占比(%"));
newParam = new QueryParamDto();
BeanUtils.copyProperties(dto, newParam);
resultList = analysisSectorTalentService.talentSupplyDistribution(newParam);
for (QueryResultVo result : resultList) {
basicExportList.add(new ExcelRow(
result.getDesc(), transform(result.getCount()), transform(result.getCountPercentage())
));
}
// 创建Excel工具类并添加工作表
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
basicSituationExcelUtil.setDataList(basicExportList);
basicSituationExcelUtil.setSheetName("高校毕业生人才供给专业分布");
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
multiSheetExcelUtil.setFileName(dto.getExportModule().getDesc());
multiSheetExcelUtil.exportExcel(response);
}
/**
* 导出 劳动力招聘需求分析

View File

@@ -257,8 +257,8 @@ public class AnalysisSectorTalentServiceImpl implements AnalysisSectorTalentServ
BigDecimal sectorIncreaseValue = Optional.ofNullable(vo.getSectorIncreaseValue())
.orElse(BigDecimal.ZERO)
.subtract(Optional.ofNullable(lastSector.getSectorIncreaseValue()).orElse(BigDecimal.ZERO));
sectorInvestmentAmount = MathUtil.divide(new BigDecimal("100000000"),
sectorInvestmentAmount);
sectorIncreaseValue = MathUtil.divide(new BigDecimal("100000000"),
sectorIncreaseValue);
list.add(SectorTalentTreadVo.builder()
@@ -351,7 +351,7 @@ public class AnalysisSectorTalentServiceImpl implements AnalysisSectorTalentServ
public List<HeatmapVo> heatmap(QueryParamDto dto) {
ParamUtil.dealParam(dto);
List<HeatmapVo> list = themeRecruitmentJobMapper.heatmap(dto);
List<HeatmapVo> list = themeRecruitmentJobMapper.heatmapDemandCount(dto);
// 计算占比
MathUtil.calculatePercentageHeatmap(list);

View File

@@ -581,6 +581,26 @@
ORDER BY areaCode
</select>
<select id="heatmapDemandCount"
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
resultType="com.ruoyi.cms.domain.vo.HeatmapVo">
SELECT
areaCode,
COALESCE(SUM(vacancies), 0) AS count
FROM (
SELECT
vacancies,
job_location_area_code AS areaCode
FROM theme_recruitment_job
WHERE
<!-- 引入公共条件 -->
<include refid="commonConditions"/>
) subquery
GROUP BY areaCode
ORDER BY areaCode
</select>
<select id="recruitmentTrendYear"
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
resultType="com.ruoyi.cms.domain.vo.TreadVo">