| | |
| | | |
| | | //2. 创建Excel工作簿 |
| | | SXSSFWorkbook wb = new SXSSFWorkbook(500); |
| | | ExcelUtil<ApsWeldSeamStatisticsV2> excelUtil = new ExcelUtil<>(ApsWeldSeamStatisticsV2.class); |
| | | excelUtil.init(list, "焊缝统计表", "焊缝统计表", Excel.Type.EXPORT); |
| | | excelUtil.createWorkbook(); |
| | | excelUtil.createExcelField(); |
| | | |
| | | Map<String, CellStyle> cellStyleMap = excelUtil.createStyles(wb); |
| | | CellStyle titleStyle = cellStyleMap.get("header_WHITE_GREY_50_PERCENT"); |
| | | CellStyle dataStyle = cellStyleMap.get("data_CENTER_BLACK_WHITE_STRING_false"); |
| | | CellStyle titleStyle = ExcelUtil.getCommonHeaderStyle(wb); |
| | | CellStyle dataStyle =ExcelUtil.getDataCellStyle(wb); |
| | | |
| | | SXSSFSheet sheet = wb.createSheet("焊缝统计表"); |
| | | List<LinkedHashMap<String,String>> titleList= initRowTitle(); |
| | |
| | | //5. 构建数据行 |
| | | LinkedHashMap<String, String> first = titleList.get(0); |
| | | ArrayList<Map.Entry<String, String>> titles = new ArrayList<>(first.entrySet()); |
| | | List<String> stringFiledKeys=Arrays.asList("productionBase","isSatisfy"); |
| | | for (int rowInx = 0; rowInx < list.size(); rowInx++) { |
| | | SXSSFRow dataRow = sheet.createRow(rowInx + 2); |
| | | ApsWeldSeamStatisticsV2 statistics = list.get(rowInx); |