| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // 文件保存目录URL |
| | | @Value("${static.resource.path}") |
| | | private String resourcePath; |
| | | |
| | | @PostMapping(value = "/importDeliver") |
| | | @ControllerEndpoint(operation = "导入发货", exceptionMessage = "导入失败") |
| | | public FebsResponse importDeliver(@RequestBody MultipartFile file) throws IOException { |
| | |
| | | } |
| | | |
| | | String fileName = file.getOriginalFilename(); |
| | | String dirPath = "/home/javaweb/webresource/blnka/"; |
| | | String dirPath = resourcePath; |
| | | |
| | | File saveFile = new File(new File(dirPath).getAbsolutePath() + File.separator + fileName); |
| | | if (!saveFile.exists()) { |