82584-下载文件拆分导入模板字段修改

This commit is contained in:
wangzhijiang
2024-03-08 17:26:32 +08:00
parent dba75f37ef
commit e93cb8129f
@@ -849,7 +849,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
// 创建第一行
Row headerRow = sheet.createRow(0);
// 创建表头信息
String[] titleArr = {"", "标题", "内容"};
String[] titleArr = {"", "标题", "内容"};
//样式
CellStyle cellStyle = workbook.createCellStyle();
@@ -871,9 +871,9 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
// 填充说明
Cell cell = headerRowTwo.createCell(0);
String explain = "模版说明:\n" +
"1.条号不能为空\n" +
"1.条号不能为空\n" +
"2.仅支持zip格式文件夹\n" +
"3.条内容如果导入表格类型,表格的名称需要与sheet页名称保持一致";
"3.条内容如果导入表格类型,表格的名称需要与sheet页名称保持一致";
CellStyle cellStyleTwo = workbook.createCellStyle();
cellStyleTwo.setWrapText(true);
@@ -1101,7 +1101,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
// 创建工作簿
// 创建sheet页
Sheet sheet = workbook.createSheet("内容");
Sheet sheet = workbook.createSheet("内容");
// 字段名
List<String> keyList = new ArrayList<>();
if(!Objects.isNull(mapList) && !mapList.isEmpty()){
@@ -1132,7 +1132,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
cell.setCellValue(new XSSFRichTextString(keyList.get(i)));
cell.setCellStyle(cellStyleOne);
if("内容".equals(keyList.get(i))) {
if("内容".equals(keyList.get(i))) {
sheet.setColumnWidth(i, 80 * 256);
} else {
sheet.setColumnWidth(i, 20 * 256);