| | |
| | | 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; |
| | | import me.zhengjie.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | |
| | | private final ProjectTypeRepository projectTypeRepository; |
| | | private final ProjectTypeMapper projectTypeMapper; |
| | | private final DictDetailRepository dictDetailRepository; |
| | | |
| | | @Override |
| | | public Map<String,Object> queryAll(ProjectTypeQueryCriteria criteria, Pageable pageable){ |
| | |
| | | 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(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("标准单价币种", projectType.getStandardUnitCurrency()); |
| | | map.put("标准单价币种", unitCurrency); |
| | | map.put("标准单价金额", projectType.getStandardUnitPrice()); |
| | | map.put("标准利润金额", projectType.getStandardProfitPrice()); |
| | | map.put("标准工作量单位", projectType.getStandardWorkloadUnit()); |
| | | map.put("标准工作量单位", workloadUnit); |
| | | map.put("备注", projectType.getRemarks()); |
| | | map.put("创建者", projectType.getCreateBy()); |
| | | map.put("创建时间", projectType.getCreateTime()); |