添加功能
This commit is contained in:
@@ -39,7 +39,7 @@ public interface ThemeRecruitmentJobMapper {
|
||||
* @param dto 查询参数
|
||||
* @return 数
|
||||
*/
|
||||
Long queryEmploymentDemandCount(QueryParamDto dto);
|
||||
Long queryDemandCount(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 查询招聘岗位数
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.cms.mapper;
|
||||
|
||||
import com.ruoyi.cms.domain.dto.QueryParamDto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 产业发展主题库
|
||||
*
|
||||
* @author 马宝龙
|
||||
* @date 2026/7/10
|
||||
*/
|
||||
public interface ThemeSectorDevelopMapper {
|
||||
|
||||
/**
|
||||
* 查询产业产值
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果
|
||||
*/
|
||||
BigDecimal querySectorAmount(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 查询企业新增投资额
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果
|
||||
*/
|
||||
BigDecimal queryCompanyNewInvestmentAmount(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 查询创业企业数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果
|
||||
*/
|
||||
Long queryStartupCompanyCount(QueryParamDto dto);
|
||||
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class AnalysisIndustryEmploymentInfoServiceImpl implements AnalysisIndust
|
||||
|
||||
Long flexibleEmploymentCount = themeEmploymentRegisterMapper.queryFlexibleEmploymentCount(dto);
|
||||
|
||||
Long recruitmentDemand = themeRecruitmentJobMapper.queryEmploymentDemandCount(dto);
|
||||
Long recruitmentDemand = themeRecruitmentJobMapper.queryDemandCount(dto);
|
||||
|
||||
BigDecimal averageSalary = themeEmploymentRegisterMapper.queryAverageSalary(dto);
|
||||
|
||||
@@ -80,7 +80,7 @@ public class AnalysisIndustryEmploymentInfoServiceImpl implements AnalysisIndust
|
||||
|
||||
Long lastFlexibleEmploymentCount = themeEmploymentRegisterMapper.queryFlexibleEmploymentCount(lastDto);
|
||||
|
||||
Long lastRecruitmentDemand = themeRecruitmentJobMapper.queryEmploymentDemandCount(lastDto);
|
||||
Long lastRecruitmentDemand = themeRecruitmentJobMapper.queryDemandCount(lastDto);
|
||||
|
||||
BigDecimal lastAverageSalary = themeEmploymentRegisterMapper.queryAverageSalary(lastDto);
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisL
|
||||
ParamUtil.dealParam(dto);
|
||||
Long recruitmentJobCount = themeRecruitmentJobMapper.queryRecruitmentJobCount(dto);
|
||||
|
||||
Long recruitmentCount = themeRecruitmentJobMapper.queryEmploymentDemandCount(dto);
|
||||
Long recruitmentCount = themeRecruitmentJobMapper.queryDemandCount(dto);
|
||||
|
||||
BigDecimal marketCommitmentSalary = themeRecruitmentJobMapper.queryAverageSalary(dto);
|
||||
|
||||
@@ -85,7 +85,7 @@ public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisL
|
||||
ParamUtil.calculateLastTime(lastDto);
|
||||
Long lastRecruitmentJobCount = themeRecruitmentJobMapper.queryRecruitmentJobCount(lastDto);
|
||||
|
||||
Long lastRecruitmentCount = themeRecruitmentJobMapper.queryEmploymentDemandCount(lastDto);
|
||||
Long lastRecruitmentCount = themeRecruitmentJobMapper.queryDemandCount(lastDto);
|
||||
|
||||
BigDecimal lastMarketCommitmentSalary = themeRecruitmentJobMapper.queryAverageSalary(lastDto);
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public class AnalysisMajorIndustryEmploymentMonitorServiceImpl implements Analys
|
||||
|
||||
EmploymentRegisterSqlDto kindEmploymentCount = themeEmploymentRegisterMapper.queryKindEmploymentCount(dto);
|
||||
|
||||
Long employmentDemandCount = themeRecruitmentJobMapper.queryEmploymentDemandCount(dto);
|
||||
Long employmentDemandCount = themeRecruitmentJobMapper.queryDemandCount(dto);
|
||||
|
||||
Long unemploymentCount = themeUnemploymentRegisterMapper.queryUnemploymentCount(dto);
|
||||
|
||||
@@ -94,7 +94,7 @@ public class AnalysisMajorIndustryEmploymentMonitorServiceImpl implements Analys
|
||||
EmploymentRegisterSqlDto lastKindEmploymentCount =
|
||||
themeEmploymentRegisterMapper.queryKindEmploymentCount(lastDto);
|
||||
|
||||
Long lastEmploymentDemandCount = themeRecruitmentJobMapper.queryEmploymentDemandCount(lastDto);
|
||||
Long lastEmploymentDemandCount = themeRecruitmentJobMapper.queryDemandCount(lastDto);
|
||||
|
||||
Long lastUnemploymentCount = themeUnemploymentRegisterMapper.queryUnemploymentCount(lastDto);
|
||||
|
||||
|
||||
@@ -7,8 +7,14 @@ 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.mapper.ThemeJobSeekerMapper;
|
||||
import com.ruoyi.cms.mapper.ThemeRecruitmentJobMapper;
|
||||
import com.ruoyi.cms.mapper.ThemeSectorDevelopMapper;
|
||||
import com.ruoyi.cms.service.AnalysisSectorTalentService;
|
||||
import com.ruoyi.cms.util.MathUtil;
|
||||
import com.ruoyi.cms.util.ParamUtil;
|
||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -21,6 +27,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 产业发展与人才供需分析
|
||||
@@ -31,25 +38,76 @@ import java.util.List;
|
||||
@Service
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class AnalysisSectorTalentServiceImpl implements AnalysisSectorTalentService {
|
||||
|
||||
private final ThemeSectorDevelopMapper themeSectorDevelopMapper;
|
||||
private final ThemeRecruitmentJobMapper themeRecruitmentJobMapper;
|
||||
private final ThemeJobSeekerMapper themeJobSeekerMapper;
|
||||
|
||||
@Override
|
||||
public SectorTalentOverviewVo overview(QueryParamDto dto) {
|
||||
|
||||
// 计算当前时间数据
|
||||
ParamUtil.dealParam(dto);
|
||||
BigDecimal sectorAmount = themeSectorDevelopMapper.querySectorAmount(dto);
|
||||
|
||||
BigDecimal companyNewInvestmentAmount = themeSectorDevelopMapper.queryCompanyNewInvestmentAmount(dto);
|
||||
|
||||
Long talentDemandCount = Optional.ofNullable(themeRecruitmentJobMapper.queryDemandCount(dto))
|
||||
.orElse(0L);
|
||||
|
||||
Long talentSupplyCount = Optional.ofNullable(themeJobSeekerMapper.querySupplyCount(dto))
|
||||
.orElse(0L);
|
||||
|
||||
BigDecimal supplyDemandMatchingDegree = MathUtil.calculatePercentage(talentDemandCount, talentSupplyCount);
|
||||
|
||||
Long talentGapCount = talentDemandCount > talentSupplyCount ? talentDemandCount - talentSupplyCount : 0L;
|
||||
|
||||
Long startupCompanyCount = themeSectorDevelopMapper.queryStartupCompanyCount(dto);
|
||||
|
||||
// 计算上一时间段数据
|
||||
QueryParamDto lastDto = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, lastDto);
|
||||
ParamUtil.calculateLastTime(lastDto);
|
||||
BigDecimal lastSectorAmount = themeSectorDevelopMapper.querySectorAmount(lastDto);
|
||||
|
||||
BigDecimal lastCompanyNewInvestmentAmount = themeSectorDevelopMapper.queryCompanyNewInvestmentAmount(lastDto);
|
||||
|
||||
Long lastTalentDemandCount = Optional.ofNullable(themeRecruitmentJobMapper.queryDemandCount(lastDto))
|
||||
.orElse(0L);
|
||||
|
||||
Long lastTalentSupplyCount = Optional.ofNullable(themeJobSeekerMapper.querySupplyCount(lastDto))
|
||||
.orElse(0L);
|
||||
|
||||
BigDecimal lastSupplyDemandMatchingDegree = MathUtil.calculatePercentage(lastTalentDemandCount,
|
||||
lastTalentSupplyCount);
|
||||
|
||||
Long lastTalentGapCount = lastTalentDemandCount > lastTalentSupplyCount ?
|
||||
lastTalentDemandCount - lastTalentSupplyCount : 0L;
|
||||
|
||||
Long lastStartupCompanyCount = themeSectorDevelopMapper.queryStartupCompanyCount(lastDto);
|
||||
|
||||
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))
|
||||
.sectorAmount(sectorAmount)
|
||||
.sectorAmountMom(MathUtil.calculatePercentageGrowthRate(lastSectorAmount, sectorAmount))
|
||||
.companyNewInvestmentAmount(companyNewInvestmentAmount)
|
||||
.companyNewInvestmentAmountMom(
|
||||
MathUtil.calculatePercentageGrowthRate(lastCompanyNewInvestmentAmount,
|
||||
companyNewInvestmentAmount))
|
||||
.talentDemandCount(talentDemandCount)
|
||||
.talentDemandCountMom(MathUtil.calculatePercentageGrowthRate(lastTalentDemandCount, talentDemandCount))
|
||||
.talentSupplyCount(talentSupplyCount)
|
||||
.talentSupplyCountMom(MathUtil.calculatePercentageGrowthRate(lastTalentSupplyCount, talentSupplyCount))
|
||||
.supplyDemandMatchingDegree(supplyDemandMatchingDegree)
|
||||
.supplyDemandMatchingDegreeMom(
|
||||
MathUtil.calculatePercentageGrowthRate(lastSupplyDemandMatchingDegree,
|
||||
supplyDemandMatchingDegree))
|
||||
.talentGapCount(talentGapCount)
|
||||
.talentGapCountMom(MathUtil.calculatePercentageGrowthRate(lastTalentGapCount, talentGapCount))
|
||||
.startupCompanyCount(startupCompanyCount)
|
||||
.startupCompanyCountMom(
|
||||
MathUtil.calculatePercentageGrowthRate(lastStartupCompanyCount, startupCompanyCount))
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,19 @@
|
||||
<if test="area != null and area != ''">
|
||||
AND area = #{area}
|
||||
</if>
|
||||
<if test="industry != null and industry != ''">
|
||||
AND industry LIKE #{industry} || '%'
|
||||
</if>
|
||||
<if test="industryList != null and industryList.size() > 0">
|
||||
AND (
|
||||
<foreach collection="industryList" item="industry" open="" separator=" OR " close="">
|
||||
industry LIKE #{industry} || '%'
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="sector != null and sector != ''">
|
||||
AND sector = #{sector}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="querySupplyCount"
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="sector != null and sector != ''">
|
||||
AND sector = #{sector}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -45,7 +48,7 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryEmploymentDemandCount"
|
||||
<select id="queryDemandCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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.ThemeSectorDevelopMapper">
|
||||
|
||||
<!--公共条件 -->
|
||||
<sql id="commonConditions">
|
||||
date BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="area != null and area != ''">
|
||||
AND area_code = #{area}
|
||||
</if>
|
||||
<if test="sector != null and sector != ''">
|
||||
AND sector = #{sector}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="querySectorAmount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.math.BigDecimal">
|
||||
|
||||
SELECT COALESCE(SUM(sector_amount),0)
|
||||
FROM theme_sector_develop
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryCompanyNewInvestmentAmount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.math.BigDecimal">
|
||||
|
||||
SELECT COALESCE(SUM(company_new_investment_amount),0)
|
||||
FROM theme_sector_develop
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryStartupCompanyCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
SELECT COALESCE(SUM(startup_company_count),0)
|
||||
FROM theme_sector_develop
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -481,6 +481,7 @@ CREATE TABLE shz_data_dashboard.theme_recruitment_job
|
||||
name character varying(255) COLLATE pg_catalog."default",
|
||||
location character varying(255) COLLATE pg_catalog."default",
|
||||
industry character varying(100) COLLATE pg_catalog."default",
|
||||
sector character varying(100) COLLATE pg_catalog."default",
|
||||
major_sector character varying(100) COLLATE pg_catalog."default",
|
||||
scale character varying(50) COLLATE pg_catalog."default",
|
||||
del_flag character varying(1) COLLATE pg_catalog."default",
|
||||
@@ -562,6 +563,9 @@ ON COLUMN shz_data_dashboard.theme_recruitment_job.location IS '单位地点';
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_recruitment_job.industry IS '主要行业';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_recruitment_job.sector IS '产业';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_recruitment_job.major_sector IS '重点产业';
|
||||
|
||||
@@ -605,6 +609,8 @@ CREATE TABLE shz_data_dashboard.theme_job_seeker
|
||||
phone character varying(200) COLLATE pg_catalog."default",
|
||||
min_salary character varying(10) COLLATE pg_catalog."default",
|
||||
max_salary character varying(10) COLLATE pg_catalog."default",
|
||||
industry character varying(100) COLLATE pg_catalog."default",
|
||||
sector character varying(100) COLLATE pg_catalog."default",
|
||||
area character varying(20) COLLATE pg_catalog."default",
|
||||
status character varying(2) COLLATE pg_catalog."default",
|
||||
del_flag character varying(1) COLLATE pg_catalog."default",
|
||||
@@ -655,6 +661,12 @@ ON COLUMN shz_data_dashboard.theme_job_seeker.min_salary IS '最低工资';
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_job_seeker.max_salary IS '最高工资';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_job_seeker.industry IS '行业';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_job_seeker.sector IS '产业';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_job_seeker.area IS '期望工作地';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user