|
|
|
@ -8,8 +8,6 @@ import com.alibaba.excel.write.metadata.WriteSheet; |
|
|
|
import com.epmet.commons.tools.annotation.LoginUser; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.ExcelUtils; |
|
|
|
@ -215,10 +213,9 @@ public class ScreenProjectController { |
|
|
|
e.setIndex(1); |
|
|
|
resultDTOList.addAll(ConvertUtils.sourceToTarget(e.getChildren(),ProjectCategoryResultDTO.class)); |
|
|
|
}); |
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); |
|
|
|
Map<String,Object> mapData = new HashMap<>(); |
|
|
|
mapData.put("list",resultDTOList); |
|
|
|
mapData.put("orgName",staffInfo.getAgencyName()); |
|
|
|
mapData.put("orgName", formDTO.getOrgName()); |
|
|
|
mapData.put("exportDate",getExportDateStr(formDTO.getStartTime(),formDTO.getEndTime())); |
|
|
|
Workbook workbook = ExcelExportUtil.exportExcel(new TemplateExportParams(templatePath), mapData); |
|
|
|
response.setHeader("content-Type", "application/vnd.ms-excel"); |
|
|
|
@ -257,9 +254,8 @@ public class ScreenProjectController { |
|
|
|
formDTO.setIsPage(false); |
|
|
|
ValidatorUtils.validateEntity(formDTO, ProjectCategoryFormDTO.CategoryProjectExportForm.class); |
|
|
|
|
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); |
|
|
|
Map<String, Object> mapData = new HashMap<>(); |
|
|
|
mapData.put("orgName", staffInfo == null ? StrConstant.EPMETY_STR : staffInfo.getAgencyName()); |
|
|
|
mapData.put("orgName", formDTO.getOrgName()); |
|
|
|
mapData.put("exportDate", getExportDateStr(formDTO.getStartTime(), formDTO.getEndTime())); |
|
|
|
mapData.put("categoryName", formDTO.getCategoryName()); |
|
|
|
if (StringUtils.isNotBlank(formDTO.getParentCategoryName())) { |
|
|
|
|