Commit 6b88fc53 authored by 吴琼's avatar 吴琼

xiugai

parent 649e6cd3
...@@ -40,6 +40,7 @@ import org.apache.poi.ss.usermodel.Workbook; ...@@ -40,6 +40,7 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -55,6 +56,7 @@ import java.net.URLEncoder; ...@@ -55,6 +56,7 @@ import java.net.URLEncoder;
import java.util.*; import java.util.*;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
@Service("transactionReceiptRecordService") @Service("transactionReceiptRecordService")
public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptRecordService { public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptRecordService {
...@@ -69,8 +71,8 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR ...@@ -69,8 +71,8 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
@Autowired @Autowired
private UserSdkImpl userSdk; private UserSdkImpl userSdk;
@Value("${kdsp-operation}") //@Value("${kdsp-operation}")
private String kdspOperationUrl; private String kdspOperationUrl ="http://kdsp-operation-qa2.liangkebang.net";
@Value("${pdf.quantgroup.cn.http}") @Value("${pdf.quantgroup.cn.http}")
private String contractUrl; private String contractUrl;
...@@ -94,6 +96,8 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR ...@@ -94,6 +96,8 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
private String downloadLocalPath; private String downloadLocalPath;
@Value("${customer.transaction.local.file.downloadZipPath}") @Value("${customer.transaction.local.file.downloadZipPath}")
private String downloadZipLocalPath; private String downloadZipLocalPath;
//@Value("${customer.transaction.local.file.size}")
//private int fileSize;
@Override @Override
...@@ -155,6 +159,9 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR ...@@ -155,6 +159,9 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
List<TransactionReceiptRecord> readList = null; List<TransactionReceiptRecord> readList = null;
try { try {
readList = read(file.getOriginalFilename(), file.getInputStream()); readList = read(file.getOriginalFilename(), file.getInputStream());
/*if(readList !=null && readList.size() > fileSize){
throw new RuntimeException("文件太大,最多可以读取"+fileSize+"条数据!");
}*/
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException("读取数据异常"); throw new RuntimeException("读取数据异常");
} }
...@@ -275,6 +282,7 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR ...@@ -275,6 +282,7 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
log.info("[TransactionReceiptRecordServiceImpl.exportZipFile begin]"); log.info("[TransactionReceiptRecordServiceImpl.exportZipFile begin]");
//查询需要导出的数据-导入成功的数据,但未导出成功的数据 //查询需要导出的数据-导入成功的数据,但未导出成功的数据
List<TransactionReceiptRecord> transactionReceiptRecordList= transactionReceiptRecordRepo.selectRecordsByImportStatusAndExportStatus(1); List<TransactionReceiptRecord> transactionReceiptRecordList= transactionReceiptRecordRepo.selectRecordsByImportStatusAndExportStatus(1);
log.info("[TransactionReceiptRecordServiceImpl.exportZipFile transactionReceiptRecordList]",transactionReceiptRecordList);
if(CollectionUtils.isEmpty(transactionReceiptRecordList)){ if(CollectionUtils.isEmpty(transactionReceiptRecordList)){
return JsonResult.buildErrorStateResult("没有可以导出得数据"); return JsonResult.buildErrorStateResult("没有可以导出得数据");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment