huaz
2023-01-09 5fd2ac11a530b5b7ddfcb2a40cf5d68fdde193be
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/service/impl/ProjectTypeServiceImpl.java
@@ -16,6 +16,7 @@
package me.zhengjie.modules.project.service.impl;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.project.domain.ProjectType;
import me.zhengjie.modules.system.repository.DictDetailRepository;
import me.zhengjie.utils.ValidationUtil;
@@ -102,8 +103,8 @@
    public void download(List<ProjectTypeDto> all, HttpServletResponse response) throws IOException {
        List<Map<String, Object>> list = new ArrayList<>();
        for (ProjectTypeDto projectType : all) {
            String unitCurrency = projectType.getStandardUnitCurrency() != null ? dictDetailRepository.findByDictNameAndValue("standard_unit_currency", projectType.getStandardUnitCurrency()).getLabel() : "";
            String workloadUnit = projectType.getStandardWorkloadUnit() != null ? dictDetailRepository.findByDictNameAndValue("standard_workload_unit", projectType.getStandardWorkloadUnit()).getLabel() : "";
            String unitCurrency = projectType.getStandardUnitCurrency() != null ? dictDetailRepository.findByDictNameAndValue(Constant.STANDARD_UNIT_CURRENCY, projectType.getStandardUnitCurrency()).getLabel() : "";
            String workloadUnit = projectType.getStandardWorkloadUnit() != null ? dictDetailRepository.findByDictNameAndValue(Constant.STANDARD_WORKLOAD_UNIT, projectType.getStandardWorkloadUnit()).getLabel() : "";
            Map<String,Object> map = new LinkedHashMap<>();
            map.put("名称", projectType.getName());
            map.put("标准单价币种", unitCurrency);