添加功能
This commit is contained in:
@@ -98,4 +98,81 @@ public class AnalysisLaborForceEmploymentController {
|
||||
public AjaxResult unemploymentHeatmap(@RequestBody QueryParamDto dto) {
|
||||
return AjaxResult.success(analysisLaborForceEmploymentService.unemploymentHeatmap(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 失业原因分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
@PostMapping("/unemploymentReason")
|
||||
public AjaxResult unemploymentReason(@RequestBody QueryParamDto dto) {
|
||||
return AjaxResult.success(analysisLaborForceEmploymentService.unemploymentReason(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 失业持续时间分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
@PostMapping("/unemploymentDuration")
|
||||
public AjaxResult unemploymentDuration(@RequestBody QueryParamDto dto) {
|
||||
return AjaxResult.success(analysisLaborForceEmploymentService.unemploymentDuration(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 就业人员年龄分布
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
@PostMapping("/employmentAge")
|
||||
public AjaxResult employmentAge(@RequestBody QueryParamDto dto) {
|
||||
return AjaxResult.success(analysisLaborForceEmploymentService.employmentAge(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 就业人员学历分布
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
@PostMapping("/employmentEducationLevel")
|
||||
public AjaxResult employmentEducationLevel(@RequestBody QueryParamDto dto) {
|
||||
return AjaxResult.success(analysisLaborForceEmploymentService.employmentEducationLevel(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 失业登记与服务趋势 - 失业登记人数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
@PostMapping("/unemploymentTrend")
|
||||
public AjaxResult unemploymentTrend(@RequestBody QueryParamDto dto) {
|
||||
return AjaxResult.success(analysisLaborForceEmploymentService.unemploymentTrend(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 失业登记与服务趋势 - 16-24岁青年失业人数趋势
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
@PostMapping("/unemploymentYouthTrend")
|
||||
public AjaxResult unemploymentYouthTrend(@RequestBody QueryParamDto dto) {
|
||||
return AjaxResult.success(analysisLaborForceEmploymentService.unemploymentYouthTrend(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 失业登记与服务趋势 - 享受失业服务人数趋势
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 趋势列表
|
||||
*/
|
||||
@PostMapping("/receiveUnemploymentServiceTrend")
|
||||
public AjaxResult receiveUnemploymentServiceTrend(@RequestBody QueryParamDto dto) {
|
||||
return AjaxResult.success(analysisLaborForceEmploymentService.receiveUnemploymentServiceTrend(dto));
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.ruoyi.cms.domain.vo.HeatmapVo;
|
||||
import com.ruoyi.cms.domain.vo.LaborForceEmploymentOverviewVo;
|
||||
import com.ruoyi.cms.domain.vo.LaborForceEmploymentTargetVo;
|
||||
import com.ruoyi.cms.domain.vo.QueryResultVo;
|
||||
import com.ruoyi.cms.domain.vo.TreadVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -71,4 +72,60 @@ public interface AnalysisLaborForceEmploymentService {
|
||||
* @return 热力图列表
|
||||
*/
|
||||
List<HeatmapVo> unemploymentHeatmap(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 失业原因分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> unemploymentReason(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 失业原因分析
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> unemploymentDuration(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 就业人员年龄分布
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> employmentAge(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 就业人员学历分布
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<QueryResultVo> employmentEducationLevel(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 失业登记与服务趋势 - 失业登记人数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<TreadVo> unemploymentTrend(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 失业登记与服务趋势 - 16-24岁青年失业人数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<TreadVo> unemploymentYouthTrend(QueryParamDto dto);
|
||||
|
||||
/**
|
||||
* 失业登记与服务趋势 - 享受失业服务人数
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return 结果列表
|
||||
*/
|
||||
List<TreadVo> receiveUnemploymentServiceTrend(QueryParamDto dto);
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.ruoyi.cms.domain.vo.HeatmapVo;
|
||||
import com.ruoyi.cms.domain.vo.LaborForceEmploymentOverviewVo;
|
||||
import com.ruoyi.cms.domain.vo.LaborForceEmploymentTargetVo;
|
||||
import com.ruoyi.cms.domain.vo.QueryResultVo;
|
||||
import com.ruoyi.cms.domain.vo.TreadVo;
|
||||
import com.ruoyi.cms.service.AnalysisLaborForceEmploymentService;
|
||||
import com.ruoyi.cms.util.MathUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -68,7 +69,7 @@ public class AnalysisLaborForceEmploymentServiceImpl implements AnalysisLaborFor
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "第一产业"),
|
||||
Tuples.of("2", "第二产业"),
|
||||
Tuples.of("2", "第三产业")
|
||||
Tuples.of("3", "第三产业")
|
||||
)));
|
||||
for (Tuple2<String, String> industry : industryList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
@@ -148,4 +149,139 @@ public class AnalysisLaborForceEmploymentServiceImpl implements AnalysisLaborFor
|
||||
MathUtil.calculatePercentageHeatmap(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> unemploymentReason(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> reasonList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "从各类单位辞职"),
|
||||
Tuples.of("2", "被单位解除劳动关系"),
|
||||
Tuples.of("3", "合同到期未续签"),
|
||||
Tuples.of("4", "企业破产倒闭"),
|
||||
Tuples.of("5", "毕业未就业"),
|
||||
Tuples.of("6", "其他")
|
||||
)));
|
||||
for (Tuple2<String, String> reason : reasonList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(reason.getT1())
|
||||
.desc(reason.getT2())
|
||||
.count((long) Math.floor(Math.random() * 10000) + 1)
|
||||
.build());
|
||||
}
|
||||
MathUtil.calculatePercentage(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> unemploymentDuration(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> durationList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "6个月及以下"),
|
||||
Tuples.of("2", "6-12个月"),
|
||||
Tuples.of("3", "1-2年"),
|
||||
Tuples.of("4", "2年以上")
|
||||
)));
|
||||
for (Tuple2<String, String> duration : durationList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(duration.getT1())
|
||||
.desc(duration.getT2())
|
||||
.count((long) Math.floor(Math.random() * 10000) + 1)
|
||||
.build());
|
||||
}
|
||||
MathUtil.calculatePercentage(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> employmentAge(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> ageList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "16~30岁"),
|
||||
Tuples.of("2", "30~40岁"),
|
||||
Tuples.of("3", "40~50岁"),
|
||||
Tuples.of("4", "50岁及以上")
|
||||
)));
|
||||
for (Tuple2<String, String> age : ageList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(age.getT1())
|
||||
.desc(age.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
MathUtil.calculatePercentage(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QueryResultVo> employmentEducationLevel(QueryParamDto dto) {
|
||||
List<QueryResultVo> list = new ArrayList<>();
|
||||
List<Tuple2<String, String>> educationList =
|
||||
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
|
||||
Tuples.of("1", "硕士研究生及以上"),
|
||||
Tuples.of("2", "大学本科"),
|
||||
Tuples.of("3", "大学专科"),
|
||||
Tuples.of("4", "高中/中专"),
|
||||
Tuples.of("5", "初中及以下")
|
||||
)));
|
||||
for (Tuple2<String, String> education : educationList) {
|
||||
list.add(QueryResultVo.builder()
|
||||
.code(education.getT1())
|
||||
.desc(education.getT2())
|
||||
.count((long) Math.floor(Math.random() * 100000) + 1)
|
||||
.build());
|
||||
}
|
||||
MathUtil.calculatePercentage(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreadVo> unemploymentTrend(QueryParamDto dto) {
|
||||
List<TreadVo> list = new ArrayList<>();
|
||||
for (int i = 0; i < 12; i++) {
|
||||
list.add(TreadVo.builder()
|
||||
.code(i + 1 + "")
|
||||
.sort(i)
|
||||
.desc(i + 1 + "月")
|
||||
.currentCount((long) Math.floor(Math.random() * 5000) + 1)
|
||||
.lastYearCount((long) Math.floor(Math.random() * 5000) + 1)
|
||||
.build());
|
||||
}
|
||||
MathUtil.calculatePercentageGrowthRate(dto.getQueryTimeType(), list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreadVo> unemploymentYouthTrend(QueryParamDto dto) {
|
||||
List<TreadVo> list = new ArrayList<>();
|
||||
for (int i = 0; i < 12; i++) {
|
||||
list.add(TreadVo.builder()
|
||||
.code(i + 1 + "")
|
||||
.sort(i)
|
||||
.desc(i + 1 + "月")
|
||||
.currentCount((long) Math.floor(Math.random() * 2000) + 1)
|
||||
.lastYearCount((long) Math.floor(Math.random() * 2000) + 1)
|
||||
.build());
|
||||
}
|
||||
MathUtil.calculatePercentageGrowthRate(dto.getQueryTimeType(), list);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreadVo> receiveUnemploymentServiceTrend(QueryParamDto dto) {
|
||||
List<TreadVo> list = new ArrayList<>();
|
||||
for (int i = 0; i < 12; i++) {
|
||||
list.add(TreadVo.builder()
|
||||
.code(i + 1 + "")
|
||||
.sort(i)
|
||||
.desc(i + 1 + "月")
|
||||
.currentCount((long) Math.floor(Math.random() * 3000) + 1)
|
||||
.lastYearCount((long) Math.floor(Math.random() * 3000) + 1)
|
||||
.build());
|
||||
}
|
||||
MathUtil.calculatePercentageGrowthRate(dto.getQueryTimeType(), list);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user