Browse Source

Merge remote-tracking branch 'remotes/origin/dev_resi_export' into develop

dev
jianjun 3 years ago
parent
commit
c3585243ef
  1. 6
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcExportTemplateDTO.java
  2. 2
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IcExportTemplateForExportResultDTO.java
  3. 4
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcExportTemplateServiceImpl.java
  4. 5
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserExportServiceImpl.java

6
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;
}

2
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:居民需求是多个对一个
*/

4
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<IcExportTemplat
IcExportTemplateDTO dto = new IcExportTemplateDTO();
dto.setId(item.getId());
dto.setName(item.getName());
dto.setCreatedTime(item.getCreatedTime());
dto.setCreatedBy(staffInfo.getRealName());
if (tokenDto.getUserId().equals(item.getCreatedBy())) {
dto.setIsSelf(NumConstant.ONE);
} else {
@ -293,7 +295,7 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl<IcExportTemplat
private void digui(Map<String, List<IcExportTemplateForExportResultDTO>> resultTemp, IcExportTemplateForExportResultDTO root, List<List<String>> headerList, List<IcCustomExportResultDTO.SqlColumn> showSqlColumns, List<IcCustomExportResultDTO.SqlColumn> hiddenSqlColumns, Set<String> 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中有的

5
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))

Loading…
Cancel
Save