Browse Source

修改docker文件上传路径

lamphua 4 months ago
parent
commit
293e56fc17

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesAchievementController.java View File

215
     private boolean uploadKmlFile(FilesAchievement filesAchievement, MultipartFile uploadKmlFile) throws IOException {
215
     private boolean uploadKmlFile(FilesAchievement filesAchievement, MultipartFile uploadKmlFile) throws IOException {
216
         if (uploadKmlFile != null) {
216
         if (uploadKmlFile != null) {
217
             if (!uploadKmlFile.isEmpty()) {
217
             if (!uploadKmlFile.isEmpty()) {
218
-                File profilePath = new File(profile);
218
+                File profilePath = new File(profile + "/upload/uploadKmlFiles/");
219
                 if (!profilePath.exists())//若此目录不存在,则创建之
219
                 if (!profilePath.exists())//若此目录不存在,则创建之
220
                     profilePath.mkdirs();
220
                     profilePath.mkdirs();
221
-                File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadKmlFile.getOriginalFilename());
221
+                File transferFile = new File( profilePath + "/" + uploadKmlFile.getOriginalFilename());
222
                 if (!transferFile.exists())
222
                 if (!transferFile.exists())
223
                     uploadKmlFile.transferTo(transferFile);
223
                     uploadKmlFile.transferTo(transferFile);
224
                 filesAchievement.setKmlUrl("/uploadKmlFiles/" + transferFile.getName());
224
                 filesAchievement.setKmlUrl("/uploadKmlFiles/" + transferFile.getName());

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java View File

152
     private boolean uploadProjectKmlFile(CmcProject cmcProject, MultipartFile uploadProjectKmlFile) throws IOException {
152
     private boolean uploadProjectKmlFile(CmcProject cmcProject, MultipartFile uploadProjectKmlFile) throws IOException {
153
         if (uploadProjectKmlFile != null) {
153
         if (uploadProjectKmlFile != null) {
154
             if (!uploadProjectKmlFile.isEmpty()) {
154
             if (!uploadProjectKmlFile.isEmpty()) {
155
-                File profilePath = new File(profile);
155
+                File profilePath = new File(profile + "/upload/uploadKmlFiles");
156
                 if (!profilePath.exists())//若此目录不存在,则创建之
156
                 if (!profilePath.exists())//若此目录不存在,则创建之
157
                     profilePath.mkdirs();
157
                     profilePath.mkdirs();
158
-                File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadProjectKmlFile.getOriginalFilename());
158
+                File transferFile = new File( profilePath + "/" + uploadProjectKmlFile.getOriginalFilename());
159
                 if (!transferFile.exists())
159
                 if (!transferFile.exists())
160
                     uploadProjectKmlFile.transferTo(transferFile);
160
                     uploadProjectKmlFile.transferTo(transferFile);
161
                 cmcProject.setProjectKml("/uploadKmlFiles/" + transferFile.getName());
161
                 cmcProject.setProjectKml("/uploadKmlFiles/" + transferFile.getName());

+ 1
- 0
oa-back/ruoyi-system/src/main/resources/mapper/file/FilesAchievementMapper.xml View File

117
             <if test="dataYear != null">#{dataYear},</if>
117
             <if test="dataYear != null">#{dataYear},</if>
118
             <if test="scaleGrade != null">#{scaleGrade},</if>
118
             <if test="scaleGrade != null">#{scaleGrade},</if>
119
             <if test="resultType != null">#{resultType},</if>
119
             <if test="resultType != null">#{resultType},</if>
120
+            <if test="fileType != null">#{fileType},</if>
120
             #{kmlUrl},
121
             #{kmlUrl},
121
             <if test="kmlLng != null">#{kmlLng},</if>
122
             <if test="kmlLng != null">#{kmlLng},</if>
122
             <if test="kmlLat != null">#{kmlLat},</if>
123
             <if test="kmlLat != null">#{kmlLat},</if>

Loading…
Cancel
Save