瀏覽代碼

Merge remote-tracking branch 'origin/develop' into develop

Danj0rr 11 月之前
父節點
當前提交
4c9eb04333
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6 4
      src/main/java/com/kexun/controller/UploadController.java

+ 6 - 4
src/main/java/com/kexun/controller/UploadController.java

@@ -51,10 +51,11 @@ public class UploadController {
     private String jsonTargetPath;
 
     @PostMapping("/uploadUi")
-    public Result uploadUi(@RequestParam("files") MultipartFile[] files ) {
+    public Result uploadUi(@RequestParam("files") MultipartFile[] files ,@RequestParam("customerName") String customerName,
+                           @RequestParam("headInfId") String headInfId) {
         if(files.length>0) {
             for(MultipartFile file : files) {
-                String fileName = file.getOriginalFilename();
+                String fileName = customerName+"_"+headInfId+"_"+file.getOriginalFilename();
                 try{
                     String filePath = "";
                     if(fileName.endsWith("xml")){
@@ -95,10 +96,11 @@ public class UploadController {
     }
 
     @PostMapping("/uploadMod")
-    public Result uploadMod(@RequestParam("files") MultipartFile[] files ) {
+    public Result uploadMod(@RequestParam("files") MultipartFile[] files ,@RequestParam("customerName") String customerName,
+                            @RequestParam("headInfId") String headInfId) {
         if(files.length>0) {
             for(MultipartFile file : files) {
-                String fileName = file.getOriginalFilename();
+                String fileName = customerName+"_"+headInfId+"_"+file.getOriginalFilename();
                 try{
                     File mkdir = new File(modelPath);
                     if(!mkdir.exists()) {