添加功能
This commit is contained in:
@@ -130,6 +130,29 @@ public class CommonConstant {
|
||||
Tuple2::getT1,
|
||||
Tuple2::getT2
|
||||
)));
|
||||
/**
|
||||
* 重点产业列表
|
||||
*/
|
||||
public static final List<Tuple2<String, String>> MAJOR_SECTOR_LIST =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("新材料产业 (碳基、硅基、铝基)", "新材料产业 (碳基、硅基、铝基)"),
|
||||
Tuples.of("新能源产业", "新能源产业"),
|
||||
Tuples.of("农业资源转化产业 (农产品精深加工)", "农业资源转化产业 (农产品精深加工)"),
|
||||
Tuples.of("现代服务业", "现代服务业"),
|
||||
Tuples.of("绿色算力产业", "绿色算力产业"),
|
||||
Tuples.of("纺织服装产业", "纺织服装产业"),
|
||||
Tuples.of("先进装备制造", "先进装备制造"),
|
||||
Tuples.of("生物医药", "生物医药")
|
||||
)));
|
||||
/**
|
||||
* 重点产业Map
|
||||
*/
|
||||
public static final Map<String, String> MAJOR_SECTOR_MAP =
|
||||
Collections.unmodifiableMap(MAJOR_SECTOR_LIST.stream()
|
||||
.collect(Collectors.toMap(
|
||||
Tuple2::getT1,
|
||||
Tuple2::getT2
|
||||
)));
|
||||
|
||||
/**
|
||||
* 高校类型列表
|
||||
|
||||
@@ -68,6 +68,14 @@ public class SectorTalentOverviewVo implements Serializable {
|
||||
* 人才缺口环比
|
||||
*/
|
||||
private BigDecimal talentGapCountMom;
|
||||
/**
|
||||
* 创业企业数
|
||||
*/
|
||||
private Long startupCompanyCount;
|
||||
/**
|
||||
* 创业企业数环比
|
||||
*/
|
||||
private BigDecimal startupCompanyCountMom;
|
||||
/**
|
||||
* 技能培训人数
|
||||
*/
|
||||
|
||||
@@ -155,7 +155,7 @@ public interface ThemeRecruitmentJobMapper {
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> majorIndustryRecruitment(QueryParamDto dto);
|
||||
List<QueryResultVo> majorSectorRecruitment(QueryParamDto dto);
|
||||
|
||||
|
||||
/**
|
||||
@@ -164,7 +164,7 @@ public interface ThemeRecruitmentJobMapper {
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
List<TreadVo> majorIndustryLaborForceTreadYear(QueryParamDto dto);
|
||||
List<TreadVo> majorSectorLaborForceTreadYear(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 重点监测行业劳动力动态走势 - 季度
|
||||
@@ -172,7 +172,7 @@ public interface ThemeRecruitmentJobMapper {
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
List<TreadVo> majorIndustryLaborForceTreadQuarter(QueryParamDto dto);
|
||||
List<TreadVo> majorSectorLaborForceTreadQuarter(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 重点监测行业劳动力动态走势 - 月度
|
||||
@@ -180,7 +180,7 @@ public interface ThemeRecruitmentJobMapper {
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
List<TreadVo> majorIndustryLaborForceTreadMonth(QueryParamDto dto);
|
||||
List<TreadVo> majorSectorLaborForceTreadMonth(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 不同类型企业用工规模
|
||||
|
||||
@@ -181,9 +181,9 @@ public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisL
|
||||
public List<QueryResultVo> majorIndustryRecruitment(QueryParamDto dto) {
|
||||
|
||||
dealParam(dto);
|
||||
List<QueryResultVo> list = themeRecruitmentJobMapper.majorIndustryRecruitment(dto);
|
||||
List<QueryResultVo> list = themeRecruitmentJobMapper.majorSectorRecruitment(dto);
|
||||
MathUtil.calculatePercentage(list);
|
||||
ParamUtil.fillDictName(list, "majorIndustry");
|
||||
ParamUtil.fillDictName(list, "majorSector");
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -201,25 +201,25 @@ public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisL
|
||||
dto.setStartTime(LocalDateTime.of(dto.getYear(), 1, 1, 0, 0, 0)
|
||||
.minusYears(5L));
|
||||
dto.setEndTime(LocalDateTime.of(dto.getYear(), 12, 31, 23, 59, 59));
|
||||
list = themeRecruitmentJobMapper.majorIndustryLaborForceTreadYear(dto);
|
||||
list = themeRecruitmentJobMapper.majorSectorLaborForceTreadYear(dto);
|
||||
vo = transform(list,false);
|
||||
ParamUtil.fillDictName(vo, "majorIndustry");
|
||||
ParamUtil.fillDictName(vo, "majorSector");
|
||||
break;
|
||||
}
|
||||
case QUARTER: {
|
||||
dto.setStartTime(LocalDateTime.of(dto.getYear(), 1, 1, 0, 0, 0));
|
||||
dto.setEndTime(LocalDateTime.of(dto.getYear(), 12, 31, 23, 59, 59));
|
||||
list = themeRecruitmentJobMapper.majorIndustryLaborForceTreadQuarter(dto);
|
||||
list = themeRecruitmentJobMapper.majorSectorLaborForceTreadQuarter(dto);
|
||||
vo = transform(list,false);
|
||||
ParamUtil.fillDictName(vo, "majorIndustry");
|
||||
ParamUtil.fillDictName(vo, "majorSector");
|
||||
break;
|
||||
}
|
||||
case MONTH: {
|
||||
dto.setStartTime(LocalDateTime.of(dto.getYear(), 1, 1, 0, 0, 0));
|
||||
dto.setEndTime(LocalDateTime.of(dto.getYear(), 12, 31, 23, 59, 59));
|
||||
list = themeRecruitmentJobMapper.majorIndustryLaborForceTreadMonth(dto);
|
||||
list = themeRecruitmentJobMapper.majorSectorLaborForceTreadMonth(dto);
|
||||
vo = transform(list,false);
|
||||
ParamUtil.fillDictName(vo, "majorIndustry");
|
||||
ParamUtil.fillDictName(vo, "majorSector");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -196,6 +196,9 @@ public class ParamUtil {
|
||||
case "majorIndustry": {
|
||||
return Optional.ofNullable(CommonConstant.MAJOR_INDUSTRY_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
case "majorSector": {
|
||||
return Optional.ofNullable(CommonConstant.MAJOR_SECTOR_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
case "educationLevel": {
|
||||
return Optional.ofNullable(CommonConstant.EDUCATION_LEVEL_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
ORDER BY month_num;
|
||||
</select>
|
||||
|
||||
<select id="majorIndustryRecruitment"
|
||||
<select id="majorSectorRecruitment"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
@@ -503,7 +503,7 @@
|
||||
FROM (
|
||||
SELECT
|
||||
vacancies,
|
||||
SUBSTRING(industry FROM 1 FOR 3) AS code
|
||||
major_sector AS code
|
||||
FROM theme_recruitment_job
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
@@ -514,7 +514,7 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="majorIndustryLaborForceTreadYear"
|
||||
<select id="majorSectorLaborForceTreadYear"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.TreadVo">
|
||||
WITH params AS (
|
||||
@@ -535,7 +535,7 @@
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
SUBSTRING(industry FROM 1 FOR 3) AS another_code,
|
||||
major_sector AS another_code,
|
||||
COALESCE(SUM(CASE WHEN r.year_offset = 0 THEN vacancies END), 0) AS current_count,
|
||||
COALESCE(SUM(CASE WHEN r.year_offset = 1 THEN vacancies END), 0) AS last_count
|
||||
FROM month_ranges r
|
||||
@@ -555,7 +555,7 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
GROUP BY r.month_num,SUBSTRING(industry FROM 1 FOR 3)
|
||||
GROUP BY r.month_num,major_sector
|
||||
)
|
||||
SELECT
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS code,
|
||||
@@ -568,7 +568,7 @@
|
||||
ORDER BY sort ;
|
||||
</select>
|
||||
|
||||
<select id="majorIndustryLaborForceTreadQuarter"
|
||||
<select id="majorSectorLaborForceTreadQuarter"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.TreadVo">
|
||||
WITH params AS (
|
||||
@@ -591,7 +591,7 @@
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
SUBSTRING(industry FROM 1 FOR 3) AS another_code,
|
||||
major_sector AS another_code,
|
||||
COALESCE(SUM(CASE WHEN r.year_offset = 0 THEN vacancies END), 0) AS current_count,
|
||||
COALESCE(SUM(CASE WHEN r.year_offset = 1 THEN vacancies END), 0) AS last_count
|
||||
FROM month_ranges r
|
||||
@@ -611,7 +611,7 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
GROUP BY r.month_num,SUBSTRING(industry FROM 1 FOR 3)
|
||||
GROUP BY r.month_num,major_sector
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
@@ -624,7 +624,7 @@
|
||||
ORDER BY month_num;
|
||||
</select>
|
||||
|
||||
<select id="majorIndustryLaborForceTreadMonth"
|
||||
<select id="majorSectorLaborForceTreadMonth"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.TreadVo">
|
||||
WITH params AS (
|
||||
@@ -647,7 +647,7 @@
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
SUBSTRING(industry FROM 1 FOR 3) AS another_code,
|
||||
major_sector AS another_code,
|
||||
COALESCE(SUM(CASE WHEN r.year_offset = 0 THEN vacancies END), 0) AS current_count,
|
||||
COALESCE(SUM(CASE WHEN r.year_offset = 1 THEN vacancies END), 0) AS last_count
|
||||
FROM month_ranges r
|
||||
@@ -667,7 +667,7 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
GROUP BY r.month_num,SUBSTRING(industry FROM 1 FOR 3)
|
||||
GROUP BY r.month_num,major_sector
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
|
||||
Reference in New Issue
Block a user