Commit e4526a9d by wangweidong

土工平台修改

parent 19410f06
......@@ -979,7 +979,6 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
}else{
mapReplace.put("#{密度9.81}","");
}
// HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,sheet);
nextSample++;
HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,sheet);
}
......@@ -1031,22 +1030,13 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
mapReplace.put("#{密度9.81}","");
}
HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,xssfSheet);
// int numSheet = xssfWorkbook.getNumberOfSheets();
// for (int i = 0; i < numSheet; i++) {
// HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,xssfWorkbook.getSheetAt(i));
// }
int length = voList.size();
// for (int i = 0; i < length; i++) {
//
//
// }
}else{
List<List<SoilExperimentVO>> relList= ListUtils.partition(voList,templateSampleNum);
int templateSheetMum = xssfWorkbook.getNumberOfSheets();
XSSFSheet sheetMy = xssfWorkbook.getSheetAt(0);
PrintSetup printSetup= sheetMy.getPrintSetup();
boolean printRound= printSetup.getLandscape();
boolean first = true;
List<SoilExperimentVO> firstList = null;
......@@ -1060,7 +1050,8 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
continue;
}else{
sheet = xssfWorkbook.cloneSheet(0,sheetMy.getSheetName()+(templateSheetMum));
}
sheet.getPrintSetup().setLandscape(printRound);
}
Map<String,String> mapReplaceMy = new HashMap<>();
mapReplaceMy.put("#{reportCode}",entrust.getEntrustCode());
......
......@@ -11,24 +11,23 @@ import java.math.BigDecimal;
public class Test {
public static void main(String[] args) {
try {
Workbook workbook1 = new Workbook("D://excel//封面.xlsx");
Workbook workbook2 = new Workbook("D://excel//检测报告(力学试验)三轴.xlsx");
Workbook workbook3 = new Workbook("D://excel//检测报告(力学试验)手动十字板.xlsx");
Workbook workbook4 = new Workbook("D://excel//检测报告(力学试验)休止角.xlsx");
Workbook workbook5 = new Workbook("D://excel//检测报告(力学试验)袖珍贯入仪.xlsx");
Workbook workbook6 = new Workbook("D://excel//检测报告(力学试验)直剪.xlsx");
Workbook workbook7 = new Workbook("D://excel//附件.xlsx");
workbook1.combine(workbook2);
workbook1.combine(workbook3);
workbook1.combine(workbook4);
workbook1.combine(workbook5);
workbook1.combine(workbook6);
workbook1.combine(workbook7);
XSSFWorkbook workbook2 = new XSSFWorkbook(new File("D://颗粒分析实验(甲种)2.xlsx"));
XSSFWorkbook workbook3 = new XSSFWorkbook(new File("D://颗粒分析实验(甲种)3.xlsx"));
int num = workbook3.getNumberOfSheets();
for (int i = 0; i < num; i++) {
//workbook2.cloneSheet()
}
FileOutputStream fileOut=null;
String allFileName = "d:/excel/0.xlsx";
fileOut = new FileOutputStream(allFileName);
workbook1.save(fileOut, SaveFormat.XLSX);
File file = new File(allFileName);
XSSFWorkbook workbook = new XSSFWorkbook(file);
......
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