添加功能
This commit is contained in:
@@ -27,6 +27,8 @@ public enum ExportModuleEnum {
|
||||
WISDOM_EMPLOYMENT_SECTOR_TALENT_SKILL("智慧就业大数据分析展示系统-产业与人才供需技能提升分析"),
|
||||
WISDOM_EMPLOYMENT_KEY_GROUP_SERVICE_SITUATION("智慧就业大数据分析展示系统-重点人群跟踪服务情况分析"),
|
||||
WISDOM_EMPLOYMENT_LABOR_FORCE_EMPLOYMENT("智慧就业大数据分析展示系统-劳动力就业失业数据分析"),
|
||||
|
||||
LABOR_FORCE_RECRUITMENT_DEMAND("劳动力动态监测系统-劳动力就业失业数据分析"),
|
||||
;
|
||||
private final String desc;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.cms.mapper;
|
||||
|
||||
import com.ruoyi.cms.domain.dto.QueryParamDto;
|
||||
|
||||
/**
|
||||
* 求职者主题库
|
||||
*
|
||||
* @author 马宝龙
|
||||
* @date 2026/6/30
|
||||
*/
|
||||
public interface ThemeJobSeekerMapper {
|
||||
|
||||
/**
|
||||
* 查询求职人数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 数
|
||||
*/
|
||||
Long querySupplyCount(QueryParamDto dto);
|
||||
}
|
||||
@@ -108,6 +108,10 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
case WISDOM_EMPLOYMENT_LABOR_FORCE_EMPLOYMENT:
|
||||
test(response, dto);
|
||||
break;
|
||||
// 劳动力动态监测系统-劳动力就业失业数据分析
|
||||
case LABOR_FORCE_RECRUITMENT_DEMAND:
|
||||
test(response, dto);
|
||||
break;
|
||||
// 可以添加更多导出格式的处理
|
||||
default:
|
||||
throw new ServiceException("暂不支持该模块");
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.ruoyi.cms.domain.vo.EchartsVo;
|
||||
import com.ruoyi.cms.domain.vo.LaborForceRecruitmentDemandOverviewVo;
|
||||
import com.ruoyi.cms.domain.vo.QueryResultVo;
|
||||
import com.ruoyi.cms.domain.vo.TreadVo;
|
||||
import com.ruoyi.cms.mapper.ThemeJobSeekerMapper;
|
||||
import com.ruoyi.cms.mapper.ThemeRecruitmentJobMapper;
|
||||
import com.ruoyi.cms.service.AnalysisLaborForceRecruitmentDemandService;
|
||||
import com.ruoyi.cms.util.MathUtil;
|
||||
@@ -40,6 +41,7 @@ import java.util.stream.IntStream;
|
||||
public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisLaborForceRecruitmentDemandService {
|
||||
|
||||
private final ThemeRecruitmentJobMapper themeRecruitmentJobMapper;
|
||||
private final ThemeJobSeekerMapper themeJobSeekerMapper;
|
||||
|
||||
/**
|
||||
* 处理参数
|
||||
@@ -68,6 +70,12 @@ public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisL
|
||||
|
||||
BigDecimal marketCommitmentSalary = themeRecruitmentJobMapper.queryAverageSalary(dto);
|
||||
|
||||
Long supplyCount = themeJobSeekerMapper.querySupplyCount(dto);
|
||||
BigDecimal demandSupplyRate = MathUtil.calculatePercentage(supplyCount, recruitmentCount);
|
||||
Tuple2<String, String> rateDesc = calculateDemandSupplyRate(demandSupplyRate);
|
||||
|
||||
Long activeCompanyCount = themeRecruitmentJobMapper.queryMonitorCompanyCount(dto);
|
||||
|
||||
// 计算上一时间段数据
|
||||
QueryParamDto lastDto = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, lastDto);
|
||||
@@ -78,25 +86,58 @@ public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisL
|
||||
|
||||
BigDecimal lastMarketCommitmentSalary = themeRecruitmentJobMapper.queryAverageSalary(lastDto);
|
||||
|
||||
Long lastSupplyCount = themeJobSeekerMapper.querySupplyCount(lastDto);
|
||||
BigDecimal lastDemandSupplyRate = MathUtil.calculatePercentage(lastSupplyCount, lastRecruitmentCount);
|
||||
|
||||
Long lastActiveCompanyCount = themeRecruitmentJobMapper.queryMonitorCompanyCount(lastDto);
|
||||
|
||||
return LaborForceRecruitmentDemandOverviewVo.builder()
|
||||
.recruitmentJobCount(recruitmentJobCount)
|
||||
.recruitmentJobCountMom(
|
||||
MathUtil.calculatePercentageGrowthRate(lastRecruitmentJobCount,recruitmentJobCount))
|
||||
MathUtil.calculatePercentageGrowthRate(lastRecruitmentJobCount, recruitmentJobCount))
|
||||
.recruitmentCount(recruitmentCount)
|
||||
.recruitmentCountMom(MathUtil.calculatePercentageGrowthRate(lastRecruitmentCount,recruitmentCount))
|
||||
.recruitmentCountMom(MathUtil.calculatePercentageGrowthRate(lastRecruitmentCount, recruitmentCount))
|
||||
.marketCommitmentSalary(marketCommitmentSalary)
|
||||
.marketCommitmentSalaryMom(
|
||||
MathUtil.calculatePercentageGrowthRate(lastMarketCommitmentSalary,marketCommitmentSalary))
|
||||
.demandSupplyRate(BigDecimal.valueOf(1.28))
|
||||
.demandSupplyRateMom(BigDecimal.valueOf(-0.03))
|
||||
.demandSupplyRateTag("偏紧")
|
||||
.demandSupplyRateDesc("供需相对均衡")
|
||||
.activeCompanyCount(860L)
|
||||
.activeCompanyCountMom(BigDecimal.valueOf(4.8))
|
||||
MathUtil.calculatePercentageGrowthRate(lastMarketCommitmentSalary, marketCommitmentSalary))
|
||||
.demandSupplyRate(demandSupplyRate)
|
||||
.demandSupplyRateMom(MathUtil.calculatePercentageGrowthRate(lastDemandSupplyRate, demandSupplyRate))
|
||||
.demandSupplyRateTag(rateDesc.getT1())
|
||||
.demandSupplyRateDesc(rateDesc.getT2())
|
||||
.activeCompanyCount(activeCompanyCount)
|
||||
.activeCompanyCountMom(MathUtil.calculatePercentageGrowthRate(lastActiveCompanyCount,
|
||||
activeCompanyCount))
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算求人倍率
|
||||
*
|
||||
* @param demandSupplyRate 求人倍率
|
||||
* @return 结果
|
||||
*/
|
||||
private Tuple2<String, String> calculateDemandSupplyRate(BigDecimal demandSupplyRate) {
|
||||
|
||||
String tag;
|
||||
String desc;
|
||||
if (new BigDecimal("1").compareTo(demandSupplyRate) > 0) {
|
||||
tag = "供过于求";
|
||||
desc = "就业压力增大";
|
||||
} else if (new BigDecimal("1").compareTo(demandSupplyRate) <= 0
|
||||
&& new BigDecimal("1.2").compareTo(demandSupplyRate) > 0) {
|
||||
tag = "平衡";
|
||||
desc = "供求基本平衡";
|
||||
} else if (new BigDecimal("1.2").compareTo(demandSupplyRate) <= 0
|
||||
&& new BigDecimal("1.5").compareTo(demandSupplyRate) > 0) {
|
||||
tag = "偏紧";
|
||||
desc = "需求略大于供给";
|
||||
} else {
|
||||
tag = "短缺";
|
||||
desc = "供求关系显著偏紧";
|
||||
}
|
||||
return Tuples.of(tag, desc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreadVo> recruitmentTrend(QueryParamDto dto) {
|
||||
List<TreadVo> list = new ArrayList<>();
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cms.mapper.ThemeJobSeekerMapper">
|
||||
|
||||
<!--公共条件 -->
|
||||
<sql id="commonConditions">
|
||||
|
||||
login_date >= #{startTime}
|
||||
AND create_time <= #{endTime}
|
||||
<if test="area != null and area != ''">
|
||||
AND area = #{area}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="querySupplyCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
SELECT COUNT(DISTINCT user_id)
|
||||
FROM theme_job_seeker
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user