赵士淞
2023-04-28 c0f6ddc823dd008eefb2ca098c8d6ec50f82e65f
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/SysConfigProportionServiceImpl.java
@@ -16,7 +16,9 @@
package me.zhengjie.modules.system.service.impl;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.system.domain.SysConfigProportion;
import me.zhengjie.modules.system.repository.DictDetailRepository;
import me.zhengjie.utils.ValidationUtil;
import me.zhengjie.utils.FileUtil;
import lombok.RequiredArgsConstructor;
@@ -51,6 +53,7 @@
    private final SysConfigProportionRepository sysConfigProportionRepository;
    private final SysConfigProportionMapper sysConfigProportionMapper;
    private final DictDetailRepository dictDetailRepository;
    @Override
    public Map<String,Object> queryAll(SysConfigProportionQueryCriteria criteria, Pageable pageable){
@@ -119,9 +122,11 @@
    public void download(List<SysConfigProportionDto> all, HttpServletResponse response) throws IOException {
        List<Map<String, Object>> list = new ArrayList<>();
        for (SysConfigProportionDto sysConfigProportion : all) {
            String configurationType = sysConfigProportion.getConfigurationType() != null ? dictDetailRepository.findByDictNameAndValue(Constant.CONFIGURATION_TYPE, sysConfigProportion.getConfigurationType()).getLabel() : "";
            Map<String,Object> map = new LinkedHashMap<>();
            map.put("标题", sysConfigProportion.getTitle());
            map.put("比例", sysConfigProportion.getProportion());
            map.put("数值", sysConfigProportion.getProportion());
            map.put("配置类型", configurationType);
            map.put("备注", sysConfigProportion.getRemarks());
            map.put("创建者", sysConfigProportion.getCreateBy());
            map.put("创建时间", sysConfigProportion.getCreateTime());