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