添加功能

This commit is contained in:
马宝龙
2026-06-26 17:28:33 +08:00
parent dfb9911c97
commit 60e58fdfb8
5 changed files with 43 additions and 3 deletions

View File

@@ -116,4 +116,17 @@ public class CommonConstant {
Tuples.of("4", "民办院校")
)));
/**
* 产业列表
*/
public static final List<Tuple2<String, String>> SECTOR_LIST =
Collections.unmodifiableList(new ArrayList<>(Arrays.asList(
Tuples.of("1", "新材料"),
Tuples.of("2", "新能源"),
Tuples.of("3", "现代服务业"),
Tuples.of("4", "先进服务"),
Tuples.of("5", "数字经济"),
Tuples.of("6", "农业")
)));
}

View File

@@ -63,4 +63,15 @@ public class AnalysisCommonController {
public AjaxResult majorIndustryList() {
return AjaxResult.success(analysisCommonService.majorIndustryList());
}
/**
* 查询产业列表
*
* @return 产业列表
*/
@GetMapping("/sectorList")
// @Log(title = "根据枚举名称查询枚举的所有值", businessType = BusinessType.QUERY)
public AjaxResult sectorList() {
return AjaxResult.success(analysisCommonService.sectorList());
}
}

View File

@@ -40,4 +40,11 @@ public interface AnalysisCommonService {
* @return 重点行业列表
*/
List<DictVo> majorIndustryList();
/**
* 查询产业列表
*
* @return 产业列表
*/
List<DictVo> sectorList();
}

View File

@@ -62,4 +62,14 @@ public class AnalysisCommonServiceImpl implements AnalysisCommonService {
return list;
}
@Override
public List<DictVo> sectorList() {
List<DictVo> list = new ArrayList<>();
for (Tuple2<String, String> industry : CommonConstant.SECTOR_LIST) {
list.add(DictVo.builder().code(industry.getT1()).desc(industry.getT2()).build());
}
return list;
}
}

View File

@@ -79,8 +79,7 @@ public class AnalysisSectorTalentServiceImpl implements AnalysisSectorTalentServ
@Override
public List<QueryResultVo> talentDemandStructure(QueryParamDto dto) {
List<QueryResultVo> list = new ArrayList<>();
for (Tuple2<String, String> industry : CommonConstant.INDUSTRY_LIST) {
for (Tuple2<String, String> industry : CommonConstant.SECTOR_LIST) {
list.add(QueryResultVo.builder()
.code(industry.getT1())
.desc(industry.getT2())
@@ -137,7 +136,7 @@ public class AnalysisSectorTalentServiceImpl implements AnalysisSectorTalentServ
@Override
public List<QueryResultVo> talentSupplyDemandMatchingDegree(QueryParamDto dto) {
List<QueryResultVo> list = new ArrayList<>();
for (Tuple2<String, String> industry : CommonConstant.MAJOR_INDUSTRY_LIST) {
for (Tuple2<String, String> industry : CommonConstant.SECTOR_LIST) {
list.add(QueryResultVo.builder()
.code(industry.getT1())
.desc(industry.getT2())