Просмотр исходного кода

团队相关接口 专家库相关联

zhangcl 1 неделя назад
Родитель
Сommit
94e188329d

+ 20 - 12
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/controller/admin/expertpool/ExpertPoolController.java

@@ -1,6 +1,7 @@
 package cn.iocoder.yudao.module.rd.controller.admin.expertpool;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
@@ -19,7 +20,7 @@ import cn.iocoder.yudao.module.rd.dal.dataobject.expertpool.ExpertPoolDO;
 import cn.iocoder.yudao.module.rd.dal.dataobject.team.TeamDO;
 import cn.iocoder.yudao.module.rd.service.expertpool.ExpertPoolService;
 import cn.iocoder.yudao.module.rd.service.team.TeamService;
-import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
+import cn.iocoder.yudao.module.rd.utils.DictDataUtils;
 import cn.iocoder.yudao.module.system.service.dict.DictDataService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
@@ -32,6 +33,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.IOException;
+import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -50,6 +52,8 @@ public class ExpertPoolController {
     private DictDataService dictDataService;
     @Resource
     private TeamService expertTeamService;
+    @Resource
+    private DictDataUtils dictDataUtils;
 
     @PostMapping("/create")
     @Operation(summary = "创建专家库")
@@ -97,15 +101,15 @@ public class ExpertPoolController {
         ExpertPoolRespVO expertPoolVO = BeanUtils.toBean(expertPool, ExpertPoolRespVO.class);
 
         // 专家梯队 字典数据
-        Map<String, String> expertEchelonPair = getDictData("rd_expert_echelon");
+        Map<String, String> expertEchelonPair = dictDataUtils.getDictData("rd_expert_echelon");
         // 专家序列 数据字典
-        Map<String, String> expertRankPair = getDictData("rd_expert_rank");
+        Map<String, String> expertRankPair = dictDataUtils.getDictData("rd_expert_rank");
         // 专家学历 数据字典
-        Map<String, String> expertEducationPair = getDictData("rd_expert_education");
+        Map<String, String> expertEducationPair = dictDataUtils.getDictData("rd_expert_education");
         // 软件技能 数据字典
-        Map<String, String> expertSoftwarePair = getDictData("rd_expert_software");
+        Map<String, String> expertSoftwarePair = dictDataUtils.getDictData("rd_expert_software");
         // 专业方向 数据字典
-        Map<String, String> expertTechnicalPair = getDictData("rd_expert_technical");
+        Map<String, String> expertTechnicalPair = dictDataUtils.getDictData("rd_expert_technical");
         // 学历
         String education = expertPoolVO.getEducation();
         if (StrUtil.isNotBlank(education) && expertEducationPair.containsKey(education)) {
@@ -156,6 +160,10 @@ public class ExpertPoolController {
                 expertPoolVO.setTeams(teamResp);
             }
         }
+        // 专家年龄
+        LocalDateTime birthday = expertPoolVO.getBirthday();
+        Integer age = DateUtil.ageOfNow(DateUtil.date(birthday));
+        expertPoolVO.setAge(age);
         return expertPoolVO;
     }
 
@@ -164,7 +172,7 @@ public class ExpertPoolController {
      * @param dictType
      * @return
      */
-    private Map<String, String> getDictData(String dictType) {
+    /* private Map<String, String> getDictData(String dictType) {
         Map<String, String> dictDataPair = new HashMap<>();
         List<DictDataDO> somethingDictData = dictDataService.getDictDataListByDictType(dictType);
         if (CollUtil.isNotEmpty(somethingDictData)) {
@@ -173,14 +181,14 @@ public class ExpertPoolController {
             });
         }
         return dictDataPair;
-    }
+    } */
 
     /**
      * 根据数据字典类型获取数据字典值排序
      * @param dictType
      * @return
      */
-    private Map<String, Integer> getDictDataSort(String dictType) {
+    /* private Map<String, Integer> getDictDataSort(String dictType) {
         Map<String, Integer> dictDataPair = new HashMap<>();
         List<DictDataDO> somethingDictData = dictDataService.getDictDataListByDictType(dictType);
         if (CollUtil.isNotEmpty(somethingDictData)) {
@@ -189,7 +197,7 @@ public class ExpertPoolController {
             });
         }
         return dictDataPair;
-    }
+    } */
 
     @GetMapping("/page")
     @Operation(summary = "获得专家库分页")
@@ -212,9 +220,9 @@ public class ExpertPoolController {
         // key梯队数据字典value   value梯队包含的专家列表
         Map<String, List<ExpertPoolDO>> echelonExpertPair = new HashMap<>();
         // 专家梯队 字典数据 key值   value标签
-        Map<String, String> expertEchelonPair = getDictData("rd_expert_echelon");
+        Map<String, String> expertEchelonPair = dictDataUtils.getDictData("rd_expert_echelon");
         // 专家梯队 字典数据 排序值 key值  value排序sort
-        Map<String, Integer> expertEchelonSortPair = getDictDataSort("rd_expert_echelon");
+        Map<String, Integer> expertEchelonSortPair = dictDataUtils.getDictDataSort("rd_expert_echelon");
         // 按照梯队对专家分组
         if (CollUtil.isNotEmpty(experts)) {
             experts.forEach(expert -> {

+ 5 - 0
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/controller/admin/expertpool/vo/ExpertPoolPageReqVO.java

@@ -69,4 +69,9 @@ public class ExpertPoolPageReqVO extends PageParam {
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;
 
+    /**
+     * 扩展字段
+     */
+    @Schema(description = "队伍id", example = "65")
+    private Long teamId;
 }

+ 3 - 0
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/controller/admin/expertpool/vo/ExpertPoolRespVO.java

@@ -137,4 +137,7 @@ public class ExpertPoolRespVO {
     @ExcelProperty("梯队 label")
     private String echelonLabel;
 
+    @Schema(description = "年龄")
+    @ExcelProperty("年龄")
+    private Integer age;
 }

+ 129 - 3
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/controller/admin/team/TeamController.java

@@ -1,16 +1,25 @@
 package cn.iocoder.yudao.module.rd.controller.admin.team;
 
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.ObjUtil;
+import cn.hutool.core.util.StrUtil;
 import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
 import cn.iocoder.yudao.framework.common.pojo.PageParam;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+import cn.iocoder.yudao.module.rd.controller.admin.expertpool.vo.ExpertPoolPageReqVO;
+import cn.iocoder.yudao.module.rd.controller.admin.expertpool.vo.ExpertPoolRespVO;
 import cn.iocoder.yudao.module.rd.controller.admin.team.vo.TeamPageReqVO;
 import cn.iocoder.yudao.module.rd.controller.admin.team.vo.TeamRespVO;
 import cn.iocoder.yudao.module.rd.controller.admin.team.vo.TeamSaveReqVO;
+import cn.iocoder.yudao.module.rd.dal.dataobject.expertpool.ExpertPoolDO;
 import cn.iocoder.yudao.module.rd.dal.dataobject.team.TeamDO;
+import cn.iocoder.yudao.module.rd.service.expertpool.ExpertPoolService;
 import cn.iocoder.yudao.module.rd.service.team.TeamService;
+import cn.iocoder.yudao.module.rd.utils.DictDataUtils;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -22,7 +31,9 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.IOException;
-import java.util.List;
+import java.time.LocalDateTime;
+import java.util.*;
+import java.util.stream.Collectors;
 
 import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@@ -35,6 +46,10 @@ public class TeamController {
 
     @Resource
     private TeamService teamService;
+    @Resource
+    private ExpertPoolService rdExpertPoolService;
+    @Resource
+    private DictDataUtils dictDataUtils;
 
     @PostMapping("/create")
     @Operation(summary = "创建团队")
@@ -66,7 +81,84 @@ public class TeamController {
     @PreAuthorize("@ss.hasPermission('rd:team:query')")
     public CommonResult<TeamRespVO> getTeam(@RequestParam("id") Long id) {
         TeamDO team = teamService.getTeam(id);
-        return success(BeanUtils.toBean(team, TeamRespVO.class));
+        return success(buildTeam(team));
+    }
+
+    /**
+     * 查询专家库 团队详情
+     * @param team
+     * @return
+     */
+    private TeamRespVO buildTeam(TeamDO team) {
+        // 如果 team 为空 返回空对象
+        if (ObjUtil.isEmpty(team)) {
+            return new TeamRespVO();
+        }
+        TeamRespVO teamRespVO = BeanUtils.toBean(team, TeamRespVO.class);
+        // 查询每个团队下的专家列表
+        List<ExpertPoolRespVO> teamExperts = new ArrayList<>();
+        ExpertPoolPageReqVO reqVO = new ExpertPoolPageReqVO();
+        reqVO.setTeamId(teamRespVO.getId());
+        List<ExpertPoolDO> experts = rdExpertPoolService.getExpertPools(reqVO);
+        if (CollUtil.isNotEmpty(experts)) {
+            experts.forEach(expert -> {
+                ExpertPoolRespVO expertPoolVO = BeanUtils.toBean(expert, ExpertPoolRespVO.class);
+                // 专家梯队 字典数据
+                Map<String, String> expertEchelonPair = dictDataUtils.getDictData("rd_expert_echelon");
+                // 专家序列 数据字典
+                Map<String, String> expertRankPair = dictDataUtils.getDictData("rd_expert_rank");
+                // 专家学历 数据字典
+                Map<String, String> expertEducationPair = dictDataUtils.getDictData("rd_expert_education");
+                // 软件技能 数据字典
+                Map<String, String> expertSoftwarePair = dictDataUtils.getDictData("rd_expert_software");
+                // 专业方向 数据字典
+                Map<String, String> expertTechnicalPair = dictDataUtils.getDictData("rd_expert_technical");
+                // 学历
+                String education = expert.getEducation();
+                if (StrUtil.isNotBlank(education) && expertEducationPair.containsKey(education)) {
+                    expertPoolVO.setEducationLabel(expertEducationPair.get(education));
+                }
+                // 梯队
+                String echelon = expertPoolVO.getEchelon();
+                if (StrUtil.isNotBlank(echelon) && expertEchelonPair.containsKey(echelon)) {
+                    expertPoolVO.setEchelonLabel(expertEchelonPair.get(echelon));
+                }
+                // 专家技术序列
+                Set<Long> expertRankValues = expertPoolVO.getExpertRank();
+                if (CollUtil.isNotEmpty(expertRankValues)) {
+                    String rankLabels = expertRankValues.stream()
+                            .map(lg -> ObjUtil.isNotEmpty(lg) ? lg.toString() : StrUtil.EMPTY) // 将Long转为String,匹配techniqueDictPair的key类型
+                            .map(key -> expertRankPair.getOrDefault(key, key)) // 取label,无则用原key
+                            .collect(Collectors.joining(",")); // 逗号拼接
+                    expertPoolVO.setExpertRankLabel(rankLabels);
+                }
+                // 专家软件技能
+                Set<Long> expertSoftwareValues = expertPoolVO.getSoftwareSkills();
+                if (CollUtil.isNotEmpty(expertSoftwareValues)) {
+                    String softwareLabels = expertSoftwareValues.stream()
+                            .map(lg -> ObjUtil.isNotEmpty(lg) ? lg.toString() : StrUtil.EMPTY) // 将Long转为String,匹配techniqueDictPair的key类型
+                            .map(key -> expertSoftwarePair.getOrDefault(key, key)) // 取label,无则用原key
+                            .collect(Collectors.joining(",")); // 逗号拼接
+                    expertPoolVO.setSoftwareSkillsLabel(softwareLabels);
+                }
+                // 专家 专业方向
+                Set<Long> expertTechnicalValues = expertPoolVO.getSpecialDirection();
+                if (CollUtil.isNotEmpty(expertTechnicalValues)) {
+                    String technicalLabels = expertTechnicalValues.stream()
+                            .map(lg -> ObjUtil.isNotEmpty(lg) ? lg.toString() : StrUtil.EMPTY) // 将Long转为String,匹配techniqueDictPair的key类型
+                            .map(key -> expertTechnicalPair.getOrDefault(key, key)) // 取label,无则用原key
+                            .collect(Collectors.joining(",")); // 逗号拼接
+                    expertPoolVO.setSoftwareSkillsLabel(technicalLabels);
+                }
+                // 专家年龄
+                LocalDateTime birthday = expertPoolVO.getBirthday();
+                Integer age = DateUtil.ageOfNow(DateUtil.date(birthday));
+                expertPoolVO.setAge(age);
+                teamExperts.add(expertPoolVO);
+            });
+        }
+        teamRespVO.setExperts(teamExperts);
+        return teamRespVO;
     }
 
     @GetMapping("/page")
@@ -74,7 +166,41 @@ public class TeamController {
     @PreAuthorize("@ss.hasPermission('rd:team:query')")
     public CommonResult<PageResult<TeamRespVO>> getTeamPage(@Valid TeamPageReqVO pageReqVO) {
         PageResult<TeamDO> pageResult = teamService.getTeamPage(pageReqVO);
-        return success(BeanUtils.toBean(pageResult, TeamRespVO.class));
+        return success(new PageResult<>(buildTeamList(pageResult.getList()), pageResult.getTotal()));
+    }
+
+    /**
+     * 设置每个团队包含的专家姓名集合 逗号分隔
+     * @param teams
+     * @return
+     */
+    private List<TeamRespVO> buildTeamList(List<TeamDO> teams) {
+        if (CollUtil.isEmpty(teams)) {
+            return Collections.emptyList();
+        }
+        // 查询每个团队包含的专家姓名集合 逗号分隔
+        Map<Long, Set<String>> teamExpertNamePair = new HashMap<>();
+        teams.forEach(team -> {
+            Long teamId = team.getId();
+            ExpertPoolPageReqVO reqVO = new ExpertPoolPageReqVO();
+            reqVO.setTeamId(teamId);
+            List<ExpertPoolDO> teamExperts = rdExpertPoolService.getExpertPools(reqVO);
+            Set<String> expertNames = new HashSet<>();
+            if (CollUtil.isNotEmpty(teamExperts)) {
+                teamExperts.forEach(expert -> {
+                    expertNames.add(expert.getExpertName());
+                });
+                teamExpertNamePair.put(teamId, expertNames);
+            }
+        });
+        return BeanUtils.toBean(teams, TeamRespVO.class, (teamVO) -> {
+            Long teamId = teamVO.getId();
+            if (teamExpertNamePair.containsKey(teamId)) {
+                Set<String> tempExpertNames = teamExpertNamePair.get(teamId);
+                String expertNamesStr = StrUtil.join(",", tempExpertNames);
+                teamVO.setExpertNames(expertNamesStr);
+            }
+        });
     }
 
     @GetMapping("/export-excel")

+ 10 - 0
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/controller/admin/team/vo/TeamRespVO.java

@@ -1,11 +1,13 @@
 package cn.iocoder.yudao.module.rd.controller.admin.team.vo;
 
+import cn.iocoder.yudao.module.rd.controller.admin.expertpool.vo.ExpertPoolRespVO;
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 import java.time.LocalDateTime;
+import java.util.List;
 
 @Schema(description = "管理后台 - 团队 Response VO")
 @Data
@@ -52,4 +54,12 @@ public class TeamRespVO {
     @ExcelProperty("创建时间")
     private LocalDateTime createTime;
 
+    /**
+     * 扩展字段
+     */
+    @Schema(description = "团队包含的专家列表")
+    private List<ExpertPoolRespVO> experts;
+
+    @Schema(description = "团队包含的专家姓名集合 逗号分隔")
+    private String expertNames;
 }

+ 37 - 0
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/dal/mysql/expertpool/ExpertPoolMapper.java

@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.rd.dal.mysql.expertpool;
 
+import cn.hutool.core.util.ObjUtil;
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
 import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
@@ -7,6 +8,8 @@ import cn.iocoder.yudao.module.rd.controller.admin.expertpool.vo.ExpertPoolPageR
 import cn.iocoder.yudao.module.rd.dal.dataobject.expertpool.ExpertPoolDO;
 import org.apache.ibatis.annotations.Mapper;
 
+import java.util.List;
+
 /**
  * 专家库 Mapper
  *
@@ -37,4 +40,38 @@ public interface ExpertPoolMapper extends BaseMapperX<ExpertPoolDO> {
                 .orderByDesc(ExpertPoolDO::getId));
     }
 
+    default List<ExpertPoolDO> selectList(ExpertPoolPageReqVO reqVO) {
+        LambdaQueryWrapperX<ExpertPoolDO> wrapper = buildCommonQuery(reqVO);
+        // 处理 teamId 特殊查询
+        if (ObjUtil.isNotEmpty(reqVO.getTeamId())) {
+            wrapper.apply("JSON_CONTAINS(CAST(team_ids AS JSON), CAST({0} AS JSON))", reqVO.getTeamId());
+        }
+        return selectList(wrapper);
+    }
+
+    /**
+     * 构建公共查询条件
+     * @param reqVO 查询条件
+     */
+    default LambdaQueryWrapperX<ExpertPoolDO> buildCommonQuery(ExpertPoolPageReqVO reqVO) {
+        return new LambdaQueryWrapperX<ExpertPoolDO>()
+                .eqIfPresent(ExpertPoolDO::getDeptId, reqVO.getDeptId())
+                .eqIfPresent(ExpertPoolDO::getEchelon, reqVO.getEchelon())
+                .eqIfPresent(ExpertPoolDO::getExpertRank, reqVO.getExpertRank())
+                .eqIfPresent(ExpertPoolDO::getTeamIds, reqVO.getTeamIds())
+                .eqIfPresent(ExpertPoolDO::getAvatar, reqVO.getAvatar())
+                .eqIfPresent(ExpertPoolDO::getBirthday, reqVO.getBirthday())
+                .eqIfPresent(ExpertPoolDO::getEducation, reqVO.getEducation())
+                .eqIfPresent(ExpertPoolDO::getSpecialDirection, reqVO.getSpecialDirection())
+                .eqIfPresent(ExpertPoolDO::getAchievement, reqVO.getAchievement())
+                .eqIfPresent(ExpertPoolDO::getSoftwareSkills, reqVO.getSoftwareSkills())
+                .eqIfPresent(ExpertPoolDO::getSort, reqVO.getSort())
+                .eqIfPresent(ExpertPoolDO::getRemark, reqVO.getRemark())
+                .eqIfPresent(ExpertPoolDO::getStatus, reqVO.getStatus())
+                .eqIfPresent(ExpertPoolDO::getProcessInstanceId, reqVO.getProcessInstanceId())
+                .eqIfPresent(ExpertPoolDO::getAuditStatus, reqVO.getAuditStatus())
+                .eqIfPresent(ExpertPoolDO::getOpinion, reqVO.getOpinion())
+                .betweenIfPresent(ExpertPoolDO::getCreateTime, reqVO.getCreateTime());
+    }
+
 }

+ 9 - 0
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/service/expertpool/ExpertPoolService.java

@@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.rd.controller.admin.expertpool.vo.ExpertPoolSaveR
 import cn.iocoder.yudao.module.rd.dal.dataobject.expertpool.ExpertPoolDO;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * 专家库 Service 接口
@@ -52,4 +53,12 @@ public interface ExpertPoolService {
      */
     PageResult<ExpertPoolDO> getExpertPoolPage(ExpertPoolPageReqVO pageReqVO);
 
+    /**
+     * 获得专家列表
+     *
+     * @param pageReqVO 列表查询
+     * @return 专家列表
+     */
+    List<ExpertPoolDO> getExpertPools(ExpertPoolPageReqVO pageReqVO);
+
 }

+ 6 - 0
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/service/expertpool/ExpertPoolServiceImpl.java

@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
 import static cn.iocoder.yudao.module.rd.enums.ErrorCodeConstant.EXPERT_POOL_NOT_EXISTS;
@@ -69,4 +70,9 @@ public class ExpertPoolServiceImpl implements ExpertPoolService {
         return expertPoolMapper.selectPage(pageReqVO);
     }
 
+    @Override
+    public List<ExpertPoolDO> getExpertPools(ExpertPoolPageReqVO reqVO) {
+        return expertPoolMapper.selectList(reqVO);
+    }
+
 }

+ 53 - 0
yudao-module-rd/yudao-module-rd-biz/src/main/java/cn/iocoder/yudao/module/rd/utils/DictDataUtils.java

@@ -0,0 +1,53 @@
+package cn.iocoder.yudao.module.rd.utils;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
+import cn.iocoder.yudao.module.system.service.dict.DictDataService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 数据字典工具类
+ */
+@Service
+public class DictDataUtils {
+    @Resource
+    private DictDataService dictDataService;
+
+    /**
+     * 根据数据字典类型获取数据字典值列表
+     * @param dictType
+     * @return
+     */
+    public Map<String, String> getDictData(String dictType) {
+        Map<String, String> dictDataPair = new HashMap<>();
+        List<DictDataDO> somethingDictData = dictDataService.getDictDataListByDictType(dictType);
+        if (CollUtil.isNotEmpty(somethingDictData)) {
+            somethingDictData.forEach(tech -> {
+                dictDataPair.put(tech.getValue(), tech.getLabel());
+            });
+        }
+        return dictDataPair;
+    }
+
+    /**
+     * 根据数据字典类型获取数据字典值排序
+     * @param dictType
+     * @return
+     */
+    public Map<String, Integer> getDictDataSort(String dictType) {
+        Map<String, Integer> dictDataPair = new HashMap<>();
+        List<DictDataDO> somethingDictData = dictDataService.getDictDataListByDictType(dictType);
+        if (CollUtil.isNotEmpty(somethingDictData)) {
+            somethingDictData.forEach(tech -> {
+                dictDataPair.put(tech.getValue(), tech.getSort());
+            });
+        }
+        return dictDataPair;
+    }
+
+}