添加功能
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
package com.ruoyi.cms.constant;
|
||||
|
||||
import com.ruoyi.cms.domain.vo.DictVo;
|
||||
import reactor.util.function.Tuple2;
|
||||
import reactor.util.function.Tuples;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -134,6 +132,15 @@ public class CommonConstant {
|
||||
Tuples.of("3", "专科院校"),
|
||||
Tuples.of("4", "民办院校")
|
||||
)));
|
||||
/**
|
||||
* 高校类型Map
|
||||
*/
|
||||
public static final Map<String, String> UNIVERSITY_TYPE_MAP =
|
||||
Collections.unmodifiableMap(UNIVERSITY_TYPE_LIST.stream()
|
||||
.collect(Collectors.toMap(
|
||||
Tuple2::getT1,
|
||||
Tuple2::getT2
|
||||
)));
|
||||
|
||||
/**
|
||||
* 产业列表
|
||||
@@ -161,4 +168,107 @@ public class CommonConstant {
|
||||
Tuples.of("6", "其他重点人群")
|
||||
)));
|
||||
|
||||
|
||||
/**
|
||||
* 学历水平列表
|
||||
*/
|
||||
public static final List<Tuple2<String, String>> EDUCATION_LEVEL_LIST =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("11", "博士研究生"),
|
||||
Tuples.of("14", "硕士研究生"),
|
||||
Tuples.of("21", "大学本科"),
|
||||
Tuples.of("31", "大学专科"),
|
||||
Tuples.of("41", "中等专科"),
|
||||
Tuples.of("44", "职业高中"),
|
||||
Tuples.of("47", "技工学校"),
|
||||
Tuples.of("61", "普通高中"),
|
||||
Tuples.of("71", "初中"),
|
||||
Tuples.of("81", "小学"),
|
||||
Tuples.of("90", "其他")
|
||||
)));
|
||||
/**
|
||||
* 学历水平Map
|
||||
*/
|
||||
public static final Map<String, String> EDUCATION_LEVEL_MAP =
|
||||
Collections.unmodifiableMap(EDUCATION_LEVEL_LIST.stream()
|
||||
.collect(Collectors.toMap(
|
||||
Tuple2::getT1,
|
||||
Tuple2::getT2
|
||||
)));
|
||||
|
||||
/**
|
||||
* 性别列表
|
||||
*/
|
||||
public static final List<Tuple2<String, String>> GENDER_LIST =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "男"),
|
||||
Tuples.of("2", "女"),
|
||||
Tuples.of("9", "未说明性别")
|
||||
)));
|
||||
/**
|
||||
* 性别Map
|
||||
*/
|
||||
public static final Map<String, String> GENDER_MAP =
|
||||
Collections.unmodifiableMap(GENDER_LIST.stream()
|
||||
.collect(Collectors.toMap(
|
||||
Tuple2::getT1,
|
||||
Tuple2::getT2
|
||||
)));
|
||||
|
||||
/**
|
||||
* 就业流向列表
|
||||
*/
|
||||
public static final List<Tuple2<String, String>> EMPLOYMENT_FLOW_LIST =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "本地"),
|
||||
Tuples.of("2", "省内"),
|
||||
Tuples.of("3", "省外")
|
||||
)));
|
||||
/**
|
||||
* 就业流向Map
|
||||
*/
|
||||
public static final Map<String, String> EMPLOYMENT_FLOW_MAP =
|
||||
Collections.unmodifiableMap(EMPLOYMENT_FLOW_LIST.stream()
|
||||
.collect(Collectors.toMap(
|
||||
Tuple2::getT1,
|
||||
Tuple2::getT2
|
||||
)));
|
||||
|
||||
/**
|
||||
* 就业去向列表
|
||||
*/
|
||||
public static final List<Tuple2<String, String>> EMPLOYMENT_CROWD_LIST =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("011", "党政机关就业"),
|
||||
Tuples.of("012", "事业单位就业"),
|
||||
Tuples.of("013", "国有企业就业"),
|
||||
Tuples.of("014", "非国有企业就业"),
|
||||
Tuples.of("015", "部队就业(无军籍)"),
|
||||
Tuples.of("021", "个体经营"),
|
||||
Tuples.of("022", "灵活就业等其他自主就业"),
|
||||
Tuples.of("030", "公益性岗位安置"),
|
||||
Tuples.of("040", "自主创业"),
|
||||
Tuples.of("051", "社区岗位"),
|
||||
Tuples.of("052", "基层项目"),
|
||||
Tuples.of("053", "科研助理"),
|
||||
Tuples.of("059", "其他形式就业"),
|
||||
Tuples.of("060", "应征入伍"),
|
||||
Tuples.of("070", "升学"),
|
||||
Tuples.of("080", "出国(境)"),
|
||||
Tuples.of("091", "就业见习"),
|
||||
Tuples.of("092", "职业培训"),
|
||||
Tuples.of("093", "正在求职"),
|
||||
Tuples.of("094", "自愿暂时不就业"),
|
||||
Tuples.of("095", "其他情况未就业"),
|
||||
Tuples.of("990", "联系不上")
|
||||
)));
|
||||
/**
|
||||
* 就业去向Map
|
||||
*/
|
||||
public static final Map<String, String> EMPLOYMENT_CROWD_MAP =
|
||||
Collections.unmodifiableMap(EMPLOYMENT_CROWD_LIST.stream()
|
||||
.collect(Collectors.toMap(
|
||||
Tuple2::getT1,
|
||||
Tuple2::getT2
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
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/28
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GraduateEmploymentInfoSqlDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7622992159887654746L;
|
||||
/**
|
||||
* 总人数
|
||||
*/
|
||||
private Long totalCount;
|
||||
/**
|
||||
* 工作环境满意人数
|
||||
*/
|
||||
private Long workEnvironmentSatisfiedCount;
|
||||
/**
|
||||
* 薪资福利满意人数
|
||||
*/
|
||||
private Long salaryWelfareSatisfiedCount;
|
||||
/**
|
||||
* 发展前景满意人数
|
||||
*/
|
||||
private Long developmentForegroundSatisfiedCount;
|
||||
/**
|
||||
* 工作综合满意人数
|
||||
*/
|
||||
private Long workComprehensiveSatisfiedCount;
|
||||
}
|
||||
@@ -21,6 +21,10 @@ import java.math.BigDecimal;
|
||||
public class GraduateEmploymentInfoStartupVo implements Serializable {
|
||||
private static final long serialVersionUID = 7840585628012934541L;
|
||||
|
||||
/**
|
||||
* 总人数
|
||||
*/
|
||||
private Long totalCount;
|
||||
/**
|
||||
* 创业总数
|
||||
*/
|
||||
@@ -33,6 +37,10 @@ public class GraduateEmploymentInfoStartupVo implements Serializable {
|
||||
* 创业带动就业岗位数
|
||||
*/
|
||||
private Long startupEmploymentJobCount;
|
||||
/**
|
||||
* 创业成功数
|
||||
*/
|
||||
private Long startupSuccessCount;
|
||||
/**
|
||||
* 创业成功率
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.ruoyi.cms.mapper;
|
||||
|
||||
import com.ruoyi.cms.domain.dto.GraduateEmploymentInfoSqlDto;
|
||||
import com.ruoyi.cms.domain.dto.QueryParamDto;
|
||||
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.QueryResultVo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 高校毕业生主题库
|
||||
*
|
||||
* @author 马宝龙
|
||||
* @date 2026/6/28
|
||||
*/
|
||||
public interface ThemeGraduateInfoMapper {
|
||||
|
||||
/**
|
||||
* 查询毕业生人数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 人数
|
||||
*/
|
||||
Long queryGraduateCount(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 查询就业登记人数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 人数
|
||||
*/
|
||||
Long queryEmploymentCount(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 查询平均薪资
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 平均薪资
|
||||
*/
|
||||
BigDecimal queryAverageSalary(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 查询升学深造人数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 人数
|
||||
*/
|
||||
Long queryFurtherEducationCount(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 行业就业规模与增长趋势 - 年度
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
List<GraduateEmploymentInfoTreadVo> scaleAndTrendYear(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 行业就业规模与增长趋势 - 季度
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
List<GraduateEmploymentInfoTreadVo> scaleAndTrendQuarter(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 行业就业规模与增长趋势 - 月度
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
List<GraduateEmploymentInfoTreadVo> scaleAndTrendMonth(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 学历层次就业分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<GraduateEmploymentInfoTreadVo> educationLevel(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 高校类型就业对比
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> universityType(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 主要专业就业情况
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> majorProfessional(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 性别就业差异分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> gender(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 毕业生地区流向分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> areaFlow(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 就业行业分布
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> industryDistribution(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 薪资水平分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> salaryLevel(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 就业满意度评估
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果
|
||||
*/
|
||||
GraduateEmploymentInfoSqlDto satisfactionAssessment(QueryParamDto dto);
|
||||
/**
|
||||
* 毕业生创业情况
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
GraduateEmploymentInfoStartupVo startupSituation(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 未就业人群分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> notEmploymentCrowd(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 热力图
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 热力图列表
|
||||
*/
|
||||
List<HeatmapVo> heatmap(QueryParamDto dto);
|
||||
}
|
||||
@@ -2,11 +2,15 @@ package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.ruoyi.cms.domain.dto.ExcelRow;
|
||||
import com.ruoyi.cms.domain.dto.QueryParamDto;
|
||||
import com.ruoyi.cms.domain.vo.GraduateEmploymentInfoOverviewVo;
|
||||
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.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.util.document.ExcelUtil;
|
||||
import com.ruoyi.cms.util.document.MultiSheetExcelUtil;
|
||||
@@ -39,6 +43,7 @@ import java.util.Objects;
|
||||
public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
|
||||
private final AnalysisIndustryEmploymentInfoService analysisIndustryEmploymentInfoService;
|
||||
private final AnalysisGraduateEmploymentInfoService analysisGraduateEmploymentInfoService;
|
||||
|
||||
@Override
|
||||
public void exportData(HttpServletResponse response, QueryParamDto dto) {
|
||||
@@ -53,7 +58,7 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
break;
|
||||
// 就业大数据专题分析平台-高校毕业生就业信息分析
|
||||
case EMPLOYMENT_GRADUATE_EMPLOYMENT_INFO:
|
||||
test(response, dto);
|
||||
exportGraduateEmploymentInfo(response, dto);
|
||||
break;
|
||||
// 就业大数据专题分析平台-重点行业就失业监测分析
|
||||
case EMPLOYMENT_MAJOR_INDUSTRY_EMPLOYMENT_MONITOR:
|
||||
@@ -81,7 +86,7 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
break;
|
||||
// 智慧就业大数据分析展示系统-高校毕业生就业信息分析
|
||||
case WISDOM_EMPLOYMENT_GRADUATE_EMPLOYMENT_INFO:
|
||||
test(response, dto);
|
||||
exportWisdomGraduateEmploymentInfo(response, dto);
|
||||
break;
|
||||
// 智慧就业大数据分析展示系统-重点行业就失业监测分析
|
||||
case WISDOM_EMPLOYMENT_MAJOR_INDUSTRY_EMPLOYMENT_MONITOR:
|
||||
@@ -170,7 +175,7 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
"总就业人数(人)", transform(overview.getEmploymentCount()), transform(overview.getEmploymentCountMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"失业率《%)", transform(overview.getUnemploymentRate()), transform(overview.getUnemploymentRateMom())
|
||||
"失业率(%)", transform(overview.getUnemploymentRate()), transform(overview.getUnemploymentRateMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"创业企业总数(家)", transform(overview.getStartupCompanyCount()),
|
||||
@@ -331,6 +336,268 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出 高校毕业生就业信息分析
|
||||
*
|
||||
* @param response 响应
|
||||
* @param dto 查询参数
|
||||
* @throws IOException 异常
|
||||
*/
|
||||
private void exportGraduateEmploymentInfo(HttpServletResponse response, QueryParamDto dto) throws IOException {
|
||||
|
||||
MultiSheetExcelUtil multiSheetExcelUtil = new MultiSheetExcelUtil();
|
||||
|
||||
String exportTime = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||
|
||||
// 数据总览
|
||||
List<ExcelRow> basicExportList = new ArrayList<>();
|
||||
basicExportList.add(new ExcelRow("导出时间", exportTime));
|
||||
basicExportList.add(new ExcelRow("数据总览"));
|
||||
basicExportList.add(new ExcelRow("指标名称(单位)", "指标值", "较上期变化(%)"));
|
||||
QueryParamDto newParam = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, newParam);
|
||||
GraduateEmploymentInfoOverviewVo overview = analysisGraduateEmploymentInfoService.overview(newParam);
|
||||
|
||||
basicExportList.add(new ExcelRow(
|
||||
"毕业生总数(人)", transform(overview.getGraduateCount()), transform(overview.getGraduateCountMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"就业人数(人)", transform(overview.getEmploymentCount()), transform(overview.getEmploymentCountMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"就业率(%)", transform(overview.getEmploymentRate()), transform(overview.getEmploymentRateMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"平均起薪(元)", transform(overview.getAverageSalary()),
|
||||
transform(overview.getAverageSalaryMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"升学深造(人)", transform(overview.getFurtherEducationCount()),
|
||||
transform(overview.getFurtherEducationCountMom())
|
||||
));
|
||||
|
||||
// 创建Excel工具类并添加工作表
|
||||
ExcelUtil<ExcelRow> basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
|
||||
basicSituationExcelUtil.setDataList(basicExportList);
|
||||
basicSituationExcelUtil.setSheetName("数据总览");
|
||||
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
|
||||
|
||||
// 行业就业规模与增长趋势
|
||||
basicExportList = new ArrayList<>();
|
||||
basicExportList.add(new ExcelRow("毕业生就业规模与趋势"));
|
||||
basicExportList.add(new ExcelRow("时间", "已就业(人)", "未就业(人)", "升学深造(人)"));
|
||||
newParam = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, newParam);
|
||||
List<GraduateEmploymentInfoTreadVo> treadList = analysisGraduateEmploymentInfoService.scaleAndTrend(newParam);
|
||||
for (GraduateEmploymentInfoTreadVo tread : treadList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
tread.getDesc(), transform(tread.getEmploymentCount()), transform(tread.getNotEmploymentCount()),
|
||||
transform(tread.getFurtherEducationCount())
|
||||
));
|
||||
}
|
||||
// 创建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);
|
||||
treadList = analysisGraduateEmploymentInfoService.educationLevel(newParam);
|
||||
for (GraduateEmploymentInfoTreadVo tread : treadList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
tread.getDesc(), transform(tread.getEmploymentCount()), transform(tread.getNotEmploymentCount()),
|
||||
transform(tread.getFurtherEducationCount())
|
||||
));
|
||||
}
|
||||
// 创建Excel工具类并添加工作表
|
||||
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
|
||||
basicSituationExcelUtil.setDataList(basicExportList);
|
||||
basicSituationExcelUtil.setSheetName("学历层次就业分析");
|
||||
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
|
||||
|
||||
// 高校类型就业对比
|
||||
basicExportList = new ArrayList<>();
|
||||
basicExportList.add(new ExcelRow("高校类型就业对比"));
|
||||
basicExportList.add(new ExcelRow("高校类型", "就业人数(人)"));
|
||||
newParam = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, newParam);
|
||||
List<QueryResultVo> resultList = analysisGraduateEmploymentInfoService.universityType(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.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);
|
||||
resultList = analysisGraduateEmploymentInfoService.majorProfessional(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.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);
|
||||
resultList = analysisGraduateEmploymentInfoService.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 = analysisGraduateEmploymentInfoService.areaFlow(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 = analysisGraduateEmploymentInfoService.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 = analysisGraduateEmploymentInfoService.salaryLevel(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.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);
|
||||
resultList = analysisGraduateEmploymentInfoService.satisfactionAssessment(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.getAmount())
|
||||
));
|
||||
}
|
||||
// 创建Excel工具类并添加工作表
|
||||
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
|
||||
basicSituationExcelUtil.setDataList(basicExportList);
|
||||
basicSituationExcelUtil.setSheetName("就业满意度评估");
|
||||
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
|
||||
|
||||
// 毕业生创业情况
|
||||
basicExportList = new ArrayList<>();
|
||||
basicExportList.add(new ExcelRow("毕业生创业情况"));
|
||||
basicExportList.add(new ExcelRow("指标(单位)", "指标值"));
|
||||
newParam = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, newParam);
|
||||
GraduateEmploymentInfoStartupVo startupSituation = analysisGraduateEmploymentInfoService.startupSituation(newParam);
|
||||
|
||||
basicExportList.add(new ExcelRow(
|
||||
"创业人数(人)", transform(startupSituation.getStartupCount())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"创业占比(%)", transform(startupSituation.getStartupPercentage())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"带动就业(人)", transform(startupSituation.getStartupEmploymentJobCount())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"创业成功率(%)", transform(startupSituation.getStartupSuccessRate())
|
||||
));
|
||||
// 创建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 = analysisGraduateEmploymentInfoService.notEmploymentCrowd(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.getCount()), transform(result.getCountPercentage())
|
||||
));
|
||||
}
|
||||
// 创建Excel工具类并添加工作表
|
||||
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
|
||||
basicSituationExcelUtil.setDataList(basicExportList);
|
||||
basicSituationExcelUtil.setSheetName("未就业人群分析");
|
||||
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
|
||||
|
||||
|
||||
multiSheetExcelUtil.setFileName(dto.getExportModule().getDesc());
|
||||
multiSheetExcelUtil.exportExcel(response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出 行业就业情况信息分析
|
||||
*
|
||||
@@ -356,7 +623,7 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
"总就业人数(人)", transform(overview.getEmploymentCount()), transform(overview.getEmploymentCountMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"失业率《%)", transform(overview.getUnemploymentRate()), transform(overview.getUnemploymentRateMom())
|
||||
"失业率(%)", transform(overview.getUnemploymentRate()), transform(overview.getUnemploymentRateMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"创业企业总数(家)", transform(overview.getStartupCompanyCount()),
|
||||
@@ -535,6 +802,287 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 导出 高校毕业生就业信息分析
|
||||
*
|
||||
* @param response 响应
|
||||
* @param dto 查询参数
|
||||
* @throws IOException 异常
|
||||
*/
|
||||
private void exportWisdomGraduateEmploymentInfo(HttpServletResponse response, QueryParamDto dto) throws IOException {
|
||||
|
||||
MultiSheetExcelUtil multiSheetExcelUtil = new MultiSheetExcelUtil();
|
||||
|
||||
String exportTime = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||
|
||||
// 数据总览
|
||||
List<ExcelRow> basicExportList = new ArrayList<>();
|
||||
basicExportList.add(new ExcelRow("导出时间", exportTime));
|
||||
basicExportList.add(new ExcelRow("数据总览"));
|
||||
basicExportList.add(new ExcelRow("指标名称(单位)", "指标值", "较上期变化(%)"));
|
||||
QueryParamDto newParam = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, newParam);
|
||||
GraduateEmploymentInfoOverviewVo overview = analysisGraduateEmploymentInfoService.overview(newParam);
|
||||
|
||||
basicExportList.add(new ExcelRow(
|
||||
"毕业生总数(人)", transform(overview.getGraduateCount()), transform(overview.getGraduateCountMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"就业人数(人)", transform(overview.getEmploymentCount()), transform(overview.getEmploymentCountMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"就业率(%)", transform(overview.getEmploymentRate()), transform(overview.getEmploymentRateMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"平均起薪(元)", transform(overview.getAverageSalary()),
|
||||
transform(overview.getAverageSalaryMom())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"升学深造(人)", transform(overview.getFurtherEducationCount()),
|
||||
transform(overview.getFurtherEducationCountMom())
|
||||
));
|
||||
|
||||
// 创建Excel工具类并添加工作表
|
||||
ExcelUtil<ExcelRow> basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
|
||||
basicSituationExcelUtil.setDataList(basicExportList);
|
||||
basicSituationExcelUtil.setSheetName("数据总览");
|
||||
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
|
||||
|
||||
// 区域就业热力图
|
||||
basicExportList = new ArrayList<>();
|
||||
basicExportList.add(new ExcelRow("区域就业热力图"));
|
||||
basicExportList.add(new ExcelRow("地区", "就业人数(人)"));
|
||||
newParam = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, newParam);
|
||||
List<HeatmapVo> heatmapList = analysisGraduateEmploymentInfoService.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<GraduateEmploymentInfoTreadVo> treadList = analysisGraduateEmploymentInfoService.scaleAndTrend(newParam);
|
||||
for (GraduateEmploymentInfoTreadVo tread : treadList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
tread.getDesc(), transform(tread.getEmploymentCount()), transform(tread.getNotEmploymentCount()),
|
||||
transform(tread.getFurtherEducationCount())
|
||||
));
|
||||
}
|
||||
// 创建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);
|
||||
treadList = analysisGraduateEmploymentInfoService.educationLevel(newParam);
|
||||
for (GraduateEmploymentInfoTreadVo tread : treadList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
tread.getDesc(), transform(tread.getEmploymentCount()), transform(tread.getNotEmploymentCount()),
|
||||
transform(tread.getFurtherEducationCount())
|
||||
));
|
||||
}
|
||||
// 创建Excel工具类并添加工作表
|
||||
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
|
||||
basicSituationExcelUtil.setDataList(basicExportList);
|
||||
basicSituationExcelUtil.setSheetName("学历层次就业分析");
|
||||
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
|
||||
|
||||
// 高校类型就业对比
|
||||
basicExportList = new ArrayList<>();
|
||||
basicExportList.add(new ExcelRow("高校类型就业对比"));
|
||||
basicExportList.add(new ExcelRow("高校类型", "就业人数(人)"));
|
||||
newParam = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, newParam);
|
||||
List<QueryResultVo> resultList = analysisGraduateEmploymentInfoService.universityType(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.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);
|
||||
resultList = analysisGraduateEmploymentInfoService.majorProfessional(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.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);
|
||||
resultList = analysisGraduateEmploymentInfoService.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 = analysisGraduateEmploymentInfoService.areaFlow(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 = analysisGraduateEmploymentInfoService.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 = analysisGraduateEmploymentInfoService.salaryLevel(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.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);
|
||||
resultList = analysisGraduateEmploymentInfoService.satisfactionAssessment(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.getAmount())
|
||||
));
|
||||
}
|
||||
// 创建Excel工具类并添加工作表
|
||||
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
|
||||
basicSituationExcelUtil.setDataList(basicExportList);
|
||||
basicSituationExcelUtil.setSheetName("就业满意度评估");
|
||||
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
|
||||
|
||||
// 毕业生创业情况
|
||||
basicExportList = new ArrayList<>();
|
||||
basicExportList.add(new ExcelRow("毕业生创业情况"));
|
||||
basicExportList.add(new ExcelRow("指标(单位)", "指标值"));
|
||||
newParam = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, newParam);
|
||||
GraduateEmploymentInfoStartupVo startupSituation = analysisGraduateEmploymentInfoService.startupSituation(newParam);
|
||||
|
||||
basicExportList.add(new ExcelRow(
|
||||
"创业人数(人)", transform(startupSituation.getStartupCount())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"创业占比(%)", transform(startupSituation.getStartupPercentage())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"带动就业(人)", transform(startupSituation.getStartupEmploymentJobCount())
|
||||
));
|
||||
basicExportList.add(new ExcelRow(
|
||||
"创业成功率(%)", transform(startupSituation.getStartupSuccessRate())
|
||||
));
|
||||
// 创建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 = analysisGraduateEmploymentInfoService.notEmploymentCrowd(newParam);
|
||||
for (QueryResultVo result : resultList) {
|
||||
basicExportList.add(new ExcelRow(
|
||||
result.getDesc(), transform(result.getCount()), transform(result.getCountPercentage())
|
||||
));
|
||||
}
|
||||
// 创建Excel工具类并添加工作表
|
||||
basicSituationExcelUtil = new ExcelUtil<>(ExcelRow.class);
|
||||
basicSituationExcelUtil.setDataList(basicExportList);
|
||||
basicSituationExcelUtil.setSheetName("未就业人群分析");
|
||||
multiSheetExcelUtil.addSheet(basicSituationExcelUtil);
|
||||
|
||||
|
||||
multiSheetExcelUtil.setFileName(dto.getExportModule().getDesc());
|
||||
multiSheetExcelUtil.exportExcel(response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private String transform(Long value) {
|
||||
if (Objects.isNull(value)) {
|
||||
return "";
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.ruoyi.cms.constant.CommonConstant;
|
||||
import com.ruoyi.cms.domain.dto.GraduateEmploymentInfoSqlDto;
|
||||
import com.ruoyi.cms.domain.dto.QueryParamDto;
|
||||
import com.ruoyi.cms.domain.vo.GraduateEmploymentInfoOverviewVo;
|
||||
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.QueryResultVo;
|
||||
import com.ruoyi.cms.mapper.ThemeGraduateInfoMapper;
|
||||
import com.ruoyi.cms.service.AnalysisGraduateEmploymentInfoService;
|
||||
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.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -31,244 +33,219 @@ import java.util.List;
|
||||
@Service
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class AnalysisGraduateEmploymentInfoServiceImpl implements AnalysisGraduateEmploymentInfoService {
|
||||
|
||||
private final ThemeGraduateInfoMapper themeGraduateInfoMapper;
|
||||
|
||||
@Override
|
||||
public GraduateEmploymentInfoOverviewVo overview(QueryParamDto dto) {
|
||||
|
||||
// 计算当前时间段数据
|
||||
ParamUtil.dealParam(dto);
|
||||
Long graduateCount = themeGraduateInfoMapper.queryGraduateCount(dto);
|
||||
|
||||
Long employmentCount = themeGraduateInfoMapper.queryEmploymentCount(dto);
|
||||
|
||||
BigDecimal employmentRate = MathUtil.calculatePercentage(graduateCount, employmentCount);
|
||||
|
||||
BigDecimal averageSalary = themeGraduateInfoMapper.queryAverageSalary(dto);
|
||||
|
||||
Long furtherEducationCount = themeGraduateInfoMapper.queryFurtherEducationCount(dto);
|
||||
|
||||
// 计算上一时间段数据
|
||||
QueryParamDto lastDto = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, lastDto);
|
||||
ParamUtil.calculateLastTime(lastDto);
|
||||
Long lastGraduateCount = themeGraduateInfoMapper.queryGraduateCount(lastDto);
|
||||
|
||||
Long lastEmploymentCount = themeGraduateInfoMapper.queryEmploymentCount(lastDto);
|
||||
|
||||
BigDecimal lastEmploymentRate = MathUtil.calculatePercentage(lastGraduateCount, lastEmploymentCount);
|
||||
|
||||
BigDecimal lastAverageSalary = themeGraduateInfoMapper.queryAverageSalary(lastDto);
|
||||
|
||||
Long lastFurtherEducationCount = themeGraduateInfoMapper.queryFurtherEducationCount(lastDto);
|
||||
|
||||
return GraduateEmploymentInfoOverviewVo.builder()
|
||||
.graduateCount(12000L)
|
||||
.graduateCountMom(BigDecimal.valueOf(5.2))
|
||||
.employmentCount(10380L)
|
||||
.employmentCountMom(BigDecimal.valueOf(3.8))
|
||||
.employmentRate(BigDecimal.valueOf(86.5))
|
||||
.employmentRateMom(BigDecimal.valueOf(2.1))
|
||||
.averageSalary(BigDecimal.valueOf(6850.50))
|
||||
.averageSalaryMom(BigDecimal.valueOf(4.2))
|
||||
.furtherEducationCount(1850L)
|
||||
.furtherEducationCountMom(BigDecimal.valueOf(8.6))
|
||||
.graduateCount(graduateCount)
|
||||
.graduateCountMom(MathUtil.calculatePercentageGrowthRate(lastGraduateCount, graduateCount))
|
||||
.employmentCount(employmentCount)
|
||||
.employmentCountMom(MathUtil.calculatePercentageGrowthRate(lastEmploymentCount, employmentCount))
|
||||
.employmentRate(employmentRate)
|
||||
.employmentRateMom(MathUtil.calculatePercentageGrowthRate(lastEmploymentRate, employmentRate))
|
||||
.averageSalary(averageSalary)
|
||||
.averageSalaryMom(MathUtil.calculatePercentageGrowthRate(lastAverageSalary, averageSalary))
|
||||
.furtherEducationCount(furtherEducationCount)
|
||||
.furtherEducationCountMom(
|
||||
MathUtil.calculatePercentageGrowthRate(lastFurtherEducationCount, furtherEducationCount))
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GraduateEmploymentInfoTreadVo> scaleAndTrend(QueryParamDto dto) {
|
||||
List<GraduateEmploymentInfoTreadVo> list = new ArrayList<>();
|
||||
for (int i = 0; i < 12; i++) {
|
||||
list.add(GraduateEmploymentInfoTreadVo.builder()
|
||||
.code(i + 1 + "")
|
||||
.desc(i + 1 + "月")
|
||||
.employmentCount((long) Math.floor(Math.random() * 10000) + 1)
|
||||
.notEmploymentCount((long) Math.floor(Math.random() * 10000) + 1)
|
||||
.furtherEducationCount((long) Math.floor(Math.random() * 2000) + 1)
|
||||
.build());
|
||||
}
|
||||
ParamUtil.dealParam(dto);
|
||||
|
||||
List<GraduateEmploymentInfoTreadVo> 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 = themeGraduateInfoMapper.scaleAndTrendYear(dto);
|
||||
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 = themeGraduateInfoMapper.scaleAndTrendQuarter(dto);
|
||||
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 = themeGraduateInfoMapper.scaleAndTrendMonth(dto);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new ServiceException("时间类型错误");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<GraduateEmploymentInfoTreadVo> educationLevel(QueryParamDto dto) {
|
||||
List<GraduateEmploymentInfoTreadVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> educationLevelList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "大学专科"),
|
||||
Tuples.of("2", "大学本科"),
|
||||
Tuples.of("3", "研究生及以上")
|
||||
)));
|
||||
for (Tuple2<String, String> educationLevel : educationLevelList) {
|
||||
list.add(GraduateEmploymentInfoTreadVo.builder()
|
||||
.code(educationLevel.getT1())
|
||||
.desc(educationLevel.getT2())
|
||||
.employmentCount((long) Math.floor(Math.random() * 10000) + 1)
|
||||
.notEmploymentCount((long) Math.floor(Math.random() * 10000) + 1)
|
||||
.furtherEducationCount((long) Math.floor(Math.random() * 2000) + 1)
|
||||
.build());
|
||||
}
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
List<GraduateEmploymentInfoTreadVo> list = themeGraduateInfoMapper.educationLevel(dto);
|
||||
ParamUtil.fillDictNameGraduateEmploymentInfoTread(list, "educationLevel");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> universityType(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
for (Tuple2<String, String> type : CommonConstant.UNIVERSITY_TYPE_LIST) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(type.getT1())
|
||||
.desc(type.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
List<QueryResultVo> list = themeGraduateInfoMapper.universityType(dto);
|
||||
ParamUtil.fillDictName(list, "universityType");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> majorProfessional(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> majorList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "计算机科学与技术"),
|
||||
Tuples.of("2", "软件工程"),
|
||||
Tuples.of("3", "金融学"),
|
||||
Tuples.of("4", "临床医学"),
|
||||
Tuples.of("5", "电子信息工程"),
|
||||
Tuples.of("6", "机械设计制造及其自动化"),
|
||||
Tuples.of("7", "土木工程"),
|
||||
Tuples.of("8", "会计学"),
|
||||
Tuples.of("9", "工商管理"),
|
||||
Tuples.of("10", "法学")
|
||||
)));
|
||||
for (Tuple2<String, String> major : majorList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(major.getT1())
|
||||
.desc(major.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
List<QueryResultVo> list = themeGraduateInfoMapper.majorProfessional(dto);
|
||||
|
||||
list.sort(Comparator.comparingLong(QueryResultVo::getCount).reversed());
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> gender(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> genderList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "男"),
|
||||
Tuples.of("2", "女")
|
||||
)));
|
||||
for (Tuple2<String, String> gender : genderList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(gender.getT1())
|
||||
.desc(gender.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
List<QueryResultVo> list = themeGraduateInfoMapper.gender(dto);
|
||||
MathUtil.calculatePercentage(list);
|
||||
ParamUtil.fillDictName(list, "gender");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> areaFlow(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> areaList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "本地"),
|
||||
Tuples.of("2", "省内"),
|
||||
Tuples.of("3", "省外")
|
||||
)));
|
||||
for (Tuple2<String, String> area : areaList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(area.getT1())
|
||||
.desc(area.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
List<QueryResultVo> list = themeGraduateInfoMapper.areaFlow(dto);
|
||||
MathUtil.calculatePercentage(list);
|
||||
ParamUtil.fillDictName(list, "employmentFlow");
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> industryDistribution(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
for (Tuple2<String, String> industry : CommonConstant.INDUSTRY_LIST) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(industry.getT1())
|
||||
.desc(industry.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
List<QueryResultVo> list = themeGraduateInfoMapper.industryDistribution(dto);
|
||||
MathUtil.calculatePercentage(list);
|
||||
ParamUtil.fillDictName(list, "industry");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> salaryLevel(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> salaryList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "5K以下"),
|
||||
Tuples.of("2", "5-8K"),
|
||||
Tuples.of("3", "8-12K"),
|
||||
Tuples.of("4", "12-15K"),
|
||||
Tuples.of("5", "15K以上")
|
||||
)));
|
||||
for (Tuple2<String, String> salary : salaryList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(salary.getT1())
|
||||
.desc(salary.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> satisfactionAssessment(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> satisfactionList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "工作环境"),
|
||||
Tuples.of("2", "薪酬福利"),
|
||||
Tuples.of("3", "发展前景"),
|
||||
Tuples.of("4", "综合满意度")
|
||||
)));
|
||||
for (Tuple2<String, String> satisfaction : satisfactionList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(satisfaction.getT1())
|
||||
.desc(satisfaction.getT2())
|
||||
.amount(new BigDecimal(Math.random() * 100 + 1).setScale(2, RoundingMode.HALF_UP))
|
||||
.build());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraduateEmploymentInfoStartupVo startupSituation(QueryParamDto dto) {
|
||||
return GraduateEmploymentInfoStartupVo.builder()
|
||||
.startupCount(156L)
|
||||
.startupPercentage(BigDecimal.valueOf(10.3))
|
||||
.startupEmploymentJobCount(890L)
|
||||
.startupSuccessRate(BigDecimal.valueOf(72.5))
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> notEmploymentCrowd(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> crowdList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "继续求职"),
|
||||
Tuples.of("2", "备考公招/考研"),
|
||||
Tuples.of("3", "其他")
|
||||
)));
|
||||
for (Tuple2<String, String> crowd : crowdList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(crowd.getT1())
|
||||
.desc(crowd.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
ParamUtil.dealParam(dto);
|
||||
List<QueryResultVo> list = themeGraduateInfoMapper.salaryLevel(dto);
|
||||
MathUtil.calculatePercentage(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HeatmapVo> heatmap(QueryParamDto dto) {
|
||||
List<HeatmapVo> list = new ArrayList<>();
|
||||
for (Tuple2<String, String> area : CommonConstant.AREA_LIST) {
|
||||
list.add(HeatmapVo.builder()
|
||||
.areaCode(area.getT1())
|
||||
.areaName(area.getT2())
|
||||
.count((long) Math.floor(Math.random() * 10000) + 1)
|
||||
public List<QueryResultVo> satisfactionAssessment(QueryParamDto dto) {
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
GraduateEmploymentInfoSqlDto sqlDto = themeGraduateInfoMapper.satisfactionAssessment(dto);
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
list.add(QueryResultVo.builder()
|
||||
.code("1")
|
||||
.desc("工作环境")
|
||||
.amount(MathUtil.calculatePercentage(sqlDto.getTotalCount(), sqlDto.getWorkEnvironmentSatisfiedCount()))
|
||||
.build());
|
||||
list.add(QueryResultVo.builder()
|
||||
.code("2")
|
||||
.desc("薪酬福利")
|
||||
.amount(MathUtil.calculatePercentage(sqlDto.getTotalCount(), sqlDto.getSalaryWelfareSatisfiedCount()))
|
||||
.build());
|
||||
list.add(QueryResultVo.builder()
|
||||
.code("3")
|
||||
.desc("发展前景")
|
||||
.amount(MathUtil.calculatePercentage(sqlDto.getTotalCount(),
|
||||
sqlDto.getDevelopmentForegroundSatisfiedCount()))
|
||||
.build());
|
||||
list.add(QueryResultVo.builder()
|
||||
.code("4")
|
||||
.desc("综合满意度")
|
||||
.amount(MathUtil.calculatePercentage(sqlDto.getTotalCount(),
|
||||
sqlDto.getWorkComprehensiveSatisfiedCount()))
|
||||
.build());
|
||||
|
||||
return list;
|
||||
}
|
||||
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));
|
||||
|
||||
@Override
|
||||
public GraduateEmploymentInfoStartupVo startupSituation(QueryParamDto dto) {
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
GraduateEmploymentInfoStartupVo vo = themeGraduateInfoMapper.startupSituation(dto);
|
||||
vo.setStartupPercentage(MathUtil.calculatePercentage(vo.getTotalCount(), vo.getStartupCount()));
|
||||
vo.setStartupSuccessRate(MathUtil.calculatePercentage(vo.getStartupCount(), vo.getStartupSuccessCount()));
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> notEmploymentCrowd(QueryParamDto dto) {
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
List<QueryResultVo> list = themeGraduateInfoMapper.notEmploymentCrowd(dto);
|
||||
MathUtil.calculatePercentage(list);
|
||||
ParamUtil.fillDictName(list, "employmentCrowd");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HeatmapVo> heatmap(QueryParamDto dto) {
|
||||
|
||||
ParamUtil.dealParam(dto);
|
||||
List<HeatmapVo> list = themeGraduateInfoMapper.heatmap(dto);
|
||||
// 计算占比
|
||||
MathUtil.calculatePercentageHeatmap(list);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.cms.util;
|
||||
|
||||
import com.ruoyi.cms.constant.CommonConstant;
|
||||
import com.ruoyi.cms.domain.dto.QueryParamDto;
|
||||
import com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo;
|
||||
import com.ruoyi.cms.domain.vo.QueryResultVo;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
@@ -140,13 +141,48 @@ public class ParamUtil {
|
||||
if (CollectionUtils.isEmpty(list) || StringUtils.isBlank(dictName)) {
|
||||
return;
|
||||
}
|
||||
for (QueryResultVo vo : list) {
|
||||
vo.setDesc(fillDictName(vo.getCode(), dictName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 填充字典名称
|
||||
*
|
||||
* @param list 列表
|
||||
* @param dictName 字典名称
|
||||
*/
|
||||
public static void fillDictNameGraduateEmploymentInfoTread(
|
||||
List<GraduateEmploymentInfoTreadVo> list, String dictName) {
|
||||
|
||||
if (CollectionUtils.isEmpty(list) || StringUtils.isBlank(dictName)) {
|
||||
return;
|
||||
}
|
||||
for (GraduateEmploymentInfoTreadVo vo : list) {
|
||||
vo.setDesc(fillDictName(vo.getCode(), dictName));
|
||||
}
|
||||
}
|
||||
|
||||
private static String fillDictName(String code, String dictName){
|
||||
switch (dictName) {
|
||||
case "industry": {
|
||||
for (QueryResultVo vo : list) {
|
||||
vo.setDesc(Optional.ofNullable(CommonConstant.INDUSTRY_MAP.get(vo.getCode())).orElse("未知"));
|
||||
return Optional.ofNullable(CommonConstant.INDUSTRY_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
break;
|
||||
case "educationLevel": {
|
||||
return Optional.ofNullable(CommonConstant.EDUCATION_LEVEL_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
case "universityType": {
|
||||
return Optional.ofNullable(CommonConstant.UNIVERSITY_TYPE_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
case "gender": {
|
||||
return Optional.ofNullable(CommonConstant.GENDER_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
case "employmentFlow": {
|
||||
return Optional.ofNullable(CommonConstant.EMPLOYMENT_FLOW_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
case "employmentCrowd": {
|
||||
return Optional.ofNullable(CommonConstant.EMPLOYMENT_CROWD_MAP.get(code)).orElse("未知");
|
||||
}
|
||||
default:
|
||||
throw new ServiceException("字典名称错误");
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<if test="industry != null and industry != ''">
|
||||
AND AAB022 LIKE #{industry} || '%'
|
||||
</if>
|
||||
-- 未注销就业登记
|
||||
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
</sql>
|
||||
|
||||
@@ -87,10 +87,8 @@
|
||||
SELECT
|
||||
m.month_num,
|
||||
y.year_offset,
|
||||
(make_timestamp(p.current_year - y.year_offset, 1, 1, 0, 0, 0)
|
||||
- (m.month_num - 1) * INTERVAL '1 year') AS start_time,
|
||||
(make_timestamp(p.current_year - y.year_offset , 12, 31, 23, 59, 59)
|
||||
- (m.month_num - 1) * INTERVAL '1 year') AS end_time
|
||||
(make_timestamp(p.current_year - y.year_offset - month_num + 1, 1, 1, 0, 0, 0) ) AS start_time,
|
||||
(make_timestamp(p.current_year - y.year_offset - month_num + 1 , 12, 31, 23, 59, 59) ) AS end_time
|
||||
FROM params p
|
||||
CROSS JOIN (SELECT 0 AS year_offset UNION ALL SELECT 1) y
|
||||
CROSS JOIN (SELECT generate_series(1, 5) AS month_num) m
|
||||
@@ -111,14 +109,14 @@
|
||||
<if test="industry != null and industry != ''">
|
||||
AND AAB022 LIKE #{industry} || '%'
|
||||
</if>
|
||||
-- 未注销就业登记
|
||||
|
||||
AND (ABE585 IS NULL OR ABE585 > r.end_time)
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS code,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS sort,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) || '年' AS desc,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) || '年' AS "desc",
|
||||
COALESCE(current_count, 0) AS currentCount,
|
||||
COALESCE(last_count, 0) AS lastYearCount
|
||||
FROM aggregated_data
|
||||
@@ -160,14 +158,14 @@
|
||||
<if test="industry != null and industry != ''">
|
||||
AND AAB022 LIKE #{industry} || '%'
|
||||
</if>
|
||||
-- 未注销就业登记
|
||||
|
||||
AND (ABE585 IS NULL OR ABE585 > r.end_time)
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
month_num AS sort,
|
||||
'第' || month_num || '季度' AS desc,
|
||||
'第' || month_num || '季度' AS "desc",
|
||||
COALESCE(current_count, 0) AS currentCount,
|
||||
COALESCE(last_count, 0) AS lastYearCount
|
||||
FROM aggregated_data
|
||||
@@ -209,14 +207,14 @@
|
||||
<if test="industry != null and industry != ''">
|
||||
AND AAB022 LIKE #{industry} || '%'
|
||||
</if>
|
||||
-- 未注销就业登记
|
||||
|
||||
AND (ABE585 IS NULL OR ABE585 > r.end_time)
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
month_num AS sort,
|
||||
month_num || '月' AS desc,
|
||||
month_num || '月' AS "desc",
|
||||
COALESCE(current_count, 0) AS currentCount,
|
||||
COALESCE(last_count, 0) AS lastYearCount
|
||||
FROM aggregated_data
|
||||
|
||||
@@ -0,0 +1,454 @@
|
||||
<?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.ThemeGraduateInfoMapper">
|
||||
|
||||
<!--公共条件 -->
|
||||
<sql id="commonConditions">
|
||||
|
||||
AAC181 BETWEEN #{startTime} AND #{endTime}
|
||||
<if test="area != null and area != ''">
|
||||
AND AAB299 = #{area}
|
||||
</if>
|
||||
<if test="universityType != null and universityType != ''">
|
||||
AND AAC046 = #{universityType}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="queryGraduateCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
SELECT COUNT(DISTINCT AAC044)
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryEmploymentCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
SELECT COUNT(DISTINCT AAC044)
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
</select>
|
||||
|
||||
<select id="queryAverageSalary"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.math.BigDecimal">
|
||||
|
||||
SELECT COALESCE(ROUND(AVG(ACC328), 2), 0)
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
</select>
|
||||
|
||||
<select id="queryFurtherEducationCount"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="java.lang.Long">
|
||||
|
||||
SELECT COUNT(DISTINCT AAC044)
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ACC028 = '070'
|
||||
</select>
|
||||
|
||||
|
||||
<select id="scaleAndTrendYear"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo">
|
||||
WITH params AS (
|
||||
SELECT CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) AS current_year
|
||||
),
|
||||
-- 一次性生成两年(当前年、去年)的所有月度时间范围
|
||||
month_ranges AS (
|
||||
SELECT
|
||||
m.month_num,
|
||||
(make_timestamp(p.current_year - month_num + 1, 1, 1, 0, 0, 0) ) AS start_time,
|
||||
(make_timestamp(p.current_year - month_num + 1 , 12, 31, 23, 59, 59) ) AS end_time
|
||||
FROM params p
|
||||
CROSS JOIN (SELECT generate_series(1, 5) AS month_num) m
|
||||
),
|
||||
-- 一次扫描表,按条件区分当前年和去年数据
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 = '1' AND (ABE585 IS NULL OR ABE585 > r.end_time) THEN AAC044 END) AS employmentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' THEN AAC044 END) AS notEmploymentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' AND ACC028 = '070' THEN AAC044 END) AS furtherEducationCount
|
||||
FROM month_ranges r
|
||||
LEFT JOIN theme_graduate_info
|
||||
ON
|
||||
AAC181 BETWEEN r.start_time AND r.end_time
|
||||
<if test="area != null and area != ''">
|
||||
AND AAB299 = #{area}
|
||||
</if>
|
||||
<if test="universityType != null and universityType != ''">
|
||||
AND AAC046 = #{universityType}
|
||||
</if>
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS code,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) AS sort,
|
||||
(CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) +1 - month_num) || '年' AS "desc",
|
||||
COALESCE(employmentCount, 0) AS employmentCount,
|
||||
COALESCE(notEmploymentCount, 0) AS notEmploymentCount,
|
||||
COALESCE(furtherEducationCount, 0) AS furtherEducationCount
|
||||
FROM aggregated_data
|
||||
ORDER BY sort ;
|
||||
</select>
|
||||
|
||||
<select id="scaleAndTrendQuarter"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo">
|
||||
WITH params AS (
|
||||
SELECT CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) AS current_year
|
||||
),
|
||||
-- 一次性生成两年(当前年、去年)的所有月度时间范围
|
||||
month_ranges AS (
|
||||
SELECT
|
||||
m.month_num,
|
||||
(make_timestamp(p.current_year , 1, 1, 0, 0, 0)
|
||||
+ (m.month_num - 1) * 3 * INTERVAL '1 month') AS start_time,
|
||||
(make_timestamp(p.current_year , 1, 1, 0, 0, 0)
|
||||
+ m.month_num * 3 * INTERVAL '1 month' - INTERVAL '1 second') AS end_time
|
||||
FROM params p
|
||||
CROSS JOIN (SELECT generate_series(1, 4) AS month_num) m
|
||||
),
|
||||
-- 一次扫描表,按条件区分当前年和去年数据
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 = '1' AND (ABE585 IS NULL OR ABE585 > r.end_time) THEN AAC044 END) AS employmentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' THEN AAC044 END) AS notEmploymentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' AND ACC028 = '070' THEN AAC044 END) AS furtherEducationCount
|
||||
FROM month_ranges r
|
||||
LEFT JOIN theme_graduate_info
|
||||
ON
|
||||
AAC181 BETWEEN r.start_time AND r.end_time
|
||||
<if test="area != null and area != ''">
|
||||
AND AAB299 = #{area}
|
||||
</if>
|
||||
<if test="universityType != null and universityType != ''">
|
||||
AND AAC046 = #{universityType}
|
||||
</if>
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
month_num AS sort,
|
||||
'第' || month_num || '季度' AS "desc",
|
||||
COALESCE(employmentCount, 0) AS employmentCount,
|
||||
COALESCE(notEmploymentCount, 0) AS notEmploymentCount,
|
||||
COALESCE(furtherEducationCount, 0) AS furtherEducationCount
|
||||
FROM aggregated_data
|
||||
ORDER BY month_num;
|
||||
</select>
|
||||
|
||||
<select id="scaleAndTrendMonth"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo">
|
||||
WITH params AS (
|
||||
SELECT CAST(EXTRACT(YEAR FROM #{endTime}) AS INT) AS current_year
|
||||
),
|
||||
-- 一次性生成两年(当前年、去年)的所有月度时间范围
|
||||
month_ranges AS (
|
||||
SELECT
|
||||
m.month_num,
|
||||
(make_timestamp(p.current_year , 1, 1, 0, 0, 0)
|
||||
+ (m.month_num - 1) * INTERVAL '1 month') AS start_time,
|
||||
(make_timestamp(p.current_year , 1, 1, 0, 0, 0)
|
||||
+ m.month_num * INTERVAL '1 month' - INTERVAL '1 second') AS end_time
|
||||
FROM params p
|
||||
CROSS JOIN (SELECT generate_series(1, 12) AS month_num) m
|
||||
),
|
||||
-- 一次扫描表,按条件区分当前年和去年数据
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
r.month_num,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 = '1' AND (ABE585 IS NULL OR ABE585 > r.end_time) THEN AAC044 END) AS employmentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' THEN AAC044 END) AS notEmploymentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' AND ACC028 = '070' THEN AAC044 END) AS furtherEducationCount
|
||||
FROM month_ranges r
|
||||
LEFT JOIN theme_graduate_info
|
||||
ON
|
||||
AAC181 BETWEEN r.start_time AND r.end_time
|
||||
<if test="area != null and area != ''">
|
||||
AND AAB299 = #{area}
|
||||
</if>
|
||||
<if test="universityType != null and universityType != ''">
|
||||
AND AAC046 = #{universityType}
|
||||
</if>
|
||||
GROUP BY r.month_num
|
||||
)
|
||||
SELECT
|
||||
month_num AS code,
|
||||
month_num AS sort,
|
||||
month_num || '月' AS "desc",
|
||||
COALESCE(employmentCount, 0) AS employmentCount,
|
||||
COALESCE(notEmploymentCount, 0) AS notEmploymentCount,
|
||||
COALESCE(furtherEducationCount, 0) AS furtherEducationCount
|
||||
FROM aggregated_data
|
||||
ORDER BY month_num;
|
||||
</select>
|
||||
|
||||
|
||||
<select id="educationLevel"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoTreadVo">
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 = '1' AND (ABE585 IS NULL OR ABE585 > #{endTime}) THEN AAC044 END) AS employmentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' THEN AAC044 END) AS notEmploymentCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC009 != '1' AND ACC028 = '070' THEN AAC044 END) AS furtherEducationCount
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
ADC009,
|
||||
ABE585,
|
||||
ACC028,
|
||||
AAC011 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="universityType"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAC046 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="majorProfessional"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
"desc",
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAC183 AS code,
|
||||
ACC01G AS "desc"
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
) subquery
|
||||
GROUP BY code, "desc"
|
||||
ORDER BY code, "desc"
|
||||
</select>
|
||||
|
||||
<select id="gender"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAC004 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="areaFlow"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
ADC115 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="industryDistribution"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAB022 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="salaryLevel"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
SELECT
|
||||
"desc" AS code,
|
||||
"desc",
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
CASE
|
||||
WHEN ACC328 < 5000 THEN '5K以下'
|
||||
WHEN ACC328 BETWEEN 5000 AND 8000 THEN '5-8K'
|
||||
WHEN ACC328 BETWEEN 8001 AND 12000 THEN '8-12K'
|
||||
WHEN ACC328 BETWEEN 12001 AND 15000 THEN '12-15K'
|
||||
WHEN ACC328 > 15000 THEN '15K以上'
|
||||
ELSE '未知'
|
||||
END AS "desc"
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
) subquery
|
||||
GROUP BY "desc"
|
||||
ORDER BY
|
||||
CASE "desc"
|
||||
WHEN '5K以下' THEN 1
|
||||
WHEN '5-8K' THEN 2
|
||||
WHEN '8-12K' THEN 3
|
||||
WHEN '12-15K' THEN 4
|
||||
WHEN '15K以上' THEN 5
|
||||
ELSE 6
|
||||
END
|
||||
</select>
|
||||
|
||||
<select id="satisfactionAssessment"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.dto.GraduateEmploymentInfoSqlDto">
|
||||
|
||||
SELECT
|
||||
COUNT(DISTINCT AAC044) AS totalCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22E = '1' THEN AAC044 END) AS workEnvironmentSatisfiedCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22F = '1' THEN AAC044 END) AS salaryWelfareSatisfiedCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22G = '1' THEN AAC044 END) AS developmentForegroundSatisfiedCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22C = '1' THEN AAC044 END) AS workComprehensiveSatisfiedCount
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
|
||||
</select>
|
||||
|
||||
<select id="startupSituation"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.GraduateEmploymentInfoStartupVo">
|
||||
|
||||
SELECT
|
||||
COUNT(DISTINCT AAC044) AS totalCount,
|
||||
COUNT(DISTINCT CASE WHEN ADC113 = '1' THEN AAC044 END) AS startupCount,
|
||||
COALESCE(SUM(CASE WHEN ADC113 = '1' THEN ACC321 END), 0) AS startupEmploymentJobCount,
|
||||
COUNT(DISTINCT CASE WHEN ACC22G = '1' AND ADC114 = '1' THEN AAC044 END) AS startupSuccessCount
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="notEmploymentCrowd"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.QueryResultVo">
|
||||
|
||||
SELECT
|
||||
code,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
ACC028 AS code
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 != '1'
|
||||
) subquery
|
||||
GROUP BY code
|
||||
ORDER BY code
|
||||
</select>
|
||||
|
||||
<select id="heatmap"
|
||||
parameterType="com.ruoyi.cms.domain.dto.QueryParamDto"
|
||||
resultType="com.ruoyi.cms.domain.vo.HeatmapVo">
|
||||
|
||||
SELECT
|
||||
areaCode,
|
||||
COUNT(DISTINCT AAC044) AS count
|
||||
FROM (
|
||||
SELECT
|
||||
AAC044,
|
||||
AAB299 AS areaCode
|
||||
FROM theme_graduate_info
|
||||
WHERE
|
||||
<!-- 引入公共条件 -->
|
||||
<include refid="commonConditions"/>
|
||||
AND ADC009 = '1'
|
||||
AND (ABE585 IS NULL OR ABE585 > #{endTime})
|
||||
) subquery
|
||||
GROUP BY areaCode
|
||||
ORDER BY areaCode
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -10,7 +10,7 @@ CREATE TABLE shz_data_dashboard.theme_employment_register
|
||||
"AAB301" character varying(50) COLLATE pg_catalog."default",
|
||||
"AAF001" character varying(255) COLLATE pg_catalog."default",
|
||||
"AAF011" character varying(128) COLLATE pg_catalog."default",
|
||||
"ABE587" character varying(255) COLLATE pg_catalog."default",
|
||||
"ABE587" character varying(2) COLLATE pg_catalog."default",
|
||||
"ABE585" timestamp without time zone,
|
||||
"ADC112" character varying(255) COLLATE pg_catalog."default",
|
||||
"ADC113" character varying(2) COLLATE pg_catalog."default",
|
||||
@@ -30,7 +30,9 @@ CREATE TABLE shz_data_dashboard.theme_employment_register
|
||||
"ACC22B" character varying(2) COLLATE pg_catalog."default",
|
||||
"AAC008" character varying(2) COLLATE pg_catalog."default",
|
||||
"ACA112" character varying(50) COLLATE pg_catalog."default",
|
||||
"ACC102" integer
|
||||
"ACC102" integer,
|
||||
"ACC22C" character varying(2) COLLATE pg_catalog."default",
|
||||
"ACC22D" character varying(2) COLLATE pg_catalog."default"
|
||||
)
|
||||
;
|
||||
|
||||
@@ -119,7 +121,7 @@ COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_employment_register."ACC22B" IS '是否已签订劳动合同';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_employment_register."AAC008" IS '人员参保状态';
|
||||
ON COLUMN shz_data_dashboard.theme_employment_register."AAC008" IS '是否参保';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_employment_register."ACA112" IS '工种名称';
|
||||
@@ -127,5 +129,216 @@ ON COLUMN shz_data_dashboard.theme_employment_register."ACA112" IS '工种名称
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_employment_register."ACC102" IS '每周工作时间';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_employment_register."ACC22C" IS '是否工作满意';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_employment_register."ACC22D" IS '是否薪资稳定';
|
||||
|
||||
COMMENT
|
||||
ON TABLE shz_data_dashboard.theme_employment_register IS '就业登记主题库';
|
||||
|
||||
|
||||
-- 高校毕业生主题库
|
||||
CREATE TABLE shz_data_dashboard.theme_graduate_info
|
||||
(
|
||||
"AAC043" character varying(2) COLLATE pg_catalog."default",
|
||||
"AAC044" character varying(20) COLLATE pg_catalog."default",
|
||||
"AAC005" character varying(10) COLLATE pg_catalog."default",
|
||||
"AAC011" character varying(10) COLLATE pg_catalog."default",
|
||||
"AAC004" character varying(10) COLLATE pg_catalog."default",
|
||||
"AAC045" character varying(200) COLLATE pg_catalog."default",
|
||||
"AAE700" character varying(50) COLLATE pg_catalog."default",
|
||||
"ACC01G" character varying(200) COLLATE pg_catalog."default",
|
||||
"AAC183" character varying(50) COLLATE pg_catalog."default",
|
||||
"AAC181" timestamp without time zone,
|
||||
"AAC010" character varying(255) COLLATE pg_catalog."default",
|
||||
"AAE006" character varying(255) COLLATE pg_catalog."default",
|
||||
"AAB299" character varying(50) COLLATE pg_catalog."default",
|
||||
"AAC304" character varying(2) COLLATE pg_catalog."default",
|
||||
"ADC956" character varying(2) COLLATE pg_catalog."default",
|
||||
"ADC969" character varying(2) COLLATE pg_catalog."default",
|
||||
"ADA301" character varying(10) COLLATE pg_catalog."default",
|
||||
"ACC028" character varying(10) COLLATE pg_catalog."default",
|
||||
"AAE036" timestamp without time zone,
|
||||
"ACA112" character varying(200) COLLATE pg_catalog."default",
|
||||
"ACC240" timestamp without time zone,
|
||||
"ADC111" character varying(10) COLLATE pg_catalog."default",
|
||||
"ADC110" timestamp without time zone,
|
||||
"AAE043" timestamp without time zone,
|
||||
"ABE587" character varying(2) COLLATE pg_catalog."default",
|
||||
"ABE585" timestamp without time zone,
|
||||
"ADC112" character varying(255) COLLATE pg_catalog."default",
|
||||
"ADC113" character varying(2) COLLATE pg_catalog."default",
|
||||
"AAB998" character varying(50) COLLATE pg_catalog."default",
|
||||
"AAB003" character varying(50) COLLATE pg_catalog."default",
|
||||
"AAB004" character varying(50) COLLATE pg_catalog."default",
|
||||
"AAB019" character varying(10) COLLATE pg_catalog."default",
|
||||
"AAB022" character varying(10) COLLATE pg_catalog."default",
|
||||
"AAB020" character varying(10) COLLATE pg_catalog."default",
|
||||
"ACC321" integer,
|
||||
"ACC328" numeric(10, 2),
|
||||
"ACC22B" character varying(2) COLLATE pg_catalog."default",
|
||||
"AAC008" character varying(2) COLLATE pg_catalog."default",
|
||||
"ACC102" integer,
|
||||
"ACC22C" character varying(2) COLLATE pg_catalog."default",
|
||||
"ACC22D" character varying(2) COLLATE pg_catalog."default",
|
||||
"ADC114" character varying(2) COLLATE pg_catalog."default",
|
||||
"AAC046" character varying(2) COLLATE pg_catalog."default",
|
||||
"ADC009" character varying(2) COLLATE pg_catalog."default",
|
||||
"ADC115" character varying(2) COLLATE pg_catalog."default",
|
||||
"ACC22E" character varying(2) COLLATE pg_catalog."default",
|
||||
"ACC22F" character varying(2) COLLATE pg_catalog."default",
|
||||
"ACC22G" character varying(2) COLLATE pg_catalog."default"
|
||||
)
|
||||
;
|
||||
|
||||
ALTER TABLE shz_data_dashboard.theme_graduate_info
|
||||
OWNER TO sysdba;
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC043" IS '证件类型';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC044" IS '证件号码';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC005" IS '民族';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC011" IS '学历';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC004" IS '性别';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC045" IS '院校名称';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAE700" IS '院校代码';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC01G" IS '专业名称';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC183" IS '专业代码';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC181" IS '毕业日期';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC010" IS '户籍地址';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAE006" IS '实际居住地址';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAB299" IS '实际居住地址代码';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC304" IS '是否省内户口';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC956" IS '是否内地高校新疆籍毕业生';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC969" IS '离校未就业标记';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADA301" IS '高校毕业生实名登记数据来源';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC028" IS '就业去向';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAE036" IS '登记日期';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACA112" IS '工种名称';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC240" IS '求职成功日期';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC111" IS '就业形式';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC110" IS '就业日期';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAE043" IS '就业登记日期';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ABE587" IS '注销就业登记标识';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ABE585" IS '注销就业登记日期';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC112" IS '注销就业登记原因';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC113" IS '创业标识';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAB998" IS '用人单位统一社会信用代码';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAB003" IS '用人单位组织机构代码';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAB004" IS '用人单位名称';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAB019" IS '单位类型';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAB022" IS '所属行业';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAB020" IS '经济类型';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC321" IS '创业带动就业人数';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC328" IS '个人月收入';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC22B" IS '是否已签订劳动合同';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC008" IS '是否参保';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC102" IS '每周工作时间';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC22C" IS '是否工作满意';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC22D" IS '是否薪资稳定';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC114" IS '创业是否成功';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."AAC046" IS '高校类型';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC009" IS '是否就业';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ADC115" IS '就业流向';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC22E" IS '是否工作环境满意';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC22F" IS '是否薪资待遇满意';
|
||||
|
||||
COMMENT
|
||||
ON COLUMN shz_data_dashboard.theme_graduate_info."ACC22G" IS '是否发展前景满意';
|
||||
|
||||
COMMENT
|
||||
ON TABLE shz_data_dashboard.theme_graduate_info IS '高校毕业生主题库';
|
||||
Reference in New Issue
Block a user