🐛 更新应收账单模板并兼容模板样式编号变化
This commit is contained in:
+2
-3
@@ -49,7 +49,6 @@ public class DefaultArBillWorkbookWriter extends ArBillWorkbookSupport {
|
||||
private static final double MIN_TRACKING_NO_COLUMN_WIDTH = MIN_CUSTOMER_ORDER_NO_COLUMN_WIDTH;
|
||||
private static final double MIN_FORMULA_COLUMN_WIDTH = 17.0;
|
||||
private static final double MIN_FEE_TYPE_COLUMN_WIDTH = 10.0;
|
||||
private static final int TEMPLATE_DETAIL_STYLE_INDEX = 31;
|
||||
private static final String TEMPLATE_SHEET_XML = "xl/worksheets/sheet1.xml";
|
||||
private static final String TEMPLATE_SHEET_RELATIONSHIPS_XML = "xl/worksheets/_rels/sheet1.xml.rels";
|
||||
private static final String TEMPLATE_STYLES_XML = "xl/styles.xml";
|
||||
@@ -81,8 +80,8 @@ public class DefaultArBillWorkbookWriter extends ArBillWorkbookSupport {
|
||||
StylesTable styles = readExportStyles(template);
|
||||
boolean preserveTemplatePayee = ArBillWorkbookWriters.GUANGZHOU_TEMPLATE_CODE.equals(template.getTemplateCode())
|
||||
|| ArBillWorkbookWriters.JIYUN_TEMPLATE_CODE.equals(template.getTemplateCode());
|
||||
// 固定收款信息的模板使用自身合计单元格样式,不依赖默认模板的样式编号。
|
||||
int detailStyleIndex = preserveTemplatePayee ? readTemplateDetailStyleIndex(template) : TEMPLATE_DETAIL_STYLE_INDEX;
|
||||
// 所有模板都从实际单元格读取样式,兼容新增 Sheet 或重新保存后变化的样式编号。
|
||||
int detailStyleIndex = readTemplateDetailStyleIndex(template);
|
||||
if (detailStyleIndex >= styles.getNumCellStyles()) {
|
||||
throw new IOException("应收账单导出模板明细样式不存在: " + detailStyleIndex);
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user