From 0d417b239312626495df7995babcbe8d9913cdc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=AE=9D=E9=BE=99?= Date: Mon, 29 Jun 2026 20:01:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/cms/constant/CommonConstant.java | 35 +- .../domain/dto/EmploymentRegisterSqlDto.java | 39 ++ .../ruoyi/cms/domain/dto/QueryParamDto.java | 5 + ...orIndustryEmploymentMonitorOverviewVo.java | 4 +- ...MajorIndustryEmploymentMonitorTreadVo.java | 16 + .../mapper/ThemeEmploymentRegisterMapper.java | 52 ++ .../cms/mapper/ThemeRecruitmentJobMapper.java | 109 +++++ .../ThemeUnemploymentRegisterMapper.java | 98 ++++ .../impl/AnalysisExportServiceImpl.java | 429 ++++++++++++++++- ...ysisIndustryEmploymentInfoServiceImpl.java | 18 +- ...rIndustryEmploymentMonitorServiceImpl.java | 449 +++++++++++++----- .../java/com/ruoyi/cms/util/ParamUtil.java | 6 + .../mapper/ThemeEmploymentRegisterMapper.xml | 263 ++++++++++ .../mapper/ThemeRecruitmentJobMapper.xml | 310 ++++++++++++ .../ThemeUnemploymentRegisterMapper.xml | 322 +++++++++++++ sql/datadashboard/table.sql | 355 +++++++++++++- 16 files changed, 2384 insertions(+), 126 deletions(-) create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/dto/EmploymentRegisterSqlDto.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeRecruitmentJobMapper.java create mode 100644 ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeUnemploymentRegisterMapper.java create mode 100644 ruoyi-bussiness/src/main/resources/mapper/ThemeRecruitmentJobMapper.xml create mode 100644 ruoyi-bussiness/src/main/resources/mapper/ThemeUnemploymentRegisterMapper.xml diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/constant/CommonConstant.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/constant/CommonConstant.java index 0b33967..09599a0 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/constant/CommonConstant.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/constant/CommonConstant.java @@ -82,6 +82,15 @@ public class CommonConstant { Tuples.of("S", "公共管理、社会保障和社会组织"), Tuples.of("T", "国际组织") ))); + /** + * 行业Map + */ + public static final Map INDUSTRY_MAP = + Collections.unmodifiableMap(INDUSTRY_LIST.stream() + .collect(Collectors.toMap( + Tuple2::getT1, + Tuple2::getT2 + ))); /** * 重点行业列表 @@ -115,8 +124,8 @@ public class CommonConstant { /** * 重点行业Map */ - public static final Map INDUSTRY_MAP = - Collections.unmodifiableMap(INDUSTRY_LIST.stream() + public static final Map MAJOR_INDUSTRY_MAP = + Collections.unmodifiableMap(MAJOR_INDUSTRY_LIST.stream() .collect(Collectors.toMap( Tuple2::getT1, Tuple2::getT2 @@ -271,4 +280,26 @@ public class CommonConstant { Tuple2::getT1, Tuple2::getT2 ))); + + + /** + * 岗位类型列表 + */ + public static final List> JOB_TYPE_LIST = + Collections.unmodifiableList(new ArrayList<>(Arrays.asList( + Tuples.of("1", "管理人员"), + Tuples.of("2", "专业技术人员"), + Tuples.of("3", "技能工人"), + Tuples.of("4", "一般员工"), + Tuples.of("5", "其他") + ))); + /** + * 岗位类型Map + */ + public static final Map JOB_TYPE_MAP = + Collections.unmodifiableMap(JOB_TYPE_LIST.stream() + .collect(Collectors.toMap( + Tuple2::getT1, + Tuple2::getT2 + ))); } diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/dto/EmploymentRegisterSqlDto.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/dto/EmploymentRegisterSqlDto.java new file mode 100644 index 0000000..1a11b92 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/dto/EmploymentRegisterSqlDto.java @@ -0,0 +1,39 @@ +package com.ruoyi.cms.domain.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 就业登记 - sql + * + * @author 马宝龙 + * @date 2026/6/29 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class EmploymentRegisterSqlDto implements Serializable { + private static final long serialVersionUID = 9063231507432460113L; + + /** + * 总人数 + */ + private Long totalEmploymentCount; + /** + * 累计城镇新增就业人数 + */ + private Long totalTownEmploymentCount; + /** + * 失业人员再就业人数 + */ + private Long unEmploymentEmploymentCount; + /** + * 就业困难人员就业人数 + */ + private Long employmentDifficultyEmploymentCount; +} diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/dto/QueryParamDto.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/dto/QueryParamDto.java index b880be0..338f26c 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/dto/QueryParamDto.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/dto/QueryParamDto.java @@ -9,6 +9,7 @@ import lombok.NoArgsConstructor; import java.io.Serializable; import java.time.LocalDateTime; +import java.util.List; /** * 查询参数 @@ -47,6 +48,10 @@ public class QueryParamDto implements Serializable { * 行业 */ private String industry; + /** + * 行业列表 + */ + private List industryList; /** * 产业 */ diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/MajorIndustryEmploymentMonitorOverviewVo.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/MajorIndustryEmploymentMonitorOverviewVo.java index 2a8af3b..37c730f 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/MajorIndustryEmploymentMonitorOverviewVo.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/MajorIndustryEmploymentMonitorOverviewVo.java @@ -30,11 +30,11 @@ public class MajorIndustryEmploymentMonitorOverviewVo implements Serializable { */ private BigDecimal monitorIndustryCountMom; /** - * 检测企业数 + * 监测企业数 */ private Long monitorCompanyCount; /** - * 检测企业数环比 + * 监测企业数环比 */ private BigDecimal monitorCompanyCountMom; /** diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/MajorIndustryEmploymentMonitorTreadVo.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/MajorIndustryEmploymentMonitorTreadVo.java index 23939d6..e43e4e7 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/MajorIndustryEmploymentMonitorTreadVo.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/domain/vo/MajorIndustryEmploymentMonitorTreadVo.java @@ -40,8 +40,24 @@ public class MajorIndustryEmploymentMonitorTreadVo implements Serializable { * 失业率 */ private BigDecimal unEmploymentRate; + /** + * 就业人数 + */ + private Long employmentCount; + /** + * 失业人数 + */ + private Long unemploymentCount; /** * 全市平均失业率 */ private BigDecimal cityAverageUnEmploymentRate; + /** + * 全市就业人数 + */ + private Long cityAverageEmploymentCount; + /** + * 全市失业人数 + */ + private Long cityAverageUnemploymentCount; } diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeEmploymentRegisterMapper.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeEmploymentRegisterMapper.java index 8a2a45e..f5c8267 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeEmploymentRegisterMapper.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeEmploymentRegisterMapper.java @@ -1,8 +1,10 @@ package com.ruoyi.cms.mapper; +import com.ruoyi.cms.domain.dto.EmploymentRegisterSqlDto; import com.ruoyi.cms.domain.dto.IndustryEmploymentInfoSqlDto; import com.ruoyi.cms.domain.dto.QueryParamDto; import com.ruoyi.cms.domain.vo.HeatmapVo; +import com.ruoyi.cms.domain.vo.MajorIndustryEmploymentMonitorTreadVo; import com.ruoyi.cms.domain.vo.QueryResultVo; import com.ruoyi.cms.domain.vo.TreadVo; @@ -26,6 +28,14 @@ public interface ThemeEmploymentRegisterMapper { */ Long queryEmploymentCount(QueryParamDto dto); + /** + * 获取各种就业登记人数 + * + * @param dto 获取参数 + * @return 人数 + */ + EmploymentRegisterSqlDto queryKindEmploymentCount(QueryParamDto dto); + /** * 查询创业企业总数 * @@ -129,4 +139,46 @@ public interface ThemeEmploymentRegisterMapper { * @return 热力图列表 */ List heatmap(QueryParamDto dto); + + + /** + * 就业增长趋势 - 年度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List employmentTrendYear(QueryParamDto dto); + + /** + * 就业增长趋势 - 季度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List employmentTrendQuarter(QueryParamDto dto); + + /** + * 就业增长趋势 - 月度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List employmentTrendMonth(QueryParamDto dto); + + + /** + * 查询各行业就业人数 + * + * @param dto 查询参数 + * @return 数 + */ + List queryEmploymentCountByIndustry(QueryParamDto dto); + + /** + * 查询各岗位类型就业人数 + * + * @param dto 查询参数 + * @return 数 + */ + List queryEmploymentCountByJobType(QueryParamDto dto); } diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeRecruitmentJobMapper.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeRecruitmentJobMapper.java new file mode 100644 index 0000000..19ec7b1 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeRecruitmentJobMapper.java @@ -0,0 +1,109 @@ +package com.ruoyi.cms.mapper; + +import com.ruoyi.cms.domain.dto.QueryParamDto; +import com.ruoyi.cms.domain.vo.HeatmapVo; +import com.ruoyi.cms.domain.vo.MajorIndustryEmploymentMonitorTreadVo; +import com.ruoyi.cms.domain.vo.QueryResultVo; + +import java.util.List; + +/** + * 招聘岗位主题库 + * + * @author 马宝龙 + * @date 2026/6/28 + */ +public interface ThemeRecruitmentJobMapper { + + /** + * 查询监测行业数 + * + * @param dto 查询参数 + * @return 数 + */ + Long queryMonitorIndustryCount(QueryParamDto dto); + + /** + * 查询监测企业数 + * + * @param dto 查询参数 + * @return 数 + */ + Long queryMonitorCompanyCount(QueryParamDto dto); + + /** + * 查询就业需求数 + * + * @param dto 查询参数 + * @return 数 + */ + Long queryEmploymentDemandCount(QueryParamDto dto); + + /** + * 用工需求增长趋势 - 年度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List laborDemandTrendYear(QueryParamDto dto); + + /** + * 用工需求增长趋势 - 季度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List laborDemandTrendQuarter(QueryParamDto dto); + + /** + * 用工需求增长趋势 - 月度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List laborDemandTrendMonth(QueryParamDto dto); + + + /** + * 查询各行业就业需求数 + * + * @param dto 查询参数 + * @return 数 + */ + List queryEmploymentDemandCountByIndustry(QueryParamDto dto); + + + /** + * 薪资水平监测 + * + * @param dto 查询参数 + * @return 结果列表 + */ + List salaryLevel(QueryParamDto dto); + + + /** + * 查询各岗位类型就业需求数 + * + * @param dto 查询参数 + * @return 数 + */ + List queryEmploymentDemandCountByJobType(QueryParamDto dto); + + + /** + * 查询各行业用工缺口数 + * + * @param dto 查询参数 + * @return 数 + */ + List queryLaborGapCountByIndustry(QueryParamDto dto); + + /** + * 热力图 + * + * @param dto 查询参数 + * @return 热力图列表 + */ + List heatmap(QueryParamDto dto); +} diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeUnemploymentRegisterMapper.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeUnemploymentRegisterMapper.java new file mode 100644 index 0000000..5b79d45 --- /dev/null +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/mapper/ThemeUnemploymentRegisterMapper.java @@ -0,0 +1,98 @@ +package com.ruoyi.cms.mapper; + +import com.ruoyi.cms.domain.dto.QueryParamDto; +import com.ruoyi.cms.domain.vo.HeatmapVo; +import com.ruoyi.cms.domain.vo.MajorIndustryEmploymentMonitorTreadVo; +import com.ruoyi.cms.domain.vo.QueryResultVo; + +import java.util.List; + +/** + * 失业登记主题库 + * + * @author 马宝龙 + * @date 2026/6/27 + */ +public interface ThemeUnemploymentRegisterMapper { + + + /** + * 查询失业登记人数 + * + * @param dto 查询参数 + * @return 人数 + */ + Long queryUnemploymentCount(QueryParamDto dto); + + /** + * 失业增长趋势 - 年度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List unemploymentTrendYear(QueryParamDto dto); + + /** + * 失业增长趋势 - 季度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List unemploymentTrendQuarter(QueryParamDto dto); + + /** + * 失业增长趋势 - 月度 + * + * @param dto 查询参数 + * @return 趋势列表 + */ + List unemploymentTrendMonth(QueryParamDto dto); + + /** + * 查询各行业失业人数 + * + * @param dto 查询参数 + * @return 数 + */ + List queryUnemploymentCountByIndustry(QueryParamDto dto); + + /** + * 失业人员行业分布 + * + * @param dto 查询参数 + * @return 结果列表 + */ + List industryDistribution(QueryParamDto dto); + + /** + * 性别就业差异分析 + * + * @param dto 查询参数 + * @return 结果列表 + */ + List gender(QueryParamDto dto); + + /** + * 查询各行业失业人数 + * + * @param dto 查询参数 + * @return 数 + */ + List queryUnemploymentCountByJobType(QueryParamDto dto); + + /** + * 查询各行业裁员人数 + * + * @param dto 查询参数 + * @return 数 + */ + List queryLayoffCountByIndustry(QueryParamDto dto); + + /** + * 热力图 + * + * @param dto 查询参数 + * @return 热力图列表 + */ + List heatmap(QueryParamDto dto); +} diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisExportServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisExportServiceImpl.java index 0584095..916d223 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisExportServiceImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisExportServiceImpl.java @@ -7,11 +7,14 @@ import com.ruoyi.cms.domain.vo.GraduateEmploymentInfoStartupVo; import com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo; import com.ruoyi.cms.domain.vo.HeatmapVo; import com.ruoyi.cms.domain.vo.IndustryEmploymentInfoOverviewVo; +import com.ruoyi.cms.domain.vo.MajorIndustryEmploymentMonitorOverviewVo; +import com.ruoyi.cms.domain.vo.MajorIndustryEmploymentMonitorTreadVo; import com.ruoyi.cms.domain.vo.QueryResultVo; import com.ruoyi.cms.domain.vo.TreadVo; import com.ruoyi.cms.service.AnalysisExportService; import com.ruoyi.cms.service.AnalysisGraduateEmploymentInfoService; import com.ruoyi.cms.service.AnalysisIndustryEmploymentInfoService; +import com.ruoyi.cms.service.AnalysisMajorIndustryEmploymentMonitorService; import com.ruoyi.cms.util.document.ExcelUtil; import com.ruoyi.cms.util.document.MultiSheetExcelUtil; import com.ruoyi.common.exception.ServiceException; @@ -44,6 +47,7 @@ public class AnalysisExportServiceImpl implements AnalysisExportService { private final AnalysisIndustryEmploymentInfoService analysisIndustryEmploymentInfoService; private final AnalysisGraduateEmploymentInfoService analysisGraduateEmploymentInfoService; + private final AnalysisMajorIndustryEmploymentMonitorService analysisMajorIndustryEmploymentMonitorService; @Override public void exportData(HttpServletResponse response, QueryParamDto dto) { @@ -62,7 +66,7 @@ public class AnalysisExportServiceImpl implements AnalysisExportService { break; // 就业大数据专题分析平台-重点行业就失业监测分析 case EMPLOYMENT_MAJOR_INDUSTRY_EMPLOYMENT_MONITOR: - test(response, dto); + exportMajorIndustryEmploymentMonitor(response, dto); break; // 就业大数据专题分析平台-产业发展与人才供需分析 case EMPLOYMENT_SECTOR_TALENT: @@ -90,7 +94,7 @@ public class AnalysisExportServiceImpl implements AnalysisExportService { break; // 智慧就业大数据分析展示系统-重点行业就失业监测分析 case WISDOM_EMPLOYMENT_MAJOR_INDUSTRY_EMPLOYMENT_MONITOR: - test(response, dto); + exportWisdomMajorIndustryEmploymentMonitor(response, dto); break; // 智慧就业大数据分析展示系统-产业与人才供需技能提升分析 case WISDOM_EMPLOYMENT_SECTOR_TALENT_SKILL: @@ -552,7 +556,8 @@ public class AnalysisExportServiceImpl implements AnalysisExportService { basicExportList.add(new ExcelRow("指标(单位)", "指标值")); newParam = new QueryParamDto(); BeanUtils.copyProperties(dto, newParam); - GraduateEmploymentInfoStartupVo startupSituation = analysisGraduateEmploymentInfoService.startupSituation(newParam); + GraduateEmploymentInfoStartupVo startupSituation = + analysisGraduateEmploymentInfoService.startupSituation(newParam); basicExportList.add(new ExcelRow( "创业人数(人)", transform(startupSituation.getStartupCount()) @@ -597,6 +602,203 @@ public class AnalysisExportServiceImpl implements AnalysisExportService { } + /** + * 导出 重点行业就失业监测分析 + * + * @param response 响应 + * @param dto 查询参数 + * @throws IOException 异常 + */ + private void exportMajorIndustryEmploymentMonitor(HttpServletResponse response, QueryParamDto dto) throws IOException { + + MultiSheetExcelUtil multiSheetExcelUtil = new MultiSheetExcelUtil(); + + String exportTime = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS); + + // 数据总览 + List basicExportList = new ArrayList<>(); + basicExportList.add(new ExcelRow("导出时间", exportTime)); + basicExportList.add(new ExcelRow("数据总览")); + basicExportList.add(new ExcelRow("指标名称(单位)", "指标值", "较上期变化(%)")); + QueryParamDto newParam = new QueryParamDto(); + BeanUtils.copyProperties(dto, newParam); + MajorIndustryEmploymentMonitorOverviewVo overview = + analysisMajorIndustryEmploymentMonitorService.overview(newParam); + + basicExportList.add(new ExcelRow( + "监测行业数(个)", transform(overview.getMonitorIndustryCount()), + transform(overview.getMonitorIndustryCountMom()) + )); + basicExportList.add(new ExcelRow( + "监测企业数(家)", transform(overview.getMonitorCompanyCount()), + transform(overview.getMonitorCompanyCountMom()) + )); + basicExportList.add(new ExcelRow( + "累计城镇新增就业人数(人)", transform(overview.getTotalTownEmploymentCount()), + transform(overview.getTotalTownEmploymentCountMom()) + )); + basicExportList.add(new ExcelRow( + "失业人员再就业人数(人)", transform(overview.getUnEmploymentEmploymentCount()), + transform(overview.getUnEmploymentEmploymentCountMom()) + )); + basicExportList.add(new ExcelRow( + "就业困难人员就业人数(人)", transform(overview.getEmploymentDifficultyEmploymentCount()), + transform(overview.getEmploymentDifficultyEmploymentCountMom()) + )); + basicExportList.add(new ExcelRow( + "就业需求(人)", transform(overview.getEmploymentDemandCount()), + transform(overview.getEmploymentDemandCountMom()) + )); + basicExportList.add(new ExcelRow( + "失业人数(人)", transform(overview.getUnEmploymentCount()), + transform(overview.getUnEmploymentCountMom()) + )); + basicExportList.add(new ExcelRow( + "失业率(%)", transform(overview.getUnEmploymentRate()), + transform(overview.getUnEmploymentRateMom()) + )); + + // 创建Excel工具类并添加工作表 + ExcelUtil 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 monitorTreadList = + analysisMajorIndustryEmploymentMonitorService.demandAndUnemploymentRate(newParam); + for (MajorIndustryEmploymentMonitorTreadVo tread : monitorTreadList) { + basicExportList.add(new ExcelRow( + tread.getDesc(), transform(tread.getLaborDemandCount()), transform(tread.getTownEmploymentCount()), + transform(tread.getUnEmploymentRate()), transform(tread.getCityAverageUnEmploymentRate()) + )); + } + // 创建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 treadList = + analysisMajorIndustryEmploymentMonitorService.industryUnemploymentRate(newParam); + for (QueryResultVo tread : treadList) { + basicExportList.add(new ExcelRow( + tread.getDesc(), transform(tread.getCount()), transform(tread.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); + List resultList = analysisMajorIndustryEmploymentMonitorService.salaryLevel(newParam); + for (QueryResultVo result : resultList) { + basicExportList.add(new ExcelRow( + result.getDesc(), transform(result.getAmount()), transform(result.getAnotherAmount()) + )); + } + // 创建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 = analysisMajorIndustryEmploymentMonitorService.industryDistribution(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 = analysisMajorIndustryEmploymentMonitorService.gender(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 = analysisMajorIndustryEmploymentMonitorService.jobType(newParam); + for (QueryResultVo result : resultList) { + basicExportList.add(new ExcelRow( + result.getDesc(), transform(result.getCount()), 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 = analysisMajorIndustryEmploymentMonitorService.layoffAndLaborGap(newParam); + for (QueryResultVo result : resultList) { + basicExportList.add(new ExcelRow( + result.getDesc(), transform(result.getCount()), transform(result.getAnotherCount()) + )); + } + // 创建Excel工具类并添加工作表 + basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class); + basicSituationExcelUtil.setDataList(basicExportList); + basicSituationExcelUtil.setSheetName("裁员和用工缺口监测"); + multiSheetExcelUtil.addSheet(basicSituationExcelUtil); + + + multiSheetExcelUtil.setFileName(dto.getExportModule().getDesc()); + multiSheetExcelUtil.exportExcel(response); + + } + /** * 导出 行业就业情况信息分析 @@ -802,7 +1004,6 @@ public class AnalysisExportServiceImpl implements AnalysisExportService { } - /** * 导出 高校毕业生就业信息分析 * @@ -1037,7 +1238,8 @@ public class AnalysisExportServiceImpl implements AnalysisExportService { basicExportList.add(new ExcelRow("指标(单位)", "指标值")); newParam = new QueryParamDto(); BeanUtils.copyProperties(dto, newParam); - GraduateEmploymentInfoStartupVo startupSituation = analysisGraduateEmploymentInfoService.startupSituation(newParam); + GraduateEmploymentInfoStartupVo startupSituation = + analysisGraduateEmploymentInfoService.startupSituation(newParam); basicExportList.add(new ExcelRow( "创业人数(人)", transform(startupSituation.getStartupCount()) @@ -1083,6 +1285,223 @@ public class AnalysisExportServiceImpl implements AnalysisExportService { } + /** + * 导出 重点行业就失业监测分析 + * + * @param response 响应 + * @param dto 查询参数 + * @throws IOException 异常 + */ + private void exportWisdomMajorIndustryEmploymentMonitor(HttpServletResponse response, QueryParamDto dto) throws IOException { + + MultiSheetExcelUtil multiSheetExcelUtil = new MultiSheetExcelUtil(); + + String exportTime = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS); + + // 数据总览 + List basicExportList = new ArrayList<>(); + basicExportList.add(new ExcelRow("导出时间", exportTime)); + basicExportList.add(new ExcelRow("数据总览")); + basicExportList.add(new ExcelRow("指标名称(单位)", "指标值", "较上期变化(%)")); + QueryParamDto newParam = new QueryParamDto(); + BeanUtils.copyProperties(dto, newParam); + MajorIndustryEmploymentMonitorOverviewVo overview = + analysisMajorIndustryEmploymentMonitorService.overview(newParam); + + basicExportList.add(new ExcelRow( + "监测行业数(个)", transform(overview.getMonitorIndustryCount()), + transform(overview.getMonitorIndustryCountMom()) + )); + basicExportList.add(new ExcelRow( + "监测企业数(家)", transform(overview.getMonitorCompanyCount()), + transform(overview.getMonitorCompanyCountMom()) + )); + basicExportList.add(new ExcelRow( + "累计城镇新增就业人数(人)", transform(overview.getTotalTownEmploymentCount()), + transform(overview.getTotalTownEmploymentCountMom()) + )); + basicExportList.add(new ExcelRow( + "失业人员再就业人数(人)", transform(overview.getUnEmploymentEmploymentCount()), + transform(overview.getUnEmploymentEmploymentCountMom()) + )); + basicExportList.add(new ExcelRow( + "就业困难人员就业人数(人)", transform(overview.getEmploymentDifficultyEmploymentCount()), + transform(overview.getEmploymentDifficultyEmploymentCountMom()) + )); + basicExportList.add(new ExcelRow( + "就业需求(人)", transform(overview.getEmploymentDemandCount()), + transform(overview.getEmploymentDemandCountMom()) + )); + basicExportList.add(new ExcelRow( + "失业人数(人)", transform(overview.getUnEmploymentCount()), + transform(overview.getUnEmploymentCountMom()) + )); + basicExportList.add(new ExcelRow( + "失业率(%)", transform(overview.getUnEmploymentRate()), + transform(overview.getUnEmploymentRateMom()) + )); + + // 创建Excel工具类并添加工作表 + ExcelUtil 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 heatmapList = analysisMajorIndustryEmploymentMonitorService.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("用工需求和失业率趋势")); + basicExportList.add(new ExcelRow("时间", "用工需求(人)", "城镇新增就业(人)", "失业率(%)", "全市平均失业率(%)")); + newParam = new QueryParamDto(); + BeanUtils.copyProperties(dto, newParam); + List monitorTreadList = + analysisMajorIndustryEmploymentMonitorService.demandAndUnemploymentRate(newParam); + for (MajorIndustryEmploymentMonitorTreadVo tread : monitorTreadList) { + basicExportList.add(new ExcelRow( + tread.getDesc(), transform(tread.getLaborDemandCount()), transform(tread.getTownEmploymentCount()), + transform(tread.getUnEmploymentRate()), transform(tread.getCityAverageUnEmploymentRate()) + )); + } + // 创建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 treadList = + analysisMajorIndustryEmploymentMonitorService.industryUnemploymentRate(newParam); + for (QueryResultVo tread : treadList) { + basicExportList.add(new ExcelRow( + tread.getDesc(), transform(tread.getCount()), transform(tread.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); + List resultList = analysisMajorIndustryEmploymentMonitorService.salaryLevel(newParam); + for (QueryResultVo result : resultList) { + basicExportList.add(new ExcelRow( + result.getDesc(), transform(result.getAmount()), transform(result.getAnotherAmount()) + )); + } + // 创建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 = analysisMajorIndustryEmploymentMonitorService.industryDistribution(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 = analysisMajorIndustryEmploymentMonitorService.gender(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 = analysisMajorIndustryEmploymentMonitorService.jobType(newParam); + for (QueryResultVo result : resultList) { + basicExportList.add(new ExcelRow( + result.getDesc(), transform(result.getCount()), 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 = analysisMajorIndustryEmploymentMonitorService.layoffAndLaborGap(newParam); + for (QueryResultVo result : resultList) { + basicExportList.add(new ExcelRow( + result.getDesc(), transform(result.getCount()), transform(result.getAnotherCount()) + )); + } + // 创建Excel工具类并添加工作表 + basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class); + basicSituationExcelUtil.setDataList(basicExportList); + basicSituationExcelUtil.setSheetName("裁员和用工缺口监测"); + multiSheetExcelUtil.addSheet(basicSituationExcelUtil); + + + multiSheetExcelUtil.setFileName(dto.getExportModule().getDesc()); + multiSheetExcelUtil.exportExcel(response); + + } + + + private String transform(Long value) { if (Objects.isNull(value)) { return ""; diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisIndustryEmploymentInfoServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisIndustryEmploymentInfoServiceImpl.java index cb7746c..c05dfd9 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisIndustryEmploymentInfoServiceImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisIndustryEmploymentInfoServiceImpl.java @@ -7,6 +7,8 @@ import com.ruoyi.cms.domain.vo.IndustryEmploymentInfoOverviewVo; import com.ruoyi.cms.domain.vo.QueryResultVo; import com.ruoyi.cms.domain.vo.TreadVo; import com.ruoyi.cms.mapper.ThemeEmploymentRegisterMapper; +import com.ruoyi.cms.mapper.ThemeRecruitmentJobMapper; +import com.ruoyi.cms.mapper.ThemeUnemploymentRegisterMapper; import com.ruoyi.cms.service.AnalysisIndustryEmploymentInfoService; import com.ruoyi.cms.util.MathUtil; import com.ruoyi.cms.util.ParamUtil; @@ -35,6 +37,8 @@ import java.util.List; public class AnalysisIndustryEmploymentInfoServiceImpl implements AnalysisIndustryEmploymentInfoService { private final ThemeEmploymentRegisterMapper themeEmploymentRegisterMapper; + private final ThemeUnemploymentRegisterMapper themeUnemploymentRegisterMapper; + private final ThemeRecruitmentJobMapper themeRecruitmentJobMapper; @Override public IndustryEmploymentInfoOverviewVo overview(QueryParamDto dto) { @@ -43,8 +47,7 @@ public class AnalysisIndustryEmploymentInfoServiceImpl implements AnalysisIndust ParamUtil.dealParam(dto); Long employmentCount = themeEmploymentRegisterMapper.queryEmploymentCount(dto); - // todo 失业人数 - Long unemploymentCount = 13L; + Long unemploymentCount = themeUnemploymentRegisterMapper.queryUnemploymentCount(dto); BigDecimal unemploymentRate = MathUtil.calculatePercentage( (unemploymentCount + employmentCount), unemploymentCount); @@ -54,8 +57,7 @@ public class AnalysisIndustryEmploymentInfoServiceImpl implements AnalysisIndust Long flexibleEmploymentCount = themeEmploymentRegisterMapper.queryFlexibleEmploymentCount(dto); - // todo 岗位表 招聘需求 - Long recruitmentDemand = 1234L; + Long recruitmentDemand = themeRecruitmentJobMapper.queryEmploymentDemandCount(dto); BigDecimal averageSalary = themeEmploymentRegisterMapper.queryAverageSalary(dto); @@ -65,10 +67,9 @@ public class AnalysisIndustryEmploymentInfoServiceImpl implements AnalysisIndust ParamUtil.calculateLastTime(lastDto); Long lastEmploymentCount = themeEmploymentRegisterMapper.queryEmploymentCount(lastDto); - // todo 失业人数 - Long lastUnemploymentCount = 17L; + Long lastUnemploymentCount = themeUnemploymentRegisterMapper.queryUnemploymentCount(lastDto); BigDecimal lastUnemploymentRate = MathUtil.calculatePercentage( - (lastUnemploymentCount + employmentCount), lastUnemploymentCount); + (lastUnemploymentCount + lastEmploymentCount), lastUnemploymentCount); Long lastStartupCompanyCount = themeEmploymentRegisterMapper.queryStartupCompanyCount(lastDto); @@ -76,8 +77,7 @@ public class AnalysisIndustryEmploymentInfoServiceImpl implements AnalysisIndust Long lastFlexibleEmploymentCount = themeEmploymentRegisterMapper.queryFlexibleEmploymentCount(lastDto); - // todo 岗位表 招聘需求 - Long lastRecruitmentDemand = 634L; + Long lastRecruitmentDemand = themeRecruitmentJobMapper.queryEmploymentDemandCount(lastDto); BigDecimal lastAverageSalary = themeEmploymentRegisterMapper.queryAverageSalary(lastDto); diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisMajorIndustryEmploymentMonitorServiceImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisMajorIndustryEmploymentMonitorServiceImpl.java index 3439200..cb2437f 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisMajorIndustryEmploymentMonitorServiceImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/AnalysisMajorIndustryEmploymentMonitorServiceImpl.java @@ -1,25 +1,35 @@ package com.ruoyi.cms.service.impl; import com.ruoyi.cms.constant.CommonConstant; +import com.ruoyi.cms.domain.dto.EmploymentRegisterSqlDto; import com.ruoyi.cms.domain.dto.QueryParamDto; import com.ruoyi.cms.domain.vo.HeatmapVo; import com.ruoyi.cms.domain.vo.MajorIndustryEmploymentMonitorOverviewVo; import com.ruoyi.cms.domain.vo.MajorIndustryEmploymentMonitorTreadVo; import com.ruoyi.cms.domain.vo.QueryResultVo; +import com.ruoyi.cms.mapper.ThemeEmploymentRegisterMapper; +import com.ruoyi.cms.mapper.ThemeRecruitmentJobMapper; +import com.ruoyi.cms.mapper.ThemeUnemploymentRegisterMapper; import com.ruoyi.cms.service.AnalysisMajorIndustryEmploymentMonitorService; import com.ruoyi.cms.util.MathUtil; +import com.ruoyi.cms.util.ParamUtil; +import com.ruoyi.common.exception.ServiceException; +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; import reactor.util.function.Tuple2; -import reactor.util.function.Tuples; import java.math.BigDecimal; -import java.math.RoundingMode; +import java.time.LocalDateTime; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; /** * 重点行业就失业监测分析 @@ -30,162 +40,387 @@ import java.util.List; @Service @Validated @Slf4j +@RequiredArgsConstructor public class AnalysisMajorIndustryEmploymentMonitorServiceImpl implements AnalysisMajorIndustryEmploymentMonitorService { + + private final ThemeRecruitmentJobMapper themeRecruitmentJobMapper; + private final ThemeEmploymentRegisterMapper themeEmploymentRegisterMapper; + private final ThemeUnemploymentRegisterMapper themeUnemploymentRegisterMapper; + + /** + * 处理参数 + * + * @param dto 参数 + */ + private void dealParam(QueryParamDto dto) { + ParamUtil.dealParam(dto); + // 设置重点行业 + List industryList = new ArrayList<>(); + for (Tuple2 industry : CommonConstant.MAJOR_INDUSTRY_LIST) { + industryList.add(industry.getT1()); + } + dto.setIndustryList(industryList); + } + @Override public MajorIndustryEmploymentMonitorOverviewVo overview(QueryParamDto dto) { + + // 计算当前时间段数据 + dealParam(dto); + Long monitorIndustryCount = themeRecruitmentJobMapper.queryMonitorIndustryCount(dto); + + Long monitorCompanyCount = themeRecruitmentJobMapper.queryMonitorCompanyCount(dto); + + EmploymentRegisterSqlDto kindEmploymentCount = themeEmploymentRegisterMapper.queryKindEmploymentCount(dto); + + Long employmentDemandCount = themeRecruitmentJobMapper.queryEmploymentDemandCount(dto); + + Long unemploymentCount = themeUnemploymentRegisterMapper.queryUnemploymentCount(dto); + + Long employmentCount = themeEmploymentRegisterMapper.queryEmploymentCount(dto); + BigDecimal unemploymentRate = MathUtil.calculatePercentage( + (unemploymentCount + employmentCount), unemploymentCount); + + // 计算上一时间段数据 + QueryParamDto lastDto = new QueryParamDto(); + BeanUtils.copyProperties(dto, lastDto); + ParamUtil.calculateLastTime(lastDto); + Long lastMonitorIndustryCount = themeRecruitmentJobMapper.queryMonitorIndustryCount(lastDto); + + Long lastMonitorCompanyCount = themeRecruitmentJobMapper.queryMonitorCompanyCount(lastDto); + + EmploymentRegisterSqlDto lastKindEmploymentCount = + themeEmploymentRegisterMapper.queryKindEmploymentCount(lastDto); + + Long lastEmploymentDemandCount = themeRecruitmentJobMapper.queryEmploymentDemandCount(lastDto); + + Long lastUnemploymentCount = themeUnemploymentRegisterMapper.queryUnemploymentCount(lastDto); + + Long lastEmploymentCount = themeEmploymentRegisterMapper.queryEmploymentCount(lastDto); + BigDecimal lastUnemploymentRate = MathUtil.calculatePercentage( + (lastUnemploymentCount + lastEmploymentCount), lastUnemploymentCount); + return MajorIndustryEmploymentMonitorOverviewVo.builder() - .monitorIndustryCount(12L) - .monitorIndustryCountMom(BigDecimal.valueOf(3.2)) - .monitorCompanyCount(856L) - .monitorCompanyCountMom(BigDecimal.valueOf(5.1)) - .totalTownEmploymentCount(32500L) - .totalTownEmploymentCountMom(BigDecimal.valueOf(4.5)) - .unEmploymentEmploymentCount(12800L) - .unEmploymentEmploymentCountMom(BigDecimal.valueOf(6.3)) - .employmentDifficultyEmploymentCount(5600L) - .employmentDifficultyEmploymentCountMom(BigDecimal.valueOf(-2.1)) - .employmentDemandCount(45000L) - .employmentDemandCountMom(BigDecimal.valueOf(8.7)) - .unEmploymentCount(3800L) - .unEmploymentCountMom(BigDecimal.valueOf(-1.5)) - .unEmploymentRate(BigDecimal.valueOf(4.2)) - .unEmploymentRateMom(BigDecimal.valueOf(-0.3)) + .monitorIndustryCount(monitorIndustryCount) + .monitorIndustryCountMom( + MathUtil.calculatePercentageGrowthRate(lastMonitorIndustryCount, monitorIndustryCount)) + .monitorCompanyCount(monitorCompanyCount) + .monitorCompanyCountMom( + MathUtil.calculatePercentageGrowthRate(lastMonitorCompanyCount, monitorCompanyCount)) + .totalTownEmploymentCount(kindEmploymentCount.getTotalTownEmploymentCount()) + .totalTownEmploymentCountMom( + MathUtil.calculatePercentageGrowthRate(lastKindEmploymentCount.getTotalTownEmploymentCount(), + kindEmploymentCount.getTotalEmploymentCount())) + .unEmploymentEmploymentCount(kindEmploymentCount.getUnEmploymentEmploymentCount()) + .unEmploymentEmploymentCountMom( + MathUtil.calculatePercentageGrowthRate(lastKindEmploymentCount.getUnEmploymentEmploymentCount(), + kindEmploymentCount.getUnEmploymentEmploymentCount())) + .employmentDifficultyEmploymentCount(kindEmploymentCount.getEmploymentDifficultyEmploymentCount()) + .employmentDifficultyEmploymentCountMom( + MathUtil.calculatePercentageGrowthRate(lastKindEmploymentCount.getEmploymentDifficultyEmploymentCount(), + kindEmploymentCount.getEmploymentDifficultyEmploymentCount())) + .employmentDemandCount(employmentDemandCount) + .employmentDemandCountMom( + MathUtil.calculatePercentageGrowthRate(lastEmploymentDemandCount, employmentDemandCount)) + .unEmploymentCount(unemploymentCount) + .unEmploymentCountMom(MathUtil.calculatePercentageGrowthRate(lastUnemploymentCount, unemploymentCount)) + .unEmploymentRate(unemploymentRate) + .unEmploymentRateMom(MathUtil.calculatePercentageGrowthRate(lastUnemploymentRate, unemploymentRate)) .build(); } @Override public List demandAndUnemploymentRate(QueryParamDto dto) { + dealParam(dto); + + List list; + switch (dto.getQueryTimeType()) { + case YEAR: { + 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 labarDemandList = + themeRecruitmentJobMapper.laborDemandTrendYear(dto); + // 就业 + List employmentList = + themeEmploymentRegisterMapper.employmentTrendYear(dto); + // 失业 + List unemploymentList = + themeUnemploymentRegisterMapper.unemploymentTrendYear(dto); + list = dealResult(labarDemandList, employmentList, unemploymentList); + 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 labarDemandList = + themeRecruitmentJobMapper.laborDemandTrendQuarter(dto); + // 就业 + List employmentList = + themeEmploymentRegisterMapper.employmentTrendQuarter(dto); + // 失业 + List unemploymentList = + themeUnemploymentRegisterMapper.unemploymentTrendQuarter(dto); + list = dealResult(labarDemandList, employmentList, unemploymentList); + 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 labarDemandList = + themeRecruitmentJobMapper.laborDemandTrendMonth(dto); + // 就业 + List employmentList = + themeEmploymentRegisterMapper.employmentTrendMonth(dto); + // 失业 + List unemploymentList = + themeUnemploymentRegisterMapper.unemploymentTrendMonth(dto); + list = dealResult(labarDemandList, employmentList, unemploymentList); + break; + } + default: + throw new ServiceException("时间类型错误"); + } + return list; + } + + /** + * 处理结果 + * + * @param labarDemandList 用工需求 + * @param employmentList 就业 + * @param unemploymentList 失业 + * @return 结果 + */ + private List dealResult(List labarDemandList, + List employmentList, + List unemploymentList) { + List list = new ArrayList<>(); - for (int i = 0; i < 12; i++) { + + Map employmentMap = new HashMap<>(); + for (MajorIndustryEmploymentMonitorTreadVo employment : employmentList) { + employmentMap.put(employment.getCode(), employment); + } + Map unemploymentMap = new HashMap<>(); + for (MajorIndustryEmploymentMonitorTreadVo unemployment : unemploymentList) { + unemploymentMap.put(unemployment.getCode(), unemployment); + } + for (MajorIndustryEmploymentMonitorTreadVo vo : labarDemandList) { + MajorIndustryEmploymentMonitorTreadVo employment = Optional.ofNullable(employmentMap.get(vo.getCode())) + .orElse(MajorIndustryEmploymentMonitorTreadVo.builder().build()); + MajorIndustryEmploymentMonitorTreadVo unemployment = Optional.ofNullable(unemploymentMap.get(vo.getCode())) + .orElse(MajorIndustryEmploymentMonitorTreadVo.builder().build()); list.add(MajorIndustryEmploymentMonitorTreadVo.builder() - .code(i + 1 + "") - .desc(i + 1 + "月") - .laborDemandCount((long) Math.floor(Math.random() * 30000) + 1000) - .townEmploymentCount((long) Math.floor(Math.random() * 20000) + 500) - .unEmploymentRate(BigDecimal.valueOf(Math.random() * 5 + 2).setScale(1, RoundingMode.HALF_UP)) - .cityAverageUnEmploymentRate(BigDecimal.valueOf(Math.random() * 4 + 3).setScale(1, RoundingMode.HALF_UP)) - .build()); + .code(vo.getCode()) + .desc(vo.getDesc()) + .laborDemandCount(vo.getLaborDemandCount()) + .townEmploymentCount(Optional.ofNullable(vo.getTownEmploymentCount()).orElse(0L)) + .employmentCount(employment.getEmploymentCount()) + .unemploymentCount(unemployment.getUnemploymentCount()) + .unEmploymentRate( + MathUtil.calculatePercentage((employment.getEmploymentCount() + unemployment.getUnemploymentCount()), + unemployment.getUnemploymentCount())) + .cityAverageEmploymentCount(employment.getCityAverageEmploymentCount()) + .cityAverageUnemploymentCount(unemployment.getCityAverageUnemploymentCount()) + .cityAverageUnEmploymentRate( + MathUtil.calculatePercentage((employment.getCityAverageEmploymentCount() + unemployment.getCityAverageUnemploymentCount()), + unemployment.getCityAverageUnemploymentCount())) + .build() + ); } return list; } @Override public List industryUnemploymentRate(QueryParamDto dto) { - List list = new ArrayList<>(); - for (Tuple2 industry : CommonConstant.MAJOR_INDUSTRY_LIST) { - list.add(QueryResultVo.builder() - .code(industry.getT1()) - .desc(industry.getT2()) - .count((long) Math.floor(Math.random() * 10000) + 1) - .rate(BigDecimal.valueOf(Math.random() * 30 + 2).setScale(1, RoundingMode.HALF_UP)) - .build()); + + + dealParam(dto); + + // 用工需求 + List laborDemandList = themeRecruitmentJobMapper.queryEmploymentDemandCountByIndustry(dto); + // 就业人数 + List employmentList = themeEmploymentRegisterMapper.queryEmploymentCountByIndustry(dto); + // 失业人数 + List unemploymentList = themeUnemploymentRegisterMapper.queryUnemploymentCountByIndustry(dto); + + Set industrySet = new HashSet<>(); + Map loborDemandMap = new HashMap<>(); + for (QueryResultVo vo : laborDemandList) { + industrySet.add(vo.getCode()); + loborDemandMap.put(vo.getCode(), vo); } + Map employmentMap = new HashMap<>(); + for (QueryResultVo vo : employmentList) { + industrySet.add(vo.getCode()); + employmentMap.put(vo.getCode(), vo); + } + Map unemploymentMap = new HashMap<>(); + for (QueryResultVo vo : unemploymentList) { + industrySet.add(vo.getCode()); + unemploymentMap.put(vo.getCode(), vo); + } + List list = new ArrayList<>(); + for (String industry : industrySet) { + QueryResultVo laborDemand = Optional.ofNullable(loborDemandMap.get(industry)) + .orElse(QueryResultVo.builder().build()); + QueryResultVo employment = Optional.ofNullable(employmentMap.get(industry)) + .orElse(QueryResultVo.builder().build()); + QueryResultVo unemployment = Optional.ofNullable(unemploymentMap.get(industry)) + .orElse(QueryResultVo.builder().build()); + + BigDecimal unEmploymentRate = + MathUtil.calculatePercentage((employment.getCount() + unemployment.getCount()), + unemployment.getCount()); + + QueryResultVo vo = QueryResultVo.builder() + .code(industry) + .count(Optional.ofNullable(laborDemand.getCount()).orElse(0L)) + .rate(unEmploymentRate) + .build(); + list.add(vo); + } + ParamUtil.fillDictName(list, "majorIndustry"); return list; } @Override public List industryDistribution(QueryParamDto dto) { - List list = new ArrayList<>(); - for (Tuple2 industry : CommonConstant.MAJOR_INDUSTRY_LIST) { - list.add(QueryResultVo.builder() - .code(industry.getT1()) - .desc(industry.getT2()) - .count((long) Math.floor(Math.random() * 100000) + 1) - .build()); - } + + dealParam(dto); + List list = themeUnemploymentRegisterMapper.industryDistribution(dto); MathUtil.calculatePercentage(list); + ParamUtil.fillDictName(list, "majorIndustry"); + return list; } @Override public List salaryLevel(QueryParamDto dto) { - List list = new ArrayList<>(); - for (Tuple2 industry : CommonConstant.MAJOR_INDUSTRY_LIST) { - list.add(QueryResultVo.builder() - .code(industry.getT1()) - .desc(industry.getT2()) - .amount(BigDecimal.valueOf(Math.random() * 20000 + 2).setScale(1, RoundingMode.HALF_UP)) - .anotherAmount(BigDecimal.valueOf(Math.random() * 20000 + 2).setScale(1, RoundingMode.HALF_UP)) - .build()); - } + + dealParam(dto); + + List list = themeRecruitmentJobMapper.salaryLevel(dto); + ParamUtil.fillDictName(list, "majorIndustry"); + return list; } @Override public List gender(QueryParamDto dto) { - List list = new ArrayList<>(); - List> genderList = - Collections.unmodifiableList(new ArrayList<>(Arrays.asList( - Tuples.of("1", "男"), - Tuples.of("2", "女") - ))); - for (Tuple2 gender : genderList) { - list.add(QueryResultVo.builder() - .code(gender.getT1()) - .desc(gender.getT2()) - .count((long) Math.floor(Math.random() * 100000) + 1) - .build()); - } + + dealParam(dto); + List list = themeUnemploymentRegisterMapper.gender(dto); MathUtil.calculatePercentage(list); + ParamUtil.fillDictName(list, "gender"); + return list; } @Override public List jobType(QueryParamDto dto) { - List list = new ArrayList<>(); - List> jobTypeList = - Collections.unmodifiableList(new ArrayList<>(Arrays.asList( - Tuples.of("1", "管理人员"), - Tuples.of("2", "专业技术人员"), - Tuples.of("3", "技能工人"), - Tuples.of("4", "一般员工"), - Tuples.of("5", "其他") - ))); - for (Tuple2 jobType : jobTypeList) { - list.add(QueryResultVo.builder() - .code(jobType.getT1()) - .desc(jobType.getT2()) - .count((long) Math.floor(Math.random() * 100000) + 1) - .build()); + + // 用工需求 + List laborDemandList = themeRecruitmentJobMapper.queryEmploymentDemandCountByJobType(dto); + // 就业 + List employmentList = themeEmploymentRegisterMapper.queryEmploymentCountByJobType(dto); + // 失业 + List unemploymentList = themeUnemploymentRegisterMapper.queryUnemploymentCountByJobType(dto); + + + Set jobTypeSet = new HashSet<>(); + Map loborDemandMap = new HashMap<>(); + for (QueryResultVo vo : laborDemandList) { + jobTypeSet.add(vo.getCode()); + loborDemandMap.put(vo.getCode(), vo); } - MathUtil.calculatePercentage(list); + Map employmentMap = new HashMap<>(); + for (QueryResultVo vo : employmentList) { + jobTypeSet.add(vo.getCode()); + employmentMap.put(vo.getCode(), vo); + } + Map unemploymentMap = new HashMap<>(); + for (QueryResultVo vo : unemploymentList) { + jobTypeSet.add(vo.getCode()); + unemploymentMap.put(vo.getCode(), vo); + } + List list = new ArrayList<>(); + for (String jobType : jobTypeSet) { + QueryResultVo laborDemand = Optional.ofNullable(loborDemandMap.get(jobType)) + .orElse(QueryResultVo.builder().build()); + QueryResultVo employment = Optional.ofNullable(employmentMap.get(jobType)) + .orElse(QueryResultVo.builder().build()); + QueryResultVo unemployment = Optional.ofNullable(unemploymentMap.get(jobType)) + .orElse(QueryResultVo.builder().build()); + + BigDecimal unEmploymentRate = + MathUtil.calculatePercentage((employment.getCount() + unemployment.getCount()), + unemployment.getCount()); + + QueryResultVo vo = QueryResultVo.builder() + .code(jobType) + .count(Optional.ofNullable(laborDemand.getCount()).orElse(0L)) + .rate(unEmploymentRate) + .build(); + list.add(vo); + } + ParamUtil.fillDictName(list, "jobType"); return list; } @Override public List layoffAndLaborGap(QueryParamDto dto) { - List list = new ArrayList<>(); - for (Tuple2 industry : CommonConstant.MAJOR_INDUSTRY_LIST) { - list.add(QueryResultVo.builder() - .code(industry.getT1()) - .desc(industry.getT2()) - .count((long) Math.floor(Math.random() * 5000) + 1) - .anotherCount((long) Math.floor(Math.random() * 5000) + 1) - .build()); + + dealParam(dto); + + // 裁员 + List layoffList = themeUnemploymentRegisterMapper.queryLayoffCountByIndustry(dto); + // 用工缺口 + List laborGapList = themeRecruitmentJobMapper.queryLaborGapCountByIndustry(dto); + + Set industrySet = new HashSet<>(); + Map layoffMap = new HashMap<>(); + for (QueryResultVo vo : layoffList) { + industrySet.add(vo.getCode()); + layoffMap.put(vo.getCode(), vo); } + Map laborGapMap = new HashMap<>(); + for (QueryResultVo vo : laborGapList) { + industrySet.add(vo.getCode()); + laborGapMap.put(vo.getCode(), vo); + } + List list = new ArrayList<>(); + for (String industry : industrySet) { + QueryResultVo layoff = Optional.ofNullable(layoffMap.get(industry)) + .orElse(QueryResultVo.builder().build()); + QueryResultVo laborGap = Optional.ofNullable(laborGapMap.get(industry)) + .orElse(QueryResultVo.builder().build()); + + QueryResultVo vo = QueryResultVo.builder() + .code(industry) + .count(Optional.ofNullable(layoff.getCount()).orElse(0L)) + .anotherCount(Optional.ofNullable(laborGap.getCount()).orElse(0L)) + .build(); + list.add(vo); + } + ParamUtil.fillDictName(list, "majorIndustry"); return list; } @Override public List heatmap(QueryParamDto dto) { - List list = new ArrayList<>(); - for (Tuple2 area : CommonConstant.AREA_LIST) { - list.add(HeatmapVo.builder() - .areaCode(area.getT1()) - .areaName(area.getT2()) - .count((long) Math.floor(Math.random() * 10000) + 1) - .build()); - } - long totalCount = list.stream().mapToLong(HeatmapVo::getCount).sum(); - for (HeatmapVo vo : list) { - if (totalCount > 0) { - vo.setPercentage(new BigDecimal(vo.getCount()) - .divide(BigDecimal.valueOf(totalCount), 4, RoundingMode.HALF_UP) - .multiply(BigDecimal.valueOf(100)) - .setScale(2, RoundingMode.HALF_UP)); - } - } + + dealParam(dto); + List list = themeRecruitmentJobMapper.heatmap(dto); + // 计算占比 + MathUtil.calculatePercentageHeatmap(list); return list; } } \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/util/ParamUtil.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/util/ParamUtil.java index ab441c2..ea6c345 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/util/ParamUtil.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/util/ParamUtil.java @@ -169,6 +169,9 @@ public class ParamUtil { case "industry": { return Optional.ofNullable(CommonConstant.INDUSTRY_MAP.get(code)).orElse("未知"); } + case "majorIndustry": { + return Optional.ofNullable(CommonConstant.MAJOR_INDUSTRY_MAP.get(code)).orElse("未知"); + } case "educationLevel": { return Optional.ofNullable(CommonConstant.EDUCATION_LEVEL_MAP.get(code)).orElse("未知"); } @@ -184,6 +187,9 @@ public class ParamUtil { case "employmentCrowd": { return Optional.ofNullable(CommonConstant.EMPLOYMENT_CROWD_MAP.get(code)).orElse("未知"); } + case "jobType": { + return Optional.ofNullable(CommonConstant.JOB_TYPE_MAP.get(code)).orElse("未知"); + } default: throw new ServiceException("字典名称错误"); } diff --git a/ruoyi-bussiness/src/main/resources/mapper/ThemeEmploymentRegisterMapper.xml b/ruoyi-bussiness/src/main/resources/mapper/ThemeEmploymentRegisterMapper.xml index f66d031..2ec685c 100644 --- a/ruoyi-bussiness/src/main/resources/mapper/ThemeEmploymentRegisterMapper.xml +++ b/ruoyi-bussiness/src/main/resources/mapper/ThemeEmploymentRegisterMapper.xml @@ -12,6 +12,13 @@ AND AAB022 LIKE #{industry} || '%' + + AND ( + + AAB022 LIKE #{industry} || '%' + + ) + AND (ABE585 IS NULL OR ABE585 > #{endTime}) @@ -29,6 +36,23 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/resources/mapper/ThemeRecruitmentJobMapper.xml b/ruoyi-bussiness/src/main/resources/mapper/ThemeRecruitmentJobMapper.xml new file mode 100644 index 0000000..3afa880 --- /dev/null +++ b/ruoyi-bussiness/src/main/resources/mapper/ThemeRecruitmentJobMapper.xml @@ -0,0 +1,310 @@ + + + + + + + posting_date BETWEEN #{startTime} AND #{endTime} + + AND job_location_area_code = #{area} + + + AND industry LIKE #{industry} || '%' + + + AND ( + + industry LIKE #{industry} || '%' + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-bussiness/src/main/resources/mapper/ThemeUnemploymentRegisterMapper.xml b/ruoyi-bussiness/src/main/resources/mapper/ThemeUnemploymentRegisterMapper.xml new file mode 100644 index 0000000..3a28672 --- /dev/null +++ b/ruoyi-bussiness/src/main/resources/mapper/ThemeUnemploymentRegisterMapper.xml @@ -0,0 +1,322 @@ + + + + + + + + ADC210 BETWEEN #{startTime} AND #{endTime} + + AND AAB301 = #{area} + + + AND AAB022 LIKE #{industry} || '%' + + + AND ( + + AAB022 LIKE #{industry} || '%' + + ) + + + AND (ABE586 IS NULL OR ABE586 > #{endTime}) + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sql/datadashboard/table.sql b/sql/datadashboard/table.sql index 4d1b5d5..1cf490c 100644 --- a/sql/datadashboard/table.sql +++ b/sql/datadashboard/table.sql @@ -341,4 +341,357 @@ COMMENT ON COLUMN shz_data_dashboard.theme_graduate_info."ACC22G" IS '是否发展前景满意'; COMMENT -ON TABLE shz_data_dashboard.theme_graduate_info IS '高校毕业生主题库'; \ No newline at end of file +ON TABLE shz_data_dashboard.theme_graduate_info IS '高校毕业生主题库'; + + +-- 失业登记主题库 +CREATE TABLE shz_data_dashboard.theme_unemployment_register +( + "AAC043" character varying(2) COLLATE pg_catalog."default", + "AAC044" character varying(20) COLLATE pg_catalog."default", + "AAC003" character varying(200) COLLATE pg_catalog."default", + "ADC210" timestamp without time zone, + "ACC412" character varying(2) COLLATE pg_catalog."default", + "AJC093" character varying(200) COLLATE pg_catalog."default", + "AAB301" character varying(50) COLLATE pg_catalog."default", + "AAF001" character varying(255) COLLATE pg_catalog."default", + "AAF011" character varying(128) COLLATE pg_catalog."default", + "AJC174" character varying(2) COLLATE pg_catalog."default", + "ABE587" character varying(2) COLLATE pg_catalog."default", + "ABE586" timestamp without time zone, + "AJC119" character varying(255) COLLATE pg_catalog."default", + "AAB004" character varying(50) COLLATE pg_catalog."default", + "AAB003" character varying(50) COLLATE pg_catalog."default", + "AAB998" character varying(50) COLLATE pg_catalog."default", + "ADC310" character varying(10) COLLATE pg_catalog."default", + "AAC008" character varying(2) COLLATE pg_catalog."default", + "ACC361" timestamp without time zone, + "ABE588" timestamp without time zone, + "AAB019" character varying(10) COLLATE pg_catalog."default", + "AAB022" character varying(10) COLLATE pg_catalog."default", + "AAB020" character varying(10) COLLATE pg_catalog."default", + "ACA112" character varying(10) COLLATE pg_catalog."default", + "AAC004" character varying(10) COLLATE pg_catalog."default" +) +; + +ALTER TABLE shz_data_dashboard.theme_unemployment_register + OWNER TO sysdba; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAC043" IS '证件类型'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAC044" IS '证件号码'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAC003" IS '姓名'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."ADC210" IS '失业登记日期'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."ACC412" IS '失业登记地类型'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AJC093" IS '失业原因'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAB301" IS '经办机构所属地区行政区划代码'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAF001" IS '经办机构编号'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAF011" IS '经办机构名称'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AJC174" IS '是否申领失业保险金'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."ABE587" IS '注销失业登记标识'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."ABE586" IS '注销失业登记日期'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AJC119" IS '注销失业登记原因'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAB004" IS '失业前所在用人单位名称'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAB003" IS '失业前所在用人单位统一社会信用代码'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAB998" IS '失业前所在用人单位组织机构代码'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."ADC310" IS '就业困难人员类型'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAC008" IS '是否零就业家庭'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."ACC361" IS '就业困难人员认定日期'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."ABE588" IS '就业困难人员退出日期'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAB019" IS '单位类型'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAB022" IS '所属行业'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAB020" IS '经济类型'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."ACA112" IS '工种名称'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_unemployment_register."AAC004" IS '性别'; + +COMMENT +ON TABLE shz_data_dashboard.theme_unemployment_register IS '失业登记主题库'; + +-- 招聘岗位主题库 +CREATE TABLE shz_data_dashboard.theme_recruitment_job +( + job_id bigint, + job_title character varying(200) COLLATE pg_catalog."default", + min_salary integer, + max_salary integer, + education character varying(100) COLLATE pg_catalog."default", + experience character varying(100) COLLATE pg_catalog."default", + job_location character varying(100) COLLATE pg_catalog."default", + posting_date timestamp without time zone, + vacancies integer, + create_time timestamp without time zone, + update_time timestamp without time zone, + is_hot character varying(2) COLLATE pg_catalog."default", + apply_num character varying(20) COLLATE pg_catalog."default", + job_location_area_code character varying(50) COLLATE pg_catalog."default", + job_category character varying(255) COLLATE pg_catalog."default", + job_type character varying(255) COLLATE pg_catalog."default", + type character varying(255) COLLATE pg_catalog."default", + job_address text COLLATE pg_catalog."default", + company_id bigint, + name character varying(255) COLLATE pg_catalog."default", + location character varying(255) COLLATE pg_catalog."default", + industry character varying(100) COLLATE pg_catalog."default", + scale character varying(50) COLLATE pg_catalog."default", + del_flag character varying(1) COLLATE pg_catalog."default", + code character varying(100) COLLATE pg_catalog."default", + description text COLLATE pg_catalog."default", + nature character varying(100) COLLATE pg_catalog."default", + total_recruitment integer, + is_imp_company character varying(10) COLLATE pg_catalog."default", + imp_company_type character varying(20) COLLATE pg_catalog."default" +) +; + +ALTER TABLE shz_data_dashboard.theme_recruitment_job + OWNER TO sysdba; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.job_id IS '工作id'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.job_title IS '职位名称'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.min_salary IS '最小薪资'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.max_salary IS '最大薪资'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.education IS '学历要求'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.experience IS '工作经验要求'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.job_location IS '岗位区划'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.posting_date IS '发布时间'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.vacancies IS '招聘人数'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.create_time IS '创建时间'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.update_time IS '更新时间'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.is_hot IS '是否火'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.apply_num IS '申请次数'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.job_location_area_code IS '工作地点'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.job_category IS '岗位分类名称'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.job_type IS '岗位类型 0疆内 1疆外'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.type IS '类型 0常规岗位 1就业见习岗位 2实习实训岗位 3社区实践岗位 4零工 对应字段字典position_type'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.job_address IS '工作地点'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.company_id IS '公司id'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.name IS '单位名称'; + +COMMENT +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.scale IS '单位规模'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.del_flag IS '删除标志'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.code IS '信用代码'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.description IS '单位介绍'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.nature IS '企业性质'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.total_recruitment IS '招聘数量'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.is_imp_company IS '是否本地重点企业'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_recruitment_job.imp_company_type IS '本地重点发展产业'; + +COMMENT +ON TABLE shz_data_dashboard.theme_recruitment_job IS '招聘岗位主题库'; + +-- 求职者主题库 +CREATE TABLE shz_data_dashboard.theme_job_seeker +( + user_id bigint, + name character varying(200) COLLATE pg_catalog."default", + age character varying(10) COLLATE pg_catalog."default", + sex character varying(1) COLLATE pg_catalog."default", + birth_date timestamp without time zone, + education character varying(2) COLLATE pg_catalog."default", + political_affiliation character varying(100) COLLATE pg_catalog."default", + 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", + 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", + login_date timestamp without time zone, + create_time timestamp without time zone, + update_time timestamp without time zone, + job_title_id text COLLATE pg_catalog."default", + experience character varying(500) COLLATE pg_catalog."default", + id_card character varying(200) COLLATE pg_catalog."default", + nation character varying(64) COLLATE pg_catalog."default", + work_experience character varying(10) COLLATE pg_catalog."default", + domicile_address character varying(200) COLLATE pg_catalog."default", + address character varying(200) COLLATE pg_catalog."default", + user_type character varying(40) COLLATE pg_catalog."default" +) +; + +ALTER TABLE shz_data_dashboard.theme_job_seeker + OWNER TO sysdba; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.user_id IS '用户id'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.name IS '用户名称'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.age IS '年龄段'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.sex IS '用户性别'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.birth_date IS '生日'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.education IS '学历'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.political_affiliation IS '政治面貌'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.phone IS '手机号码'; + +COMMENT +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.area IS '期望工作地'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.status IS '帐号状态'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.del_flag IS '删除标志'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.login_date IS '最后登录时间'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.create_time IS '创建时间'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.update_time IS '更新时间'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.job_title_id IS '期望岗位'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.experience IS '期望薪资'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.id_card IS '身份证'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.nation IS '民族'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.work_experience IS '工作经验'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.domicile_address IS '户籍地址'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.address IS '地址'; + +COMMENT +ON COLUMN shz_data_dashboard.theme_job_seeker.user_type IS '用户类型'; + +COMMENT +ON TABLE shz_data_dashboard.theme_job_seeker IS '求职者主题库'; \ No newline at end of file