no message
parent
26e11156c5
commit
afa8862849
|
|
@ -46,6 +46,7 @@ import java.io.File;
|
|||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
|
|
@ -93,16 +94,16 @@ public class StockController {
|
|||
ExcelReader reader = ExcelUtil.getReader(file);
|
||||
try {
|
||||
List<Map<String, Object>> readAll = reader.readAll();
|
||||
Set<String> StockCodes = new HashSet<>();//容器集合
|
||||
Set<String> stockCodes = new HashSet<>();//容器集合
|
||||
for (Map<String, Object> record : readAll) {
|
||||
String stockCode = record.get("代码").toString().trim();
|
||||
if (!StringUtils.isEmpty(stockCode)) {
|
||||
StockCodes.add(stockCode);
|
||||
stockCodes.add(stockCode);
|
||||
}
|
||||
}
|
||||
|
||||
//获取已存在的点位
|
||||
Map<String, Stock> existingStock = stockService.findByCodes(StockCodes);
|
||||
Map<String, Stock> existingStock = stockService.findByCodes(stockCodes);
|
||||
|
||||
List<Stock> stocksToCreate = new ArrayList<>();//新增容器集合
|
||||
List<Stock> stocksToUpdate = new ArrayList<>();//修改容器集合
|
||||
|
|
|
|||
Loading…
Reference in New Issue