|
|
|
@ -42,10 +42,10 @@ public class BoxReportOperation extends AbstractAIFOperation {
|
|
|
|
|
private LinkedList<String[]> datas;
|
|
|
|
|
private HashMap<String, Integer> boxMap;
|
|
|
|
|
|
|
|
|
|
private final int PAGE_CNT = 23;//
|
|
|
|
|
private final int TITLE_CNT = 4;
|
|
|
|
|
private final int PAGE = PAGE_CNT + TITLE_CNT;
|
|
|
|
|
private final int COL_CNT = 9;
|
|
|
|
|
private final int PAGE_CNT = 23;//每页内容行数
|
|
|
|
|
private final int TITLE_CNT = 4;//每页表头行数
|
|
|
|
|
private final int PAGE = PAGE_CNT + TITLE_CNT;//每页总行数
|
|
|
|
|
private final int COL_CNT = 9;//每页最大列号
|
|
|
|
|
/**
|
|
|
|
|
* ×°Ïäµ¥±¨±í
|
|
|
|
|
* @param session TCSession
|
|
|
|
@ -114,10 +114,11 @@ public class BoxReportOperation extends AbstractAIFOperation {
|
|
|
|
|
if(b % PAGE_CNT > 0)
|
|
|
|
|
pageCnt ++;
|
|
|
|
|
}
|
|
|
|
|
for(int i=1; i<=pageCnt; i++) {
|
|
|
|
|
// sheet.copyRows(0, PAGE, i*PAGE, null);
|
|
|
|
|
POIUtil.copyRows(workbook, sheet, 0, PAGE-1, i*PAGE, COL_CNT, 1);
|
|
|
|
|
}
|
|
|
|
|
// for(int i=1; i<=pageCnt; i++) {
|
|
|
|
|
//// sheet.copyRows(0, PAGE, i*PAGE, null);
|
|
|
|
|
// POIUtil.copyRows(workbook, sheet, 0, PAGE-1, i*PAGE, COL_CNT, 1);
|
|
|
|
|
// }
|
|
|
|
|
POIUtil.copyRows(workbook, sheet, 0, PAGE-1, PAGE, COL_CNT, pageCnt - 1);
|
|
|
|
|
int row = 0, rbox = 0, pbox = 0;
|
|
|
|
|
for(String[] data : datas) {
|
|
|
|
|
int box = Integer.parseInt(data[COL_CNT]);
|
|
|
|
@ -131,7 +132,7 @@ public class BoxReportOperation extends AbstractAIFOperation {
|
|
|
|
|
rbox = 1;
|
|
|
|
|
pbox = box;
|
|
|
|
|
|
|
|
|
|
xssfrow = TCUtil.getRow(sheet, page * PAGE + 1);
|
|
|
|
|
xssfrow = TCUtil.getRow(sheet, page * PAGE);
|
|
|
|
|
cell = TCUtil.getCell(xssfrow, 5);
|
|
|
|
|
String[] boxno = PlmLocale.getString("boxno").split(";");
|
|
|
|
|
cell.setCellValue(boxno[0] + getNumStr(box) + boxno[1]);
|
|
|
|
|