Merge branch 'test'
This commit is contained in:
+8
-5
@@ -131,6 +131,8 @@ public class ArBillServiceImpl implements IArBillService {
|
|||||||
private static final int TEMPLATE_DATA_START_ROW = 5;
|
private static final int TEMPLATE_DATA_START_ROW = 5;
|
||||||
/** 模板的明细区只有第 5 行;超出的明细行插入在页脚前。 */
|
/** 模板的明细区只有第 5 行;超出的明细行插入在页脚前。 */
|
||||||
private static final int TEMPLATE_LAST_DETAIL_ROW = 5;
|
private static final int TEMPLATE_LAST_DETAIL_ROW = 5;
|
||||||
|
/** 明细与银行信息、合计区域之间固定保留一行空白。 */
|
||||||
|
private static final int EXPORT_FOOTER_GAP_ROWS = 1;
|
||||||
/** DrawingML 行号从 0 开始,插入点是模板第 5 行之后。 */
|
/** DrawingML 行号从 0 开始,插入点是模板第 5 行之后。 */
|
||||||
private static final int TEMPLATE_DRAWING_INSERT_ROW_INDEX = 5;
|
private static final int TEMPLATE_DRAWING_INSERT_ROW_INDEX = 5;
|
||||||
private static final int TEMPLATE_COLUMN_COUNT = 21;
|
private static final int TEMPLATE_COLUMN_COUNT = 21;
|
||||||
@@ -1561,7 +1563,7 @@ public class ArBillServiceImpl implements IArBillService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 明细超出模板预留行时,同步下移插入点之后的图片锚点,保持二维码与页脚的相对位置。
|
* 根据明细新增行及页脚前空行,同步下移图片锚点,保持二维码与页脚的相对位置。
|
||||||
*/
|
*/
|
||||||
private String shiftDrawingAnchorRows(String drawingXml, int rowOffset) {
|
private String shiftDrawingAnchorRows(String drawingXml, int rowOffset) {
|
||||||
if (rowOffset <= 0) {
|
if (rowOffset <= 0) {
|
||||||
@@ -1667,8 +1669,10 @@ public class ArBillServiceImpl implements IArBillService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int lastDetailRow = Math.max(rowIndex - 1, TEMPLATE_LAST_DETAIL_ROW);
|
int lastDetailRow = Math.max(rowIndex - 1, TEMPLATE_LAST_DETAIL_ROW);
|
||||||
int rowOffset = lastDetailRow - TEMPLATE_LAST_DETAIL_ROW;
|
int rowOffset = lastDetailRow - TEMPLATE_LAST_DETAIL_ROW + EXPORT_FOOTER_GAP_ROWS;
|
||||||
writeOoxmlFooter(output, templateRows, lastDetailRow, bill, styleIndexes.generalNumber());
|
writeUtf8(output, "<row r=\"" + (lastDetailRow + 1) + "\" ht=\""
|
||||||
|
+ EXPORT_DETAIL_ROW_HEIGHT + "\" customHeight=\"true\"/>");
|
||||||
|
writeOoxmlFooter(output, templateRows, rowOffset, bill, styleIndexes.generalNumber());
|
||||||
String suffix = shiftFooterMerges(templateXml.substring(sheetDataEnd), rowOffset);
|
String suffix = shiftFooterMerges(templateXml.substring(sheetDataEnd), rowOffset);
|
||||||
writeUtf8(output, suffix);
|
writeUtf8(output, suffix);
|
||||||
return rowOffset;
|
return rowOffset;
|
||||||
@@ -1778,9 +1782,8 @@ public class ArBillServiceImpl implements IArBillService {
|
|||||||
return rows;
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeOoxmlFooter(OutputStream output, Map<Integer, String> templateRows, int lastDetailRow,
|
private void writeOoxmlFooter(OutputStream output, Map<Integer, String> templateRows, int rowOffset,
|
||||||
ArBill bill, int generalNumberStyleIndex) throws IOException {
|
ArBill bill, int generalNumberStyleIndex) throws IOException {
|
||||||
int rowOffset = lastDetailRow - TEMPLATE_LAST_DETAIL_ROW;
|
|
||||||
String totalAmountFormula = "SUM(S" + TEMPLATE_DATA_START_ROW + ":INDEX(S:S,ROW()-1))";
|
String totalAmountFormula = "SUM(S" + TEMPLATE_DATA_START_ROW + ":INDEX(S:S,ROW()-1))";
|
||||||
for (int offset = 0; offset < 4; offset++) {
|
for (int offset = 0; offset < 4; offset++) {
|
||||||
int sourceRowNumber = TEMPLATE_LAST_DETAIL_ROW + offset + 1;
|
int sourceRowNumber = TEMPLATE_LAST_DETAIL_ROW + offset + 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user