|
@@ -1181,8 +1181,9 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public Map<String, Object> executeImportBasicStudentLogic(Map<String, Object> map) throws Exception {
|
|
|
- MultipartFile file = (MultipartFile) map.get(SystemConstant.FILE);
|
|
|
- List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(file.getInputStream(), Lists.newArrayList(BasicStudentImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
|
+ InputStream inputStream = (InputStream) map.get("inputStream");
|
|
|
+ System.out.println(inputStream);
|
|
|
+ List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(BasicStudentImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
|
Map<String,String> checkMap = new HashMap<>();
|
|
|
for (int i = 0; i < finalExcelList.size(); i++) {
|
|
@@ -1223,8 +1224,9 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public Map<String, Object> executeImportBasicCourseLogic(Map<String, Object> map) throws Exception {
|
|
|
- MultipartFile file = (MultipartFile) map.get(SystemConstant.FILE);
|
|
|
- List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(file.getInputStream(), Lists.newArrayList(BasicCourseImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
|
+
|
|
|
+ InputStream inputStream = (InputStream) map.get("inputStream");
|
|
|
+ List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(BasicCourseImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
|
Map<String,String> checkMap = new HashMap<>();
|
|
|
for (int i = 0; i < finalExcelList.size(); i++) {
|