添加功能
This commit is contained in:
@@ -108,6 +108,10 @@ public class AnalysisExportServiceImpl implements AnalysisExportService {
|
||||
case WISDOM_EMPLOYMENT_LABOR_FORCE_EMPLOYMENT:
|
||||
test(response, dto);
|
||||
break;
|
||||
// 劳动力动态监测系统-劳动力就业失业数据分析
|
||||
case LABOR_FORCE_RECRUITMENT_DEMAND:
|
||||
test(response, dto);
|
||||
break;
|
||||
// 可以添加更多导出格式的处理
|
||||
default:
|
||||
throw new ServiceException("暂不支持该模块");
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.ruoyi.cms.domain.vo.EchartsVo;
|
||||
import com.ruoyi.cms.domain.vo.LaborForceRecruitmentDemandOverviewVo;
|
||||
import com.ruoyi.cms.domain.vo.QueryResultVo;
|
||||
import com.ruoyi.cms.domain.vo.TreadVo;
|
||||
import com.ruoyi.cms.mapper.ThemeJobSeekerMapper;
|
||||
import com.ruoyi.cms.mapper.ThemeRecruitmentJobMapper;
|
||||
import com.ruoyi.cms.service.AnalysisLaborForceRecruitmentDemandService;
|
||||
import com.ruoyi.cms.util.MathUtil;
|
||||
@@ -40,6 +41,7 @@ import java.util.stream.IntStream;
|
||||
public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisLaborForceRecruitmentDemandService {
|
||||
|
||||
private final ThemeRecruitmentJobMapper themeRecruitmentJobMapper;
|
||||
private final ThemeJobSeekerMapper themeJobSeekerMapper;
|
||||
|
||||
/**
|
||||
* 处理参数
|
||||
@@ -68,6 +70,12 @@ public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisL
|
||||
|
||||
BigDecimal marketCommitmentSalary = themeRecruitmentJobMapper.queryAverageSalary(dto);
|
||||
|
||||
Long supplyCount = themeJobSeekerMapper.querySupplyCount(dto);
|
||||
BigDecimal demandSupplyRate = MathUtil.calculatePercentage(supplyCount, recruitmentCount);
|
||||
Tuple2<String, String> rateDesc = calculateDemandSupplyRate(demandSupplyRate);
|
||||
|
||||
Long activeCompanyCount = themeRecruitmentJobMapper.queryMonitorCompanyCount(dto);
|
||||
|
||||
// 计算上一时间段数据
|
||||
QueryParamDto lastDto = new QueryParamDto();
|
||||
BeanUtils.copyProperties(dto, lastDto);
|
||||
@@ -78,25 +86,58 @@ public class AnalysisLaborForceRecruitmentDemandServiceImpl implements AnalysisL
|
||||
|
||||
BigDecimal lastMarketCommitmentSalary = themeRecruitmentJobMapper.queryAverageSalary(lastDto);
|
||||
|
||||
Long lastSupplyCount = themeJobSeekerMapper.querySupplyCount(lastDto);
|
||||
BigDecimal lastDemandSupplyRate = MathUtil.calculatePercentage(lastSupplyCount, lastRecruitmentCount);
|
||||
|
||||
Long lastActiveCompanyCount = themeRecruitmentJobMapper.queryMonitorCompanyCount(lastDto);
|
||||
|
||||
return LaborForceRecruitmentDemandOverviewVo.builder()
|
||||
.recruitmentJobCount(recruitmentJobCount)
|
||||
.recruitmentJobCountMom(
|
||||
MathUtil.calculatePercentageGrowthRate(lastRecruitmentJobCount,recruitmentJobCount))
|
||||
MathUtil.calculatePercentageGrowthRate(lastRecruitmentJobCount, recruitmentJobCount))
|
||||
.recruitmentCount(recruitmentCount)
|
||||
.recruitmentCountMom(MathUtil.calculatePercentageGrowthRate(lastRecruitmentCount,recruitmentCount))
|
||||
.recruitmentCountMom(MathUtil.calculatePercentageGrowthRate(lastRecruitmentCount, recruitmentCount))
|
||||
.marketCommitmentSalary(marketCommitmentSalary)
|
||||
.marketCommitmentSalaryMom(
|
||||
MathUtil.calculatePercentageGrowthRate(lastMarketCommitmentSalary,marketCommitmentSalary))
|
||||
.demandSupplyRate(BigDecimal.valueOf(1.28))
|
||||
.demandSupplyRateMom(BigDecimal.valueOf(-0.03))
|
||||
.demandSupplyRateTag("偏紧")
|
||||
.demandSupplyRateDesc("供需相对均衡")
|
||||
.activeCompanyCount(860L)
|
||||
.activeCompanyCountMom(BigDecimal.valueOf(4.8))
|
||||
MathUtil.calculatePercentageGrowthRate(lastMarketCommitmentSalary, marketCommitmentSalary))
|
||||
.demandSupplyRate(demandSupplyRate)
|
||||
.demandSupplyRateMom(MathUtil.calculatePercentageGrowthRate(lastDemandSupplyRate, demandSupplyRate))
|
||||
.demandSupplyRateTag(rateDesc.getT1())
|
||||
.demandSupplyRateDesc(rateDesc.getT2())
|
||||
.activeCompanyCount(activeCompanyCount)
|
||||
.activeCompanyCountMom(MathUtil.calculatePercentageGrowthRate(lastActiveCompanyCount,
|
||||
activeCompanyCount))
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算求人倍率
|
||||
*
|
||||
* @param demandSupplyRate 求人倍率
|
||||
* @return 结果
|
||||
*/
|
||||
private Tuple2<String, String> calculateDemandSupplyRate(BigDecimal demandSupplyRate) {
|
||||
|
||||
String tag;
|
||||
String desc;
|
||||
if (new BigDecimal("1").compareTo(demandSupplyRate) > 0) {
|
||||
tag = "供过于求";
|
||||
desc = "就业压力增大";
|
||||
} else if (new BigDecimal("1").compareTo(demandSupplyRate) <= 0
|
||||
&& new BigDecimal("1.2").compareTo(demandSupplyRate) > 0) {
|
||||
tag = "平衡";
|
||||
desc = "供求基本平衡";
|
||||
} else if (new BigDecimal("1.2").compareTo(demandSupplyRate) <= 0
|
||||
&& new BigDecimal("1.5").compareTo(demandSupplyRate) > 0) {
|
||||
tag = "偏紧";
|
||||
desc = "需求略大于供给";
|
||||
} else {
|
||||
tag = "短缺";
|
||||
desc = "供求关系显著偏紧";
|
||||
}
|
||||
return Tuples.of(tag, desc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreadVo> recruitmentTrend(QueryParamDto dto) {
|
||||
List<TreadVo> list = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user