diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcExportTemplateDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcExportTemplateDTO.java index 198c49a59f..7f2f525998 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcExportTemplateDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcExportTemplateDTO.java @@ -1,8 +1,10 @@ package com.epmet.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; +import java.util.Date; /** @@ -61,4 +63,8 @@ public class IcExportTemplateDTO implements Serializable { */ private Integer sort; private Integer isSelf; + + private String createdBy; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date createdTime; } diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IcExportTemplateForExportResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IcExportTemplateForExportResultDTO.java index d8ad9b8e5a..6906649cbb 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IcExportTemplateForExportResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IcExportTemplateForExportResultDTO.java @@ -57,6 +57,8 @@ public class IcExportTemplateForExportResultDTO implements Serializable { private String columnName; private String optionSourceValue; + + private String optionSourceType; /** * 是否支持添加 即是否是多对一 eg:居民需求是多个对一个 */ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java index 5bb93a162a..a65fd3b9ab 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java @@ -266,6 +266,8 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl> resultTemp, IcExportTemplateForExportResultDTO root, List> headerList, List showSqlColumns, List hiddenSqlColumns, Set hasExistColumnSet) { if (StringUtils.isNotBlank(root.getColumnName())) { - showSqlColumns.add(new IcCustomExportResultDTO.SqlColumn(root.getItemId(),root.getTableName(),root.isSupportAdd(), root.getColumnName(),root.getOptionSourceValue())); + showSqlColumns.add(new IcCustomExportResultDTO.SqlColumn(root.getItemId(),root.getTableName(),root.isSupportAdd(), root.getColumnName(),root.getOptionSourceType())); if (StringUtils.isNotBlank(root.getOptionSourceValue())&&root.getOptionSourceValue().contains(StrConstant.QUESTION_MARK)) { String[] paramArr = root.getOptionSourceValue().split(StrConstant.QUESTION_MARK_TRANSFER)[NumConstant.ONE].split(StrConstant.AND_MARK); //先remote中再添加 然后移除item中有的 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserExportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserExportServiceImpl.java index 14b772af77..d4370edeb0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserExportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserExportServiceImpl.java @@ -44,6 +44,7 @@ import com.google.common.cache.CacheBuilder; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.IndexedColors; +import org.apache.poi.ss.usermodel.VerticalAlignment; import org.jetbrains.annotations.Nullable; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -126,7 +127,9 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { WriteCellStyle headWriteCellStyle = new WriteCellStyle(); // 背景设置为红色 headWriteCellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); - HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle,new WriteCellStyle()); + WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); + contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); + HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); FreezeAndFilter writeHandler = new FreezeAndFilter(); excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("居民基本信息.xlsx", response)) .registerWriteHandler(new ExcelFillCellMergeStrategy(mergeRowIndex, mergeColumnIndex))