diff --git a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ApplyInfoListManager.java b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ApplyInfoListManager.java index a139a71..cb48639 100644 --- a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ApplyInfoListManager.java +++ b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ApplyInfoListManager.java @@ -3,13 +3,17 @@ package com.hyp.web.controller.manager; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.convert.Convert; import com.hyp.common.core.domain.model.LoginUser; +import com.hyp.common.enums.ApplyTypeEnum; import com.hyp.common.exception.ServiceException; import com.hyp.common.utils.SecurityUtils; import com.hyp.system.domain.RewApplyInfoList; import com.hyp.system.domain.dto.ApplyInfoListDTO; import com.hyp.system.domain.vo.ApplyInfoListVO; +import com.hyp.system.service.ISysDictDataService; import com.hyp.system.service.RewApplyInfoListService; import com.hyp.system.service.RewScoreInfoService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -34,6 +38,18 @@ public class ApplyInfoListManager { @Resource private RewScoreInfoService scoreInfoService; + + @Resource + private ISysDictDataService dictDataService; + + /** + * + * 奖项类型 + * @param null + * @return + */ + + private static final String REW_APPLY_TYPE = "rew_apply_type"; @@ -61,6 +77,11 @@ public class ApplyInfoListManager { } RewApplyInfoList applyInfoList = new RewApplyInfoList(); applyInfoList.setApplyType(applyType); + + String name = dictDataService.selectDictLabel(REW_APPLY_TYPE, applyType); + if(StringUtils.isNotBlank(name)){ + applyInfoList.setApplyName(name); + } applyInfoList.setApplyStatus(0); applyInfoList.setCreateId(loginUser.getUserId()); applyInfoList.setCreateBy(loginUser.getUsername()); diff --git a/hyp-common/pom.xml b/hyp-common/pom.xml index 73c2f0d..a24d821 100644 --- a/hyp-common/pom.xml +++ b/hyp-common/pom.xml @@ -143,6 +143,11 @@ 2.5.1 + + org.projectlombok + lombok + + \ No newline at end of file diff --git a/hyp-common/src/main/java/com/hyp/common/enums/ApplyTypeEnum.java b/hyp-common/src/main/java/com/hyp/common/enums/ApplyTypeEnum.java new file mode 100644 index 0000000..1028c98 --- /dev/null +++ b/hyp-common/src/main/java/com/hyp/common/enums/ApplyTypeEnum.java @@ -0,0 +1,32 @@ +package com.hyp.common.enums; + +import lombok.Getter; + +/** + * 奖项类型 + * + * @author wangxy + * @date 2024/4/11 9:15 + */ +@Getter +public enum ApplyTypeEnum { + + CATEGORY("rew_excellent_category", "优秀学校奖(学校类)"), + + TRAINING("rew_excellent_training", "优秀学校奖(培训机构类)"), + + PRINCIPAL("rew_principal_award", "杰出校长奖"), + + TEACHER("rew_teacher_award", "杰出教师奖"), + + CONTRIBUTION("rew_contribution_award", "杰出贡献奖"); + + private String type; + + private String desc; + + ApplyTypeEnum(String type, String desc) { + this.type = type; + this.desc = desc; + } +}