From 7684b872a4ba519195bbe6c78660385ea64e84ff Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 26 Apr 2022 16:29:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=9B=E5=BB=BA=E4=BA=BA=E5=92=8C=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcExportTemplateDTO.java | 5 +++++ .../com/epmet/service/impl/IcExportTemplateServiceImpl.java | 2 ++ 2 files changed, 7 insertions(+) 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..cfb67b3782 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 @@ -3,6 +3,7 @@ package com.epmet.dto; import lombok.Data; import java.io.Serializable; +import java.util.Date; /** @@ -61,4 +62,8 @@ public class IcExportTemplateDTO implements Serializable { */ private Integer sort; private Integer isSelf; + + private String createdBy; + + private Date createdTime; } 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..8b3c4da971 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 Date: Tue, 26 Apr 2022 16:31:56 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=9B=E5=BB=BA=E4=BA=BA=E5=92=8C=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcExportTemplateDTO.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 cfb67b3782..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,5 +1,6 @@ package com.epmet.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; @@ -64,6 +65,6 @@ public class IcExportTemplateDTO implements Serializable { private Integer isSelf; private String createdBy; - + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date createdTime; } From 28c468076040503be6c0029c182664342cfe5f41 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 26 Apr 2022 16:32:13 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=20=E5=90=88=E5=B9=B6=E5=8D=95=E5=85=83=E6=A0=BC2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/IcExportTemplateForExportResultDTO.java | 2 ++ .../com/epmet/service/impl/IcExportTemplateServiceImpl.java | 2 +- .../com/epmet/service/impl/IcResiUserExportServiceImpl.java | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) 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..62f52239c9 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 @@ -293,7 +293,7 @@ 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))