Commit 29f4d483 by zhangkb

系统导出模块换成中文名

parent 1b2b8ca4
......@@ -22,7 +22,6 @@ import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.VerticalAlignment;
......@@ -620,7 +619,7 @@ public class TagFileService {
this.excelTitleStyle(workbook, titleList, requiredCell, row, sheet);
//填充数据
this.fillSystemData(sysTagList, row, sheet, rowIndex);
this.fillSystemData(sysTagList, row, sheet, rowIndex, authService.catalogs(0L));
//返回前台
this.responseWorkbook(workbook, request, response);
......@@ -656,7 +655,7 @@ public class TagFileService {
bufferedOutPut.close();
}
private void fillSystemData(List<SysTag> sysTagList,Row row,Sheet sheet,int rowIndex) {
private void fillSystemData(List<SysTag> sysTagList,Row row,Sheet sheet,int rowIndex,List<Map<String,Object>> catalogs) {
for(SysTag sysTag : sysTagList) {
int contentCellIndex = 0;
row = sheet.createRow(rowIndex++);
......@@ -682,7 +681,16 @@ public class TagFileService {
contentCellIndex++;
row.createCell(contentCellIndex).setCellValue(sysTag.getBusinessFlow());
contentCellIndex++;
row.createCell(contentCellIndex).setCellValue(sysTag.getCatalog());
//author:zhangkb time:2020-3-20 desc:将模板转换成中文
String catalog = sysTag.getCatalog();
for(Map<String,Object> map : catalogs) {
if(catalog.equals(map.get("catalogId"))) {
catalog = map.get("catalogName").toString();
}
}
row.createCell(contentCellIndex).setCellValue(catalog);
contentCellIndex++;
row.createCell(contentCellIndex).setCellValue(sysTag.getDept());
contentCellIndex++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment