Browse Source

教师考勤调整导出增加列

dzx 1 month ago
parent
commit
b5b10a4132

+ 3 - 2
src/main/java/com/xjrsoft/module/attendance/service/impl/AttendanceStatisticsServiceImpl.java

@@ -430,6 +430,7 @@ public class AttendanceStatisticsServiceImpl extends MPJBaseServiceImpl<Attendan
         for (ArrayList<String> rowData : dataList) {
             Row dataRow = sheet.createRow(dataRowNumber);
             for (int i = 0; i < rowData.size(); i ++){
+                sheet.autoSizeColumn(i);
                 String content = rowData.get(i);
                 Font font = workbook.createFont();
                 font.setBold(false);// 设置为粗体
@@ -557,8 +558,8 @@ public class AttendanceStatisticsServiceImpl extends MPJBaseServiceImpl<Attendan
         sheet.addMergedRegion(new CellRangeAddress(rowNumber, rowNumber + 1, 3, 3));
 
         Cell row1cell8 = row1.createCell(4);
-        row1cell4.setCellValue("考勤组应出勤天数");
-        row1cell4.setCellStyle(cellStyle);
+        row1cell8.setCellValue("考勤组应出勤天数");
+        row1cell8.setCellStyle(cellStyle);
         sheet.addMergedRegion(new CellRangeAddress(rowNumber, rowNumber + 1, 4, 4));
 
         Cell row1cell5 = row1.createCell(5);