소스 검색

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()) {