/** * 生成标准字段评审文档 * * @param wb excel工作页 * @param stdList 模型对象数组 */ public void standardFieldWriter(HSSFWorkbook wb, List<PDMStandardField> stdList) { HSSFSheet sheet = wb.getSheet(STD_SHEET); for (int i = 0; i < stdList.size(); i++) { HSSFRow row = sheet.createRow(i + 2); PDMStandardField std = stdList.get(i); // 1 HSSFCell cell = row.createCell(1); cell.setCellValue(std.getOldName()); cell.setCellStyle(getTextStyle(wb)); // 2 cell = row.createCell(2); cell.setCellValue(std.getOldChineseName()); cell.setCellStyle(getTextStyle(wb)); // 3 cell = row.createCell(3); cell.setCellValue(std.getOldBusType()); cell.setCellStyle(getTextStyle(wb)); // 4 cell = row.createCell(4); String tables = ""; for (int j = 0; j < std.getBelongTableList().size(); j++) { if (j != 0) { tables = tables + ","; } tables = tables + std.getBelongTableList().get(j); } cell.setCellValue(tables); cell.setCellStyle(getTextStyle(wb)); // 5 cell = row.createCell(5); String bolongSubSystem = ""; if (std.getBolongSubSystemList().size() > 0) { bolongSubSystem = std.getBolongSubSystemList().get(0); } cell.setCellValue(bolongSubSystem); cell.setCellStyle(getTextStyle(wb)); // 6 cell = row.createCell(6); cell.setCellValue(std.getGenName()); cell.setCellStyle(getTextStyle(wb)); // 7 cell = row.createCell(7); cell.setCellValue(std.getNewName()); cell.setCellStyle(getTextStyle(wb)); // 8 cell = row.createCell(8); cell.setCellValue(std.getNewChineseName()); cell.setCellStyle(getTextStyle(wb)); // 9 cell = row.createCell(9); cell.setCellValue(std.getGenBusType()); cell.setCellStyle(getTextStyle(wb)); // 10 cell = row.createCell(10); cell.setCellValue(std.getNewBusType()); cell.setCellStyle(getTextStyle(wb)); // 11 cell = row.createCell(11); cell.setCellValue(std.getOldComment()); cell.setCellStyle(getTextStyle(wb)); // 12 cell = row.createCell(12); cell.setCellValue(std.getNewComment()); cell.setCellStyle(getTextStyle(wb)); // 13 cell = row.createCell(13); cell.setCellValue(std.getDictId()); cell.setCellStyle(getTextStyle(wb)); // 14 cell = row.createCell(14); cell.setCellValue(std.getModefyDesc()); cell.setCellStyle(getTextStyle(wb)); // 15 cell = row.createCell(15); cell.setCellValue(std.getImportPath()); cell.setCellStyle(getTextStyle(wb)); } }