|
@@ -260,7 +260,7 @@ public class FormExecuteController {
|
|
// 设置第每列的列宽度
|
|
// 设置第每列的列宽度
|
|
for (ImportConfig importConfig : importConfigs) {
|
|
for (ImportConfig importConfig : importConfigs) {
|
|
if(importConfig.getWidth() == 0){
|
|
if(importConfig.getWidth() == 0){
|
|
- sheet.setColumnWidth(importConfig.getSortCode(), importConfig.getLabel().length() * 4 * 256);
|
|
|
|
|
|
+ sheet.setColumnWidth(importConfig.getSortCode(), importConfig.getLabel().length() * 3 * 256);
|
|
// sheet.autoSizeColumn(importConfig.getSortCode());
|
|
// sheet.autoSizeColumn(importConfig.getSortCode());
|
|
}else {
|
|
}else {
|
|
sheet.setColumnWidth(importConfig.getSortCode(), importConfig.getWidth() * 256);
|
|
sheet.setColumnWidth(importConfig.getSortCode(), importConfig.getWidth() * 256);
|
|
@@ -314,6 +314,18 @@ public class FormExecuteController {
|
|
value = LocalDateTimeUtil.format(time);
|
|
value = LocalDateTimeUtil.format(time);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 检查类层次结构
|
|
|
|
+
|
|
|
|
+ if (value instanceof Integer) {
|
|
|
|
+ value = Integer.toString((Integer) value);
|
|
|
|
+ }
|
|
|
|
+ if (value instanceof Double) {
|
|
|
|
+ value = Double.toString((Double) value);
|
|
|
|
+ }
|
|
|
|
+ if (value instanceof Long) {
|
|
|
|
+ value = Long.toString((Long) value);
|
|
|
|
+ }
|
|
|
|
+
|
|
Cell cell = dataRow.createCell(i);
|
|
Cell cell = dataRow.createCell(i);
|
|
cell.setCellValue((String)value);
|
|
cell.setCellValue((String)value);
|
|
cell.setCellStyle(cellStyle);
|
|
cell.setCellStyle(cellStyle);
|
|
@@ -463,16 +475,15 @@ public class FormExecuteController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
FormRelease formRelease = formReleaseService.getById(releaseId);
|
|
FormRelease formRelease = formReleaseService.getById(releaseId);
|
|
FormReleaseConfig formReleaseConfig = JSONUtil.toBean(formRelease.getConfigJson(), FormReleaseConfig.class);
|
|
FormReleaseConfig formReleaseConfig = JSONUtil.toBean(formRelease.getConfigJson(), FormReleaseConfig.class);
|
|
// 配置excel第一行字段名
|
|
// 配置excel第一行字段名
|
|
List<List<String>> head = new ArrayList<>();
|
|
List<List<String>> head = new ArrayList<>();
|
|
// List<ColumnConfig> columnConfigs = formReleaseConfig.getListConfig().getColumnConfigs();
|
|
// List<ColumnConfig> columnConfigs = formReleaseConfig.getListConfig().getColumnConfigs();
|
|
- List<ImportConfig> importConfigs = formReleaseConfig.getListConfig().getImportConfigs();
|
|
|
|
// for (ColumnConfig config : columnConfigs) {
|
|
// for (ColumnConfig config : columnConfigs) {
|
|
// head.add(Collections.singletonList(config.getLabel()));
|
|
// head.add(Collections.singletonList(config.getLabel()));
|
|
// }
|
|
// }
|
|
|
|
+ List<ImportConfig> importConfigs = formReleaseConfig.getListConfig().getImportConfigs();
|
|
for (ImportConfig config : importConfigs) {
|
|
for (ImportConfig config : importConfigs) {
|
|
head.add(Collections.singletonList(config.getLabel()));
|
|
head.add(Collections.singletonList(config.getLabel()));
|
|
}
|
|
}
|