|
|
@ -152,6 +152,7 @@ public class CheckService {
|
|
|
|
|
|
|
|
|
|
|
|
List<CheckPageRow> checkPageRows = new ArrayList<>();
|
|
|
|
List<CheckPageRow> checkPageRows = new ArrayList<>();
|
|
|
|
//生成索引目录
|
|
|
|
//生成索引目录
|
|
|
|
|
|
|
|
Double longth = 0d;
|
|
|
|
for (IndexPlate indexPlate : map.values()) {
|
|
|
|
for (IndexPlate indexPlate : map.values()) {
|
|
|
|
List<Roll> rollList = indexPlate.getRollList();
|
|
|
|
List<Roll> rollList = indexPlate.getRollList();
|
|
|
|
for(Roll roll:rollList){
|
|
|
|
for(Roll roll:rollList){
|
|
|
@ -159,13 +160,18 @@ public class CheckService {
|
|
|
|
for(Pieces pieces:piecesList){
|
|
|
|
for(Pieces pieces:piecesList){
|
|
|
|
List<Document> documentList = pieces.getDocumentList();
|
|
|
|
List<Document> documentList = pieces.getDocumentList();
|
|
|
|
for(Document document:documentList){
|
|
|
|
for(Document document:documentList){
|
|
|
|
CheckPageRow checkPageRow = new CheckPageRow(indexPlate.getName(), document.getName(), document.getDpi(), document.useStore());
|
|
|
|
CheckPageRow checkPageRow = new CheckPageRow(indexPlate.getName(), document.getName(), document.getDpi(), document.useStore(),document.toSize());
|
|
|
|
checkPageRows.add(checkPageRow);
|
|
|
|
checkPageRows.add(checkPageRow);
|
|
|
|
|
|
|
|
longth+=checkPageRow.getUseStore();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//加上统计
|
|
|
|
|
|
|
|
CheckPageRow checkPageRow = new CheckPageRow("", "总计长度:", null, longth,"");
|
|
|
|
|
|
|
|
checkPageRows.add(checkPageRow);
|
|
|
|
|
|
|
|
|
|
|
|
EasyExcel.write(savepath+"/check" + ".xls", CheckPageRow.class).sheet("test").doWrite(checkPageRows);
|
|
|
|
EasyExcel.write(savepath+"/check" + ".xls", CheckPageRow.class).sheet("test").doWrite(checkPageRows);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -216,66 +222,6 @@ public class CheckService {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<IndexPageRow> indexGen(IndexPlate indexPlate, List<Roll> rollList, Integer pianPageNum, Integer totalSize) {
|
|
|
|
|
|
|
|
List<IndexPageRow> indexPageRows = new ArrayList<>();
|
|
|
|
|
|
|
|
int start = 1;
|
|
|
|
|
|
|
|
//添加片头
|
|
|
|
|
|
|
|
for (Roll roll : rollList) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//跳过片头
|
|
|
|
|
|
|
|
if (roll.getName().equals("片头")) {
|
|
|
|
|
|
|
|
File file = new File(roll.getAbsolutePath());
|
|
|
|
|
|
|
|
int fileasize = file.listFiles().length;
|
|
|
|
|
|
|
|
fileasize += pianPageNum;
|
|
|
|
|
|
|
|
IndexPageRow indexPageRow = new IndexPageRow(indexPlate.getZongName(), indexPlate.getName(), roll.getName(), "", fileasize, start);
|
|
|
|
|
|
|
|
start += fileasize;
|
|
|
|
|
|
|
|
indexPageRows.add(indexPageRow);
|
|
|
|
|
|
|
|
start += 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//处理偏中
|
|
|
|
|
|
|
|
for (Roll roll : rollList) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//跳过片头
|
|
|
|
|
|
|
|
if (roll.getName().equals("片头")) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//跳过片尾
|
|
|
|
|
|
|
|
if (roll.getName().equals("片尾")) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
List<Pieces> piecesList = roll.getPiecesList();
|
|
|
|
|
|
|
|
for (Pieces pieces : piecesList) {
|
|
|
|
|
|
|
|
IndexPageRow indexPageRow = new IndexPageRow(indexPlate.getZongName(), indexPlate.getName(), roll.getName(), pieces.getName(), pieces.getDocumentList().size(), start);
|
|
|
|
|
|
|
|
start += pieces.getDocumentList().size();
|
|
|
|
|
|
|
|
indexPageRows.add(indexPageRow);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
start += 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//添加片尾
|
|
|
|
|
|
|
|
for (Roll roll : rollList) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//跳过片头
|
|
|
|
|
|
|
|
if (roll.getName().equals("片尾")) {
|
|
|
|
|
|
|
|
File file = new File(roll.getAbsolutePath());
|
|
|
|
|
|
|
|
int fileasize = file.listFiles().length;
|
|
|
|
|
|
|
|
fileasize += pianPageNum;
|
|
|
|
|
|
|
|
IndexPageRow indexPageRow = new IndexPageRow(indexPlate.getZongName(), indexPlate.getName(), roll.getName(), "", fileasize, start);
|
|
|
|
|
|
|
|
start += fileasize;
|
|
|
|
|
|
|
|
indexPageRows.add(indexPageRow);
|
|
|
|
|
|
|
|
start += 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//加上统计
|
|
|
|
|
|
|
|
IndexPageRow indexPageRow = new IndexPageRow("", "", "", "有效画幅数", totalSize, null);
|
|
|
|
|
|
|
|
indexPageRows.add(indexPageRow);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return indexPageRows;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void findAllDir(String absolutePath, Map<String, IndexPlate> map) {
|
|
|
|
private void findAllDir(String absolutePath, Map<String, IndexPlate> map) {
|
|
|
|
|
|
|
|
|
|
|
|