Commit 3614f803 authored by neo's avatar neo

[bugfix] delete multrequst in financedata import

parent 1faf8aea
...@@ -118,7 +118,7 @@ public class FinanceDataImportController { ...@@ -118,7 +118,7 @@ public class FinanceDataImportController {
public ResponseEntity FinanceImportData(@RequestParam String importMethod, @RequestParam String fileName, public ResponseEntity FinanceImportData(@RequestParam String importMethod, @RequestParam String fileName,
@RequestParam String importType, @RequestParam(required = false) String fileGuid, @RequestParam String importType, @RequestParam(required = false) String fileGuid,
@RequestParam Integer period, @RequestParam(required = false) String fileExtension, @RequestParam Integer period, @RequestParam(required = false) String fileExtension,
@RequestParam(required = false) String projectYear, MultipartHttpServletRequest request) { @RequestParam(required = false) String projectYear) {
String userId = identityService.getIdentityUser().getID(); String userId = identityService.getIdentityUser().getID();
if (StringUtils.isEmpty(importMethod)) { if (StringUtils.isEmpty(importMethod)) {
return ResponseEntity.ok(new OperationResultDto(false, "importMethod is empty")); return ResponseEntity.ok(new OperationResultDto(false, "importMethod is empty"));
...@@ -163,8 +163,8 @@ public class FinanceDataImportController { ...@@ -163,8 +163,8 @@ public class FinanceDataImportController {
financeDataImport.DeleteErpValidation(); financeDataImport.DeleteErpValidation();
//3. 开始导入数据 //3. 开始导入数据
for (MultipartFile f : request.getFileMap().values()) { for (String f : fileList) {
String fileFullPath = Paths.get(mappedPath, fileGuid + "_" + f.getName()).toString(); String fileFullPath = Paths.get(mappedPath, fileGuid + "_" + f).toString();
String schemaPath = "~/Resource"; String schemaPath = "~/Resource";
toDeleteFilesPath.add(fileFullPath); toDeleteFilesPath.add(fileFullPath);
ImportDataDto importResult = financeDataImport.ImportData(projectYear, importMethod, importType, period, fileFullPath, f, schemaPath, userId); ImportDataDto importResult = financeDataImport.ImportData(projectYear, importMethod, importType, period, fileFullPath, f, schemaPath, userId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment