This commit is contained in:
wangliwen 2022-07-05 19:22:34 +08:00
parent 8a2fa967e2
commit 45fb520d1a
1 changed files with 4 additions and 4 deletions

View File

@ -267,16 +267,16 @@ public class ResourceController {
uploadFile.transferTo(file);
Optional<SysDeptDTO> deptDTO = Optional.ofNullable(sysDeptService.getByName(bigDateDeptName));
CompletableFuture.runAsync(() -> {
EasyExcel.read(file, new ResourceExcelImportListener(0, dept, resourceService, deptDTO.get().getId())).sheet(0).headRowNumber(1).doReadSync();
EasyExcel.read(file, new ResourceExcelImportListener(0, dept, resourceService, deptDTO.get().getId())).sheet(0).headRowNumber(1).doRead();
}, executor);
CompletableFuture.runAsync(() -> {
EasyExcel.read(file, new ResourceExcelImportListener(1, dept, resourceService, deptDTO.get().getId())).sheet(1).headRowNumber(1).doReadSync();
EasyExcel.read(file, new ResourceExcelImportListener(1, dept, resourceService, deptDTO.get().getId())).sheet(1).headRowNumber(1).doRead();
}, executor);
CompletableFuture.runAsync(() -> {
EasyExcel.read(file, new ResourceExcelImportListener(2, dept, resourceService, deptDTO.get().getId())).sheet(2).headRowNumber(1).doReadSync();
EasyExcel.read(file, new ResourceExcelImportListener(2, dept, resourceService, deptDTO.get().getId())).sheet(2).headRowNumber(1).doRead();
}, executor);
CompletableFuture.runAsync(() -> {
EasyExcel.read(file, new ResourceExcelImportListener(3, dept, resourceService, deptDTO.get().getId())).sheet(3).headRowNumber(1).doReadSync();
EasyExcel.read(file, new ResourceExcelImportListener(3, dept, resourceService, deptDTO.get().getId())).sheet(3).headRowNumber(1).doRead();
}, executor);
} catch (IOException e) {
return new Result<String>().error(e.getMessage());