Просмотр исходного кода

Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev

hejinbo 2 лет назад
Родитель
Сommit
c0c35306ef

+ 2
- 2
ruoyi-admin/src/main/resources/application.yml Просмотреть файл

@@ -58,9 +58,9 @@ spring:
58 58
   servlet:
59 59
     multipart:
60 60
       # 单个文件大小
61
-      max-file-size: 10MB
61
+      max-file-size: 50MB
62 62
       # 设置总上传的文件大小
63
-      max-request-size: 20MB
63
+      max-request-size: 500MB
64 64
   # 服务模块
65 65
   devtools:
66 66
     restart:

+ 9
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/CaseEvidenceDirectory.java Просмотреть файл

@@ -48,4 +48,13 @@ public class CaseEvidenceDirectory extends BaseEntity {
48 48
 
49 49
     /** 子目录 */
50 50
     private List<CaseEvidenceDirectory> children = new ArrayList<>();
51
+
52
+    /**
53
+     * 附件名称
54
+     */
55
+    private String annexName;
56
+    /**
57
+     * 附件路径
58
+     */
59
+    private String annexPath;
51 60
 }

+ 24
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/CaseEvidenceDirectoryVO.java Просмотреть файл

@@ -46,6 +46,15 @@ public class CaseEvidenceDirectoryVO implements Serializable {
46 46
     @JsonInclude(JsonInclude.Include.NON_EMPTY)
47 47
     private List<CaseEvidenceDirectory> children;
48 48
 
49
+    /**
50
+     * 附件名称
51
+     */
52
+    private String annexName;
53
+    /**
54
+     * 附件路径
55
+     */
56
+    private String annexPath;
57
+
49 58
     /**
50 59
      * 创建时间
51 60
      */
@@ -159,6 +168,19 @@ public class CaseEvidenceDirectoryVO implements Serializable {
159 168
     public void setUpdateTime(Date updateTime) {
160 169
         this.updateTime = updateTime;
161 170
     }
171
+    public String getAnnexName() {
172
+        return annexName;
173
+    }
174
+
175
+    public void setAnnexName(String annexName) {
176
+        this.annexName = annexName;
177
+    }
178
+
179
+
180
+    public void setAnnexPath(String annexPath) {
181
+        this.annexPath = annexPath;
182
+    }
183
+
162 184
 
163 185
     public CaseEvidenceDirectoryVO(CaseEvidenceDirectory caseEvidenceDirectory) {
164 186
         this.id = caseEvidenceDirectory.getId();
@@ -172,5 +194,7 @@ public class CaseEvidenceDirectoryVO implements Serializable {
172 194
         this.createBy = caseEvidenceDirectory.getCreateBy();
173 195
         this.updateBy = caseEvidenceDirectory.getUpdateBy();
174 196
         this.updateTime = caseEvidenceDirectory.getUpdateTime();
197
+        this.annexName = caseEvidenceDirectory.getAnnexName();
198
+        this.annexPath = caseEvidenceDirectory.getAnnexPath();
175 199
     }
176 200
 }

+ 1
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Просмотреть файл

@@ -293,9 +293,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
293 293
             }
294 294
             return AjaxResult.success("裁决书已生成");
295 295
         } catch (IOException e) {
296
-            e.printStackTrace();
296
+            return AjaxResult.error(e+"请检查文件路径是否有误");
297 297
         }
298
-        return null;
299 298
     }
300 299
 
301 300
     @Override

+ 13
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseEvidenceServiceImpl.java Просмотреть файл

@@ -313,6 +313,19 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
313 313
         List<CaseEvidenceDirectory> returnList = new ArrayList<>();
314 314
         List<Long> tempList = caseEvidenceDirectorys.stream().map(CaseEvidenceDirectory::getId).collect(Collectors.toList());
315 315
         for (CaseEvidenceDirectory caseEvidenceDirectory : caseEvidenceDirectorys) {
316
+            String annexName = caseEvidenceDirectory.getAnnexName();
317
+            if (annexName!=null){
318
+                String prefix = "/profile";
319
+                int startIndex = annexName.indexOf(prefix);
320
+                startIndex += prefix.length();
321
+                String annexPath = "/uploadPath" + annexName.substring(startIndex);
322
+                caseEvidenceDirectory.setAnnexPath(annexPath);
323
+                int startIndexnew = annexName.lastIndexOf("/");
324
+                if(startIndexnew!=-1){
325
+                    String annexNamenew  = annexName.substring(startIndexnew+1);
326
+                    caseEvidenceDirectory.setAnnexName(annexNamenew);
327
+                }
328
+            }
316 329
             // 如果是顶级节点, 遍历该父节点的所有子节点
317 330
             if (!tempList.contains(caseEvidenceDirectory.getParentId())) {
318 331
                 recursionFn(caseEvidenceDirectorys, caseEvidenceDirectory);

+ 14
- 10
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/CaseEvidenceDirectoryMapper.xml Просмотреть файл

@@ -14,6 +14,8 @@
14 14
         <result property="updateTime"     column="update_time"    />
15 15
         <result property="createBy"     column="create_by"    />
16 16
         <result property="updateBy"     column="update_by"    />
17
+        <result property="annexName"     column="annex_name"    />
18
+        <result property="annexPath"     column="annex_path"    />
17 19
     </resultMap>
18 20
     <insert id="save" parameterType="CaseEvidenceDirectory" useGeneratedKeys="true" keyProperty="id">
19 21
 
@@ -36,28 +38,30 @@
36 38
         )
37 39
     </insert>
38 40
     <select id="selectList" parameterType="CaseEvidenceDirectory" resultMap="CaseEvidenceDirectoryResult">
39
-        select id,parent_id,evidence_name,annex_id,series,create_time,update_time,case_appli_id,create_by,update_by
40
-        from case_evidence_directory
41
-        <where>
41
+        select ced.id,ced.parent_id,ced.evidence_name,ced.annex_id,ced.series,ced.create_time
42
+             ,ced.update_time,ced.case_appli_id,ced.create_by,ced.update_by,ca.annex_name,ca.annex_path
43
+        from case_evidence_directory ced
44
+        left join case_attach ca on ced.annex_id = ca.annex_id
45
+            <where>
42 46
             <if test="id != null ">
43
-                AND id = #{id}
47
+                AND ced.id = #{id}
44 48
             </if>
45 49
             <if test="parentId != null ">
46
-                AND parent_id = #{parentId}
50
+                AND ced.parent_id = #{parentId}
47 51
             </if>
48 52
             <if test="evidenceName != null ">
49
-                AND evidence_name = #{evidenceName}
53
+                AND ced.evidence_name = #{evidenceName}
50 54
             </if>
51 55
             <if test="annexId != null ">
52
-                AND annex_id = #{annexId}
56
+                AND ced.annex_id = #{annexId}
53 57
             </if>
54 58
             <if test="series != null ">
55
-                AND series = #{series}
59
+                AND ced.series = #{series}
56 60
             </if>
57 61
             <if test="caseId != null ">
58
-                AND case_appli_id = #{caseId}
62
+                AND ced.case_appli_id = #{caseId}
59 63
             </if>
60
-            order by case_evidence_directory.parent_id
64
+            order by ced.parent_id
61 65
         </where>
62 66
     </select>
63 67