证据查询优化路径
This commit is contained in:
+11
@@ -24,6 +24,7 @@ import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -63,6 +64,16 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
}
|
||||
//根据案件id查询案件证据材料
|
||||
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
|
||||
if (evidenceMaterialList!=null&&evidenceMaterialList.size()>0){
|
||||
for (CaseAttach caseAttach : evidenceMaterialList) {
|
||||
String path =caseAttach.getAnnexName();
|
||||
String prefix = "/profile";
|
||||
int startIndex = path.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String extractedPath = "/uploadPath"+path.substring(startIndex);
|
||||
caseAttach.setAnnexPath(extractedPath);
|
||||
}
|
||||
}
|
||||
caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
|
||||
}
|
||||
return AjaxResult.success(caseDetailVO);
|
||||
|
||||
Reference in New Issue
Block a user