Commit 47977b60 by 林冲

feat:小程序统计二手车产值等

1 parent ca35fbca
...@@ -118,10 +118,7 @@ public class EvalElectronicContractService { ...@@ -118,10 +118,7 @@ public class EvalElectronicContractService {
log.info("开始导入合同数据"); log.info("开始导入合同数据");
// 阶段1: 导入Excel文件 // 阶段1: 导入Excel文件
long excelStart = System.currentTimeMillis();
List<ContractImportRow> excelRows = importExcel(file); List<ContractImportRow> excelRows = importExcel(file);
long excelEnd = System.currentTimeMillis();
log.info("Excel导入完成,耗时:{}ms,数据行数:{}", (excelEnd - excelStart), excelRows != null ? excelRows.size() : 0);
ImportContractResDTO resDTO = new ImportContractResDTO(); ImportContractResDTO resDTO = new ImportContractResDTO();
if (excelRows == null || excelRows.isEmpty()) { if (excelRows == null || excelRows.isEmpty()) {
...@@ -131,13 +128,10 @@ public class EvalElectronicContractService { ...@@ -131,13 +128,10 @@ public class EvalElectronicContractService {
return R.ok(resDTO); return R.ok(resDTO);
} }
// LoginAccountResponse accountInfo = ThreadLocalCache.getLoginAccountInfo(); LoginAccountResponse accountInfo = ThreadLocalCache.getLoginAccountInfo();
LoginAccountResponse accountInfo = new LoginAccountResponse();
accountInfo.setUserName("admin");
accountInfo.setUuid("1213123");
List<EvalElectronicContractImportDTO> toImportList = new ArrayList<>(); List<EvalElectronicContractImportDTO> toImportList = new ArrayList<>();
List<EvalElectronicContractImportFailDTO> failList = Collections.synchronizedList(new ArrayList<>()); List<EvalElectronicContractImportFailDTO> failList = Collections.synchronizedList(new ArrayList<>());
AtomicInteger successCount = new AtomicInteger(0); // 使用AtomicInteger替代int AtomicInteger successCount = new AtomicInteger(0);
// 阶段2: 数据校验和转换 // 阶段2: 数据校验和转换
for (int i = 0; i < excelRows.size(); i++) { for (int i = 0; i < excelRows.size(); i++) {
...@@ -200,7 +194,7 @@ public class EvalElectronicContractService { ...@@ -200,7 +194,7 @@ public class EvalElectronicContractService {
/** /**
* 导入 Excel,返回解析后的数据列�? * 导入 Excel,返回解析后的数据列
*/ */
public List<ContractImportRow> importExcel(MultipartFile file) { public List<ContractImportRow> importExcel(MultipartFile file) {
if (file == null || file.isEmpty()) { if (file == null || file.isEmpty()) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!