|
|
@@ -80,12 +80,20 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|
80
|
80
|
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
|
|
81
|
81
|
if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
|
|
82
|
82
|
for (CaseAttach caseAttach : evidenceMaterialList) {
|
|
83
|
|
- String path = caseAttach.getAnnexName();
|
|
84
|
|
- String prefix = "/profile";
|
|
85
|
|
- int startIndex = path.indexOf(prefix);
|
|
86
|
|
- startIndex += prefix.length();
|
|
87
|
|
- String extractedPath = "/uploadPath" + path.substring(startIndex);
|
|
88
|
|
- caseAttach.setAnnexPath(extractedPath);
|
|
|
83
|
+ //根据附件类型决定返回的路径
|
|
|
84
|
+ Integer annexType = caseAttach.getAnnexType();
|
|
|
85
|
+ if (annexType != 1){
|
|
|
86
|
+ String path = caseAttach.getAnnexName();
|
|
|
87
|
+ String prefix = "/profile";
|
|
|
88
|
+ int startIndex = path.indexOf(prefix);
|
|
|
89
|
+ startIndex += prefix.length();
|
|
|
90
|
+ String extractedPath = "/uploadPath" + path.substring(startIndex);
|
|
|
91
|
+ caseAttach.setAnnexPath(extractedPath);
|
|
|
92
|
+ }else {
|
|
|
93
|
+ String annexPath = caseAttach.getAnnexPath();
|
|
|
94
|
+ String result = annexPath.replace("/home/ruoyi", "");
|
|
|
95
|
+ caseAttach.setAnnexPath(result);
|
|
|
96
|
+ }
|
|
89
|
97
|
}
|
|
90
|
98
|
}
|
|
91
|
99
|
caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
|