|
@ -129,8 +129,9 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
|
|
WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
|
|
contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
|
|
contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
|
|
HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
|
|
HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
|
|
//todo 表头固定不正确
|
|
|
|
|
|
FreezeAndFilter writeHandler = new FreezeAndFilter(); |
|
|
FreezeAndFilter writeHandler = new FreezeAndFilter(); |
|
|
|
|
|
//从第几行开始冻结
|
|
|
|
|
|
writeHandler.rowSplit = exportConfigData.getHeaderRow(); |
|
|
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("居民基本信息.xlsx", response)) |
|
|
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel("居民基本信息.xlsx", response)) |
|
|
.registerWriteHandler(new ExcelFillCellMergeStrategy(mergeRowIndex, mergeColumnIndex)) |
|
|
.registerWriteHandler(new ExcelFillCellMergeStrategy(mergeRowIndex, mergeColumnIndex)) |
|
|
.registerWriteHandler(horizontalCellStyleStrategy) |
|
|
.registerWriteHandler(horizontalCellStyleStrategy) |
|
@ -194,7 +195,6 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
resultData.add(singleResult); |
|
|
resultData.add(singleResult); |
|
|
}); |
|
|
}); |
|
|
excelWriter.write(resultData, writeSheet); |
|
|
excelWriter.write(resultData, writeSheet); |
|
|
//todo
|
|
|
|
|
|
break; |
|
|
break; |
|
|
} while (mapListPage.getResult().size() == searchForm.getPageSize()); |
|
|
} while (mapListPage.getResult().size() == searchForm.getPageSize()); |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
@ -305,17 +305,18 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private String putOptionValue(FormItemResult e, String vauleStr) { |
|
|
private String putOptionValue(FormItemResult e, String valueStr) { |
|
|
if (e == null) { |
|
|
if (e == null) { |
|
|
return vauleStr; |
|
|
return valueStr; |
|
|
} |
|
|
} |
|
|
FormItemTypeEnum itemTypeEnum = FormItemTypeEnum.getEnum(e.getItemType()); |
|
|
FormItemTypeEnum itemTypeEnum = FormItemTypeEnum.getEnum(e.getItemType()); |
|
|
switch (itemTypeEnum) { |
|
|
switch (itemTypeEnum) { |
|
|
case CHECKBOX: |
|
|
case CHECKBOX: |
|
|
|
|
|
//如果是多选 则返回顿号隔开
|
|
|
if (e.getMultiSelect()) { |
|
|
if (e.getMultiSelect()) { |
|
|
List<String> valueList = new ArrayList<>(); |
|
|
List<String> valueList = new ArrayList<>(); |
|
|
e.getOptions().forEach(option -> { |
|
|
e.getOptions().forEach(option -> { |
|
|
if (vauleStr.contains(option.getValue())) { |
|
|
if (valueStr.contains(option.getValue())) { |
|
|
valueList.add(option.getLabel()); |
|
|
valueList.add(option.getLabel()); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -323,20 +324,20 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
for (OptionDTO dto : e.getOptions()) { |
|
|
for (OptionDTO dto : e.getOptions()) { |
|
|
return vauleStr.contains(dto.getValue()) ? StrConstant.YES : StrConstant.NO; |
|
|
return valueStr.contains(dto.getValue()) ? StrConstant.YES : StrConstant.NO; |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case SELECT: |
|
|
case SELECT: |
|
|
case RADIO: |
|
|
case RADIO: |
|
|
for (OptionDTO optionDTO : e.getOptions()) { |
|
|
for (OptionDTO optionDTO : e.getOptions()) { |
|
|
if (optionDTO.getValue().equals(vauleStr)) { |
|
|
if (optionDTO.getValue().equals(valueStr)) { |
|
|
return optionDTO.getLabel(); |
|
|
return optionDTO.getLabel(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
} |
|
|
} |
|
|
return vauleStr; |
|
|
return valueStr; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|