🐛 更新应收账单模板并兼容模板样式编号变化
This commit is contained in:
+11
@@ -187,12 +187,23 @@ class ArBillWorkbookWriterTest {
|
||||
assertEquals(1, workbook.getAllPictures().size());
|
||||
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||
assertEquals(21, sheet.getRow(4).getLastCellNum());
|
||||
assertEquals(original.getSheetAt(0).getRow(5).getCell(18).getCellStyle().getBorderBottom(),
|
||||
sheet.getRow(4).getCell(18).getCellStyle().getBorderBottom());
|
||||
assertEquals(original.getSheetAt(0).getRow(5).getCell(18).getCellStyle().getFont().getFontHeight(),
|
||||
sheet.getRow(4).getCell(18).getCellStyle().getFont().getFontHeight());
|
||||
assertEquals(1, sheet.getRow(4).getCell(18).getNumericCellValue());
|
||||
assertEquals("备注 & <快照>", sheet.getRow(4).getCell(19).getStringCellValue());
|
||||
assertEquals(0, sheet.getRow(5).getPhysicalNumberOfCells());
|
||||
assertEquals("银行信息", sheet.getRow(6).getCell(1).getStringCellValue());
|
||||
assertEquals("收款账户快照", sheet.getRow(7).getCell(2).getStringCellValue());
|
||||
}
|
||||
try (InputStream input = getClass().getResourceAsStream("/" + template.getStorageKey());
|
||||
XSSFWorkbook original = new XSSFWorkbook(input)) {
|
||||
if (original.getNumberOfSheets() > 1) {
|
||||
assertArrayEquals(zipPart(getClass().getResourceAsStream("/" + template.getStorageKey()), "xl/worksheets/sheet2.xml"),
|
||||
zipPart(Files.newInputStream(target), "xl/worksheets/sheet2.xml"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user