【物料变更】大批量导入,上限10000条
This commit is contained in:
parent
d7315a9183
commit
f4485365fd
|
|
@ -406,6 +406,9 @@ public class MaterialUpdateBillService extends ServiceImpl<MaterialUpdateBillMap
|
||||||
if (lastColIndex == 4) {
|
if (lastColIndex == 4) {
|
||||||
List<MaterialStateUpExcelDTO> excelContext = EecExcelUtil.getExcelContext(file.getInputStream(), MaterialStateUpExcelDTO.class);
|
List<MaterialStateUpExcelDTO> excelContext = EecExcelUtil.getExcelContext(file.getInputStream(), MaterialStateUpExcelDTO.class);
|
||||||
if (CollectionUtil.isNotEmpty(excelContext) && excelContext.size() > 1000) {
|
if (CollectionUtil.isNotEmpty(excelContext) && excelContext.size() > 1000) {
|
||||||
|
if (excelContext.size() > 10000) {
|
||||||
|
return ResultVO.error("导入失败,最多支持10000条批量导入");
|
||||||
|
}
|
||||||
redisTemplate.opsForValue().set(buildKey(userCode + ":updateBatchImport"), file.getOriginalFilename());
|
redisTemplate.opsForValue().set(buildKey(userCode + ":updateBatchImport"), file.getOriginalFilename());
|
||||||
// 大数据量,子线程分批次提交OA(每批1000条),主线程提前返回结果给前端
|
// 大数据量,子线程分批次提交OA(每批1000条),主线程提前返回结果给前端
|
||||||
CompletableFuture<Integer> task1 = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<Integer> task1 = CompletableFuture.supplyAsync(() -> {
|
||||||
|
|
@ -433,6 +436,9 @@ public class MaterialUpdateBillService extends ServiceImpl<MaterialUpdateBillMap
|
||||||
// 制作物料
|
// 制作物料
|
||||||
List<TwentyMaterialTemplateExcelDTO> excelContext = EecExcelUtil.getExcelContext(file.getInputStream(), TwentyMaterialTemplateExcelDTO.class);
|
List<TwentyMaterialTemplateExcelDTO> excelContext = EecExcelUtil.getExcelContext(file.getInputStream(), TwentyMaterialTemplateExcelDTO.class);
|
||||||
if (CollectionUtil.isNotEmpty(excelContext) && excelContext.size() > 1000) {
|
if (CollectionUtil.isNotEmpty(excelContext) && excelContext.size() > 1000) {
|
||||||
|
if (excelContext.size() > 10000) {
|
||||||
|
return ResultVO.error("导入失败,最多支持10000条批量导入");
|
||||||
|
}
|
||||||
redisTemplate.opsForValue().set(buildKey(userCode + ":updateBatchImport"), file.getOriginalFilename());
|
redisTemplate.opsForValue().set(buildKey(userCode + ":updateBatchImport"), file.getOriginalFilename());
|
||||||
// 大数据量,子线程分批次提交OA(每批1000条),主线程提前返回结果给前端
|
// 大数据量,子线程分批次提交OA(每批1000条),主线程提前返回结果给前端
|
||||||
CompletableFuture<Integer> task1 = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<Integer> task1 = CompletableFuture.supplyAsync(() -> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue