bug68002修改
This commit is contained in:
+35
-37
@@ -743,7 +743,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
excelName = "Personal List";
|
excelName = "Personal List";
|
||||||
}
|
}
|
||||||
HSSFSheet sheet = workbook.createSheet(excelName);
|
HSSFSheet sheet = workbook.createSheet(excelName);
|
||||||
sheet.setDefaultColumnWidth(16);//列宽
|
sheet.setDefaultColumnWidth(21);//列宽
|
||||||
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
HSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||||
cellStyle.setWrapText(true);//自动换行
|
cellStyle.setWrapText(true);//自动换行
|
||||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||||
@@ -752,31 +752,31 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
HSSFCellStyle cellStyleTemp = workbook.createCellStyle();
|
HSSFCellStyle cellStyleTemp = workbook.createCellStyle();
|
||||||
cellStyleTemp.setWrapText(true);//自动换行
|
cellStyleTemp.setWrapText(true);//自动换行
|
||||||
|
|
||||||
int startLine = 0;
|
// int startLine = 0;
|
||||||
int endLine = 4;
|
// int endLine = 4;
|
||||||
//合并单元格
|
// //合并单元格
|
||||||
CellRangeAddress region1 =
|
// CellRangeAddress region1 =
|
||||||
new CellRangeAddress(1, 1, startLine, endLine); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
// new CellRangeAddress(1, 1, startLine, endLine); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
||||||
sheet.addMergedRegion(region1);
|
// sheet.addMergedRegion(region1);
|
||||||
|
|
||||||
String explainInfo= null;
|
// String explainInfo= null;
|
||||||
|
|
||||||
if(CutEnum.CN.getValue().equals(cut)){
|
// if(CutEnum.CN.getValue().equals(cut)){
|
||||||
explainInfo =
|
// explainInfo =
|
||||||
"填写说明\n"
|
// "填写说明\n"
|
||||||
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n"
|
// + "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n"
|
||||||
+ "2.填写人员时,必须使用人员账号进行填写;\n"
|
// + "2.填写人员时,必须使用人员账号进行填写;\n"
|
||||||
+ "3.填写的人员账号必须与系统中账号保持一致;\n"
|
// + "3.填写的人员账号必须与系统中账号保持一致;\n"
|
||||||
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人、认证工程师三个字段信息。";
|
// + "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人、认证工程师三个字段信息。";
|
||||||
}else{
|
// }else{
|
||||||
explainInfo =
|
// explainInfo =
|
||||||
"filling explanation\n"
|
// "filling explanation\n"
|
||||||
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
|
// + "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
|
||||||
+ "2. When filling in personnel, personnel account must be used to fill in;\n"
|
// + "2. When filling in personnel, personnel account must be used to fill in;\n"
|
||||||
+ "3. The personnel account number filled in must be consistent with the account number in the system;\n"
|
// + "3. The personnel account number filled in must be consistent with the account number in the system;\n"
|
||||||
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person and certified engineer.";
|
// + "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person and certified engineer.";
|
||||||
}
|
// }
|
||||||
HSSFRichTextString explain=new HSSFRichTextString(explainInfo);
|
// HSSFRichTextString explain=new HSSFRichTextString(explainInfo);
|
||||||
|
|
||||||
//表头
|
//表头
|
||||||
Row row = sheet.createRow(0);//开始创建标题行
|
Row row = sheet.createRow(0);//开始创建标题行
|
||||||
@@ -789,20 +789,20 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
short height = (short) (7 * 200);
|
short height = (short) (7 * 200);
|
||||||
rowExplain.setHeight((short) height);
|
rowExplain.setHeight((short) height);
|
||||||
Cell cell = rowExplain.createCell(0);
|
Cell cell = rowExplain.createCell(0);
|
||||||
cell.setCellValue(explain);
|
// cell.setCellValue(explain);
|
||||||
cell.setCellStyle(cellStyleTemp);
|
cell.setCellStyle(cellStyleTemp);
|
||||||
|
|
||||||
//设置导出数据
|
//设置导出数据
|
||||||
if(CollectionUtils.isNotEmpty(dataList)) {
|
if(CollectionUtils.isNotEmpty(dataList)) {
|
||||||
for (int j = 2; j < dataList.size()+2; j++) {
|
for (int j = 1; j < dataList.size()+1; j++) {
|
||||||
Row dataRow = sheet.createRow(j);
|
Row dataRow = sheet.createRow(j);
|
||||||
dataRow.createCell(0).setCellValue(dataList.get(j - 2).getDutyTerritory());
|
dataRow.createCell(0).setCellValue(dataList.get(j - 1).getDutyTerritory());
|
||||||
dataRow.createCell(1).setCellValue(dataList.get(j - 2).getLawEngineerName());
|
dataRow.createCell(1).setCellValue(dataList.get(j - 1).getLawEngineerName());
|
||||||
dataRow.createCell(2).setCellValue(dataList.get(j - 2).getEngineeringInterfacePersonName());
|
dataRow.createCell(2).setCellValue(dataList.get(j - 1).getEngineeringInterfacePersonName());
|
||||||
//dataRow.createCell(3).setCellValue(dataList.get(j - 2).getCertificationEngineerName());
|
//dataRow.createCell(3).setCellValue(dataList.get(j - 2).getCertificationEngineerName());
|
||||||
dataRow.createCell(3).setCellValue(dataList.get(j - 2).getEngineerLawSetName());
|
dataRow.createCell(3).setCellValue(dataList.get(j - 1).getEngineerLawSetName());
|
||||||
dataRow.createCell(4).setCellValue(dataList.get(j - 2).getEngineerAttSetName());
|
dataRow.createCell(4).setCellValue(dataList.get(j - 1).getEngineerAttSetName());
|
||||||
dataRow.createCell(5).setCellValue(dataList.get(j - 2).getRemark());
|
dataRow.createCell(5).setCellValue(dataList.get(j - 1).getRemark());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -882,15 +882,13 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
"填写说明\n"
|
"填写说明\n"
|
||||||
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n"
|
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n"
|
||||||
+ "2.填写人员时,必须使用人员账号进行填写;\n"
|
+ "2.填写人员时,必须使用人员账号进行填写;\n"
|
||||||
+ "3.填写的人员账号必须与系统中账号保持一致;\n"
|
+ "3.填写的人员账号必须与系统中账号保持一致。";
|
||||||
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人两个字段信息。";
|
|
||||||
} else {
|
} else {
|
||||||
explainInfo =
|
explainInfo =
|
||||||
"filling explanation\n"
|
"filling explanation\n"
|
||||||
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
|
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
|
||||||
+ "2. When filling in personnel, personnel account must be used to fill in;\n"
|
+ "2. When filling in personnel, personnel account must be used to fill in;\n"
|
||||||
+ "3. The personnel account number filled in must be consistent with the account number in the system;\n"
|
+ "3. The personnel account number filled in must be consistent with the account number in the system .";
|
||||||
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person .";
|
|
||||||
}
|
}
|
||||||
HSSFRichTextString explain = new HSSFRichTextString(explainInfo);
|
HSSFRichTextString explain = new HSSFRichTextString(explainInfo);
|
||||||
|
|
||||||
@@ -902,7 +900,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
|||||||
}
|
}
|
||||||
|
|
||||||
Row rowExplain = sheet.createRow(1);
|
Row rowExplain = sheet.createRow(1);
|
||||||
short height = (short) (7 * 200);
|
short height = (short) (6 * 200);
|
||||||
rowExplain.setHeight((short) height);
|
rowExplain.setHeight((short) height);
|
||||||
Cell cell = rowExplain.createCell(0);
|
Cell cell = rowExplain.createCell(0);
|
||||||
cell.setCellValue(explain);
|
cell.setCellValue(explain);
|
||||||
|
|||||||
Reference in New Issue
Block a user