合并最新 #266

Merged
hejinbo merged 2 commits from hjb into dev 2023-11-30 07:28:50 +00:00
@@ -80,12 +80,20 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id); List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) { if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
for (CaseAttach caseAttach : evidenceMaterialList) { for (CaseAttach caseAttach : evidenceMaterialList) {
//根据附件类型决定返回的路径
Integer annexType = caseAttach.getAnnexType();
if (annexType != 1){
String path = caseAttach.getAnnexName(); String path = caseAttach.getAnnexName();
String prefix = "/profile"; String prefix = "/profile";
int startIndex = path.indexOf(prefix); int startIndex = path.indexOf(prefix);
startIndex += prefix.length(); startIndex += prefix.length();
String extractedPath = "/uploadPath" + path.substring(startIndex); String extractedPath = "/uploadPath" + path.substring(startIndex);
caseAttach.setAnnexPath(extractedPath); caseAttach.setAnnexPath(extractedPath);
}else {
String annexPath = caseAttach.getAnnexPath();
String result = annexPath.replace("/home/ruoyi", "");
caseAttach.setAnnexPath(result);
}
} }
} }
caseDetailVO.setEvidenceMaterialList(evidenceMaterialList); caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);