|
|
@ -167,13 +167,14 @@ public class ShStorehouseRest { |
|
|
|
String newFileName = System.currentTimeMillis() + originalFilename; |
|
|
|
filePath = fileRootPath+ suffix + newFileName; |
|
|
|
System.out.println(filePath); |
|
|
|
ShStorehouseAttachmentDto dto=new ShStorehouseAttachmentDto(); |
|
|
|
String s = UUID.randomUUID().toString(); |
|
|
|
try { |
|
|
|
File file1 = new File(filePath); |
|
|
|
if (!file1.exists()) file1.mkdirs(); // 要是目录不存在,创建一个
|
|
|
|
file.transferTo(file1); // 保存起来
|
|
|
|
urlPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + "/archive/" + suffix + newFileName; |
|
|
|
ShStorehouseAttachmentDto dto=new ShStorehouseAttachmentDto(); |
|
|
|
|
|
|
|
// dto.setStorehouseSid(); // 库房sid
|
|
|
|
// dto.setStorehouseName(); // 库房名称
|
|
|
|
dto.setFileName(newFileName); // 文件名称
|
|
|
@ -187,7 +188,7 @@ public class ShStorehouseRest { |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
return ResultBean.fireSuccess().setData(s); |
|
|
|
return ResultBean.fireSuccess().setData(dto); |
|
|
|
} |
|
|
|
@ApiOperation("获取所有的企业信息") |
|
|
|
@GetMapping("/fetchEntList") |
|
|
|